target-arm: Fix wrong AArch64 entry offset for EL2/EL3 target
commit3d6f761713745dfed7d2ccfe98077d213a6a6eba
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Jan 2016 14:15:08 +0000 (21 14:15 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Jan 2016 14:15:08 +0000 (21 14:15 +0000)
treebc80a6238732a84c52b406a43e730eb34ec265d2
parent904c04de2e1b425e7bc8c4ce2fae3d652eeed242
target-arm: Fix wrong AArch64 entry offset for EL2/EL3 target

The entry offset when taking an exception to AArch64 from a lower
exception level may be 0x400 or 0x600. 0x400 is used if the
implemented exception level immediately lower than the target level
is using AArch64, and 0x600 if it is using AArch32. We were
incorrectly implementing this as checking the exception level
that the exception was taken from. (The two can be different if
for example we take an exception from EL0 to AArch64 EL3; we should
in this case be checking EL2 if EL2 is implemented, and EL1 if
EL2 is not implemented.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
target-arm/helper.c