aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Goehring <dgoehrin@os.amperecomputing.com>2023-06-06 14:44:13 -0600
committerAntonio Borneo <borneo.antonio@gmail.com>2023-08-12 16:47:14 +0000
commit307a3ca10996283697356a4835f3152dd00a9a0c (patch)
tree76127472843216383469ef75e28073f37b6e83a3 /src
parent3c558fda4bf09b5fd612f05a86da7ad5c47630bb (diff)
downloadriscv-openocd-307a3ca10996283697356a4835f3152dd00a9a0c.zip
riscv-openocd-307a3ca10996283697356a4835f3152dd00a9a0c.tar.gz
riscv-openocd-307a3ca10996283697356a4835f3152dd00a9a0c.tar.bz2
target/aarch64: add missing aarch64_poll() calls
Add missing aarch64_poll() calls to ensure the event TARGET_EVENT_HALTED is called when necessary. This is needed with the poller update introduced in commit 95603fae18f8 ("openocd: revert workarounds for 'expr' syntax change") Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com> Change-Id: I6e91f1b6bc1f0d16e6f0eb76fc67d20111e3afd2 Reviewed-on: https://review.openocd.org/c/openocd/+/7737 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/target/aarch64.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/target/aarch64.c b/src/target/aarch64.c
index 5d8a652..d25c7d3 100644
--- a/src/target/aarch64.c
+++ b/src/target/aarch64.c
@@ -1091,6 +1091,7 @@ static int aarch64_step(struct target *target, int current, target_addr_t addres
struct armv8_common *armv8 = target_to_armv8(target);
struct aarch64_common *aarch64 = target_to_aarch64(target);
int saved_retval = ERROR_OK;
+ int poll_retval;
int retval;
uint32_t edecr;
@@ -1173,6 +1174,8 @@ static int aarch64_step(struct target *target, int current, target_addr_t addres
if (retval == ERROR_TARGET_TIMEOUT)
saved_retval = aarch64_halt_one(target, HALT_SYNC);
+ poll_retval = aarch64_poll(target);
+
/* restore EDECR */
retval = mem_ap_write_atomic_u32(armv8->debug_ap,
armv8->debug_base + CPUV8_DBG_EDECR, edecr);
@@ -1189,6 +1192,9 @@ static int aarch64_step(struct target *target, int current, target_addr_t addres
if (saved_retval != ERROR_OK)
return saved_retval;
+ if (poll_retval != ERROR_OK)
+ return poll_retval;
+
return ERROR_OK;
}
@@ -2695,6 +2701,9 @@ static int aarch64_examine(struct target *target)
if (retval == ERROR_OK)
retval = aarch64_init_debug_access(target);
+ if (retval == ERROR_OK)
+ retval = aarch64_poll(target);
+
return retval;
}