各位专家:
目前正在学习ARMv8 Arch Ref Manual.
D1.10.2 Exception vectors有点疑惑:
1. Table D1-6 定义了一个Vector Table应该具有的items
我们假定一个ARMv8 SOC实现了4个EL:EL0 / EL1 / EL2 / EL3
根据ARMv8 ARM手册:每一个EL,都有自己对应的Vector Table.
那么:
EL0 / EL1 / EL2 / EL3 :它们各自的Vector Table,应该是什么样的?
比如:
(1) EL0的Vector Table:应该有2个Block :
Current Exception level with SP_EL0
Current Exception level with SP_ELx, x>0
(2) EL1的Vector Table:应该有4个Block :
EL0 that is using AARCH64
EL0 that is using AARCH32
我的理解对吗?
> 1. Exception Table中的第3 block / 第4 block,应该只有一项存在吧> 比如:> EL1 AArch64存在,那么"EL1 AArch32"就不需要建.
In general, both blocks are needed.
> 因为对于给定平台:EL1的执行态,应该是确定的吧.
No.An AArch64 hypervisor may host a mixture of AArch64 and AArch32 OSes; an AArch64 OS may run a mixture of AArch32 and AArch64 applications. In those case, you need both blocks.
> 2. 根据ARMv8 ARM手册C2.1.4节:> HVC : Target_EL = EL2> SMC :Target_EL = EL3> SVC : Target_EL = EL1> 我的问题是:> 这3个exception,它们的Target_EL,可以通过Software改为其它吗?
No. Those instructions have specific functions:HVC: hypervisor callSMC: secure monitor callSVC: supervisor call (requesting OS functions)
So their target EL is fixed.