|
From: openocd-gerrit <ope...@us...> - 2025-11-30 07:39:45
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 37dcf4359bd22025aaa809a8559b129ed6607195 (commit)
from a1c7cd4fef95ef85dc87c6ebd66e3e3cc5dcda9d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 37dcf4359bd22025aaa809a8559b129ed6607195
Author: Tomas Vanek <va...@fb...>
Date: Fri Nov 21 09:27:20 2025 +0100
target/cortex_a: emit 'resumed' event for all SMP cores
In a SMP configuration 'resumed' event was emitted only for
the active core, in contradiction to 'halted' event, which
gets emitted for all cores from the SMP group:
> resume
target event 3 (resume-start) for core stm32mp15x.cpu0
target event 2 (resumed) for core stm32mp15x.cpu0
target event 4 (resume-end) for core stm32mp15x.cpu0
target event 7 (gdb-start) for core stm32mp15x.cpu0
> halt
target event 0 (gdb-halt) for core stm32mp15x.cpu1
target event 1 (halted) for core stm32mp15x.cpu1
target event 0 (gdb-halt) for core stm32mp15x.cpu0
target event 1 (halted) for core stm32mp15x.cpu0
target event 8 (gdb-end) for core stm32mp15x.cpu0
Emit 'resumed' event in cortex_a_restore_smp().
While on it replace adding the returned errors together
with the proper error handling.
Change-Id: I9debef0884519cde767707f78f163b136ecc7aa5
Signed-off-by: Tomas Vanek <va...@fb...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9244
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index a9c034b55..3d8603a4b 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -968,7 +968,7 @@ static int cortex_a_internal_restart(struct target *target)
static int cortex_a_restore_smp(struct target *target, bool handle_breakpoints)
{
- int retval = 0;
+ int retval = ERROR_OK;
struct target_list *head;
target_addr_t address;
@@ -977,9 +977,17 @@ static int cortex_a_restore_smp(struct target *target, bool handle_breakpoints)
if ((curr != target) && (curr->state != TARGET_RUNNING)
&& target_was_examined(curr)) {
/* resume current address , not in step mode */
- retval += cortex_a_internal_restore(curr, true, &address,
+ int retval2 = cortex_a_internal_restore(curr, true, &address,
handle_breakpoints, false);
- retval += cortex_a_internal_restart(curr);
+
+ if (retval2 == ERROR_OK)
+ retval2 = cortex_a_internal_restart(curr);
+
+ if (retval2 == ERROR_OK)
+ target_call_event_callbacks(curr, TARGET_EVENT_RESUMED);
+
+ if (retval == ERROR_OK)
+ retval = retval2; // save the first error
}
}
return retval;
-----------------------------------------------------------------------
Summary of changes:
src/target/cortex_a.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|