[ARM异常]-armv8/armv9同步异常的介绍
快速鏈接:
.
👉👉👉 個人博客筆記導讀目錄(全部) 👈👈👈
1、同步異常和異步異常的概念
具備以下3個行為的稱之為同步異常:
? The exception is generated as a result of direct execution or attempted execution of an instruction.
? The return address presented to the exception handler is guaranteed to indicate the instruction that caused the exception.
? The exception is precise
其實就是說:
- 異常是由執行或嘗試執行指令產生的
- 產生異常的那個位置是確定的,即每次執行到“那個指令處”就會產生
- 異常是precise的
具備以下3個行為的稱之為異步異常::
? The exception is not generated as a result of direct execution or attempted execution of the instruction stream.
? The return address presented to the exception handler is not guaranteed to indicate the instruction that caused the exception.
? The exception is imprecise.
其實就是說:
- 異常不是由執行或嘗試執行指令產生的
- 產生異常的那個位置不是確定的,即不知道執行到哪里,就產生了異常
- 異常是imprecise的
那么precise 和 imprecise 又是什么意思呢??
比較繞、比較難懂,咱們換一個說法:按照預期產生的異常稱之precise,反之imprecise
2、系統中有哪些同步異常?
- 嘗試執行UNDEFINED指令產生的任何異常,包括:
(1)、嘗試在不適當的異常級別執行指令。
(2)、當指令被禁用時嘗試執行指令。
(3)、嘗試執行尚未分配的指令位模式。 - 非法執行狀態異常。這些是由嘗試執行指令引起的PSTATE .IL 為 1,(詳細可參考D1-2486 頁上的AArch64 狀態的非法返回事件)
- 使用未對齊的 SP 導致的異常。
- 嘗試使用未對齊的 PC 執行指令導致的異常。
- 由異常生成指令SVC、HVC或SMC引起的異常。
- 嘗試執行系統寄存器定義為被捕獲到更高的異常級別。(詳細可參考可配置的指令使能和禁止,在D1-2510 頁)
- 由內存地址轉換系統生成的指令中止與嘗試相關聯從產生故障的內存區域執行指令。
- 內存地址轉換系統生成的數據中止與嘗試讀取或寫入產生故障的內存。
- 由地址未對齊引起的數據中止。
- 如果實施FEAT_MTE2,則由標記檢查故障引起的數據中止。。
- 所有調試異常:
(1)、Breakpoint Instruction exceptions.
(2)、Breakpoint exceptions.
(3)、Watchpoint exceptions.
(4)、Vector Catch exceptions.
(5)、Software Step exceptions. - 在支持捕獲浮點異常的實現中,由捕獲的IEEE 浮點異常引起的異常
- 在某些實現中,外部中止。外部中止是失敗的內存訪問,包括訪問地址轉換期間發生的內存系統的那些部分。
總結
以上是生活随笔為你收集整理的[ARM异常]-armv8/armv9同步异常的介绍的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [ARM异常]-中断的术语介绍:targ
- 下一篇: Linux Kernel/optee/A