summaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-09-29 18:48:50 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-09-29 18:48:50 +0100
commit2dd081ae7642d54470225ea8c3f5cd4ef62fc732 (patch)
tree5d8e1c33619bba6ebc922a9d6658e12ffab1974e /target-arm
parentdfafd0908820acf68f7c69ab3e0ebe855278d0bb (diff)
downloadqemu-2dd081ae7642d54470225ea8c3f5cd4ef62fc732.tar.gz
target-arm: A64: Correct updates to FAR and ESR on exceptions
Not all exception types update both FAR and ESR. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1411718914-6608-7-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper-a64.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c
index 4be0784c3a..c6ef8e9543 100644
--- a/target-arm/helper-a64.c
+++ b/target-arm/helper-a64.c
@@ -466,18 +466,17 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
env->exception.syndrome);
}
- env->cp15.esr_el[new_el] = env->exception.syndrome;
- env->cp15.far_el[new_el] = env->exception.vaddress;
-
switch (cs->exception_index) {
case EXCP_PREFETCH_ABORT:
case EXCP_DATA_ABORT:
+ env->cp15.far_el[new_el] = env->exception.vaddress;
qemu_log_mask(CPU_LOG_INT, "...with FAR 0x%" PRIx64 "\n",
env->cp15.far_el[new_el]);
- break;
+ /* fall through */
case EXCP_BKPT:
case EXCP_UDEF:
case EXCP_SWI:
+ env->cp15.esr_el[new_el] = env->exception.syndrome;
break;
case EXCP_IRQ:
addr += 0x80;