target-arm: Fix "no 64-bit EL2" assumption in arm_excp_unmasked()
commit7cd6de3bb1ca55dfa8f53fb9894803eb33f497b3
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Oct 2015 12:00:50 +0000 (27 12:00 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Oct 2015 12:00:50 +0000 (27 12:00 +0000)
tree39a45000cac3c751803a66773855c8d6fce25e19
parent7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278
target-arm: Fix "no 64-bit EL2" assumption in arm_excp_unmasked()

The code in arm_excp_unmasked() suppresses the ability of PSTATE.AIF
to mask exceptions from a lower EL targeting EL2 or EL3 if the
CPU is 64-bit. This is correct for a target of EL3, but not correct
for targeting EL2. Further, we go to some effort to calculate
scr and hcr values which are not used at all for the 64-bit CPU
case.

Rearrange the code to correctly implement the 64-bit CPU logic
and keep the hcr/scr calculations in the 32-bit CPU codepath.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1444327729-4120-1-git-send-email-peter.maydell@linaro.org
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
target-arm/cpu.h