River008

 

ARMv8异常/中断相关

1. 异常地址保存

ARMv8异常分为同步异常和异步异常,发生异常的时候需要保存异常进入地址到ELR_ELx,同步异常(und/abt等)是当前地址,而异步异常(irq/fiq等)是下一条指令地址,在返回异常现场的时候,可以使用ELR_ELx来恢复PC值。

同步异常,缺页异常对应的底层应该是同步异常吧?

2. 异常级别EL

The Armv8-A architecture defines a set of Exception levels, EL0 to EL3, where:

  1. If ELn is the Exception level, increased values of n indicate increased software execution privilege.
  2. Execution at EL0 is called unprivileged execution.
  3. EL2 provides support for virtualization.
  4. EL3 provides support for switching between two Security states, Secure state and Non-secure state

3. 中断栈

中断栈在init_IRQ->init_irq_stacks时初始化,每个cpu一个。

4. ARMv8 PSTATE(Processor State)

https://developer.arm.com/documentation/den0024/a/ARMv8-Registers/Processor-state

参考:

https://www.daimajiaoliu.com/daima/9ea98b712614005

posted on 2022-09-01 14:46  River008  阅读(142)  评论(0编辑  收藏  举报

导航