Jean-Christophe DUBOIS <jcd@tribudubois.net> writes:
One small question/remark:
According to the the "Arm Power State Coordinate Interface" (DEN0022D.b)
document (chapter 5) PSCI calls can only be issued by
"normal world" (EL1 or EL2). Therefore, should we be adding a test for the
current secure state in the arm_is_psci_call() function? This
would prevent calling the built-in Qemu PSCI function if SMC is issued
from secure state.
All that should be handled in:
void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)
which should cause things to be trapped if the CPU is in an invalid
state to execute the SMC instruction. If the exception is a valid SMC we
end up in arm_cpu_do_interrupt where we may divert to
arm_handle_psci_call.