[ARM异常]-armv8/armv9同步异常的介绍
快速鏈接:
.
👉👉👉 個人博客筆記導(dǎo)讀目錄(全部) 👈👈👈
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
其實就是說:
- 異常是由執(zhí)行或嘗試執(zhí)行指令產(chǎn)生的
- 產(chǎn)生異常的那個位置是確定的,即每次執(zhí)行到“那個指令處”就會產(chǎn)生
- 異常是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.
其實就是說:
- 異常不是由執(zhí)行或嘗試執(zhí)行指令產(chǎn)生的
- 產(chǎn)生異常的那個位置不是確定的,即不知道執(zhí)行到哪里,就產(chǎn)生了異常
- 異常是imprecise的
那么precise 和 imprecise 又是什么意思呢??
比較繞、比較難懂,咱們換一個說法:按照預(yù)期產(chǎn)生的異常稱之precise,反之imprecise
2、系統(tǒng)中有哪些同步異常?
- 嘗試執(zhí)行UNDEFINED指令產(chǎn)生的任何異常,包括:
(1)、嘗試在不適當(dāng)?shù)漠惓<墑e執(zhí)行指令。
(2)、當(dāng)指令被禁用時嘗試執(zhí)行指令。
(3)、嘗試執(zhí)行尚未分配的指令位模式。 - 非法執(zhí)行狀態(tài)異常。這些是由嘗試執(zhí)行指令引起的PSTATE .IL 為 1,(詳細(xì)可參考D1-2486 頁上的AArch64 狀態(tài)的非法返回事件)
- 使用未對齊的 SP 導(dǎo)致的異常。
- 嘗試使用未對齊的 PC 執(zhí)行指令導(dǎo)致的異常。
- 由異常生成指令SVC、HVC或SMC引起的異常。
- 嘗試執(zhí)行系統(tǒng)寄存器定義為被捕獲到更高的異常級別。(詳細(xì)可參考可配置的指令使能和禁止,在D1-2510 頁)
- 由內(nèi)存地址轉(zhuǎn)換系統(tǒng)生成的指令中止與嘗試相關(guān)聯(lián)從產(chǎn)生故障的內(nèi)存區(qū)域執(zhí)行指令。
- 內(nèi)存地址轉(zhuǎn)換系統(tǒng)生成的數(shù)據(jù)中止與嘗試讀取或?qū)懭氘a(chǎn)生故障的內(nèi)存。
- 由地址未對齊引起的數(shù)據(jù)中止。
- 如果實施FEAT_MTE2,則由標(biāo)記檢查故障引起的數(shù)據(jù)中止。。
- 所有調(diào)試異常:
(1)、Breakpoint Instruction exceptions.
(2)、Breakpoint exceptions.
(3)、Watchpoint exceptions.
(4)、Vector Catch exceptions.
(5)、Software Step exceptions. - 在支持捕獲浮點異常的實現(xiàn)中,由捕獲的IEEE 浮點異常引起的異常
- 在某些實現(xiàn)中,外部中止。外部中止是失敗的內(nèi)存訪問,包括訪問地址轉(zhuǎn)換期間發(fā)生的內(nèi)存系統(tǒng)的那些部分。
總結(jié)
以上是生活随笔為你收集整理的[ARM异常]-armv8/armv9同步异常的介绍的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [ARM异常]-中断的术语介绍:targ
- 下一篇: Linux Kernel/optee/A