From bd7d00fc50c9960876dd194ebf0c88889b53e765 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 17 Jun 2016 15:23:46 +0100 Subject: target-arm: Provide hook to tell GICv3 about changes of security state The GICv3 CPU interface needs to know when the CPU it is attached to makes an exception level or mode transition that changes the security state, because whether it is asserting IRQ or FIQ can change depending on these things. Provide a mechanism for letting the GICv3 device register a hook to be called on such changes. Signed-off-by: Peter Maydell Reviewed-by: Shannon Zhao Tested-by: Shannon Zhao Message-id: 1465915112-29272-5-git-send-email-peter.maydell@linaro.org --- target-arm/op_helper.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'target-arm/op_helper.c') diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 35912a1192..73da759206 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -474,6 +474,8 @@ void HELPER(cpsr_write)(CPUARMState *env, uint32_t val, uint32_t mask) void HELPER(cpsr_write_eret)(CPUARMState *env, uint32_t val) { cpsr_write(env, val, CPSR_ERET_MASK, CPSRWriteExceptionReturn); + + arm_call_el_change_hook(arm_env_get_cpu(env)); } /* Access to user mode registers from privileged modes. */ @@ -969,6 +971,8 @@ void HELPER(exception_return)(CPUARMState *env) env->pc = env->elr_el[cur_el]; } + arm_call_el_change_hook(arm_env_get_cpu(env)); + return; illegal_return: -- cgit v1.2.3-55-g7522