]> git.sur5r.net Git - openocd/commitdiff
aarch64: clear CTI halt event early at debug entry
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Wed, 1 Mar 2017 15:15:33 +0000 (16:15 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 2 Apr 2017 15:08:18 +0000 (16:08 +0100)
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 <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/4030
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/target/aarch64.c

index 9977c3668d49888aafefeaba5f1edf16fdeddb8c..e647bba13649c99d9a27b3fb359ea84ca570090e 100644 (file)
@@ -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;