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
95603fae18
("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>
This commit is contained in:
parent
3c558fda4b
commit
307a3ca109
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue