From: Matthias Welwarsky Date: Wed, 1 Mar 2017 15:15:33 +0000 (+0100) Subject: aarch64: clear CTI halt event early at debug entry X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=332d66c75a89516750726f1a9d2b65a624037770;p=openocd aarch64: clear CTI halt event early at debug entry The halt event was left pending in the CTI, better to clear it immediately after debug entry. Change-Id: I6002f862681baf98769e3c73332a7f7f0ef938c1 Signed-off-by: Matthias Welwarsky Reviewed-on: http://openocd.zylin.com/4030 Tested-by: jenkins Reviewed-by: Paul Fertser --- diff --git a/src/target/aarch64.c b/src/target/aarch64.c index 9977c366..e647bba1 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -923,6 +923,8 @@ static int aarch64_debug_entry(struct target *target) if (retval == ERROR_OK) retval = mem_ap_read_atomic_u32(armv8->debug_ap, armv8->debug_base + CPUV8_DBG_DSCR, &dscr); + if (retval == ERROR_OK) + retval = arm_cti_ack_events(armv8->cti, CTI_TRIG(HALT)); if (retval != ERROR_OK) return retval;