From 332d66c75a89516750726f1a9d2b65a624037770 Mon Sep 17 00:00:00 2001 From: Matthias Welwarsky Date: Wed, 1 Mar 2017 16:15:33 +0100 Subject: [PATCH] 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 --- src/target/aarch64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/target/aarch64.c b/src/target/aarch64.c index 9977c3668d..e647bba136 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; -- 2.30.2