aboutsummaryrefslogtreecommitdiff
path: root/src/target/aarch64.c
diff options
context:
space:
mode:
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>2016-10-20 16:23:40 +0200
committerMatthias Welwarsky <matthias.welwarsky@sysgo.com>2017-02-10 14:18:35 +0100
commit9f4b5b509f016a8c78f44d2a668784fa7fc10e3f (patch)
tree3c837d2b7fec74ae4622274baccaea5ee9b9c111 /src/target/aarch64.c
parent0a53bae0ea4007f171802b7d5e65499d4aa18ad0 (diff)
aarch64: discard async aborts on entering debug state
recommended for Corte-A8 cores, not sure if necessary for ARMv8 based cores as well. Change-Id: Ibcb36170c5fac6a6b132de17f734c70a56919f9b Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
Diffstat (limited to 'src/target/aarch64.c')
-rw-r--r--src/target/aarch64.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 1220004e..110f8dca 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -663,11 +663,16 @@ static int aarch64_debug_entry(struct target *target)
/* make sure to clear all sticky errors */
retval = mem_ap_write_atomic_u32(armv8->debug_ap,
armv8->debug_base + CPUV8_DBG_DRCR, DRCR_CSE);
+
+ /* discard async exceptions */
+ if (retval == ERROR_OK)
+ retval = dpm->instr_cpsr_sync(dpm);
+
if (retval != ERROR_OK)
return retval;
/* Examine debug reason */
- armv8_dpm_report_dscr(&armv8->dpm, aarch64->cpudbg_dscr);
+ armv8_dpm_report_dscr(dpm, aarch64->cpudbg_dscr);
/* save address of instruction that triggered the watchpoint? */
if (target->debug_reason == DBG_REASON_WATCHPOINT) {