From: openocd-gerrit <ope...@us...> - 2024-06-08 08:45:05
|
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 72b39088ee1772a65e74004fdc096db09edf8c0c (commit) from b5e7118048250a4ffc589fd8b82a11de05132d23 (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 72b39088ee1772a65e74004fdc096db09edf8c0c Author: Antonio Borneo <bor...@gm...> Date: Mon Apr 8 17:42:52 2024 +0200 target: reset examine after assert_reset For some target, the API assert_reset() checks if the target has been examined, with target_was_examined(), to perform conditional operations like: - assert adapter's srst; - write some register to catch the reset vector; - invalidate the register cache. Targets created with -defer-examine gets the examine flag reset right before entering in their assert_reset(), disrupting the actions above. For targets created with -defer-examine, move the reset examine after the assert_reset(). Change-Id: If96e7876dcace8905165115292deb93a3e45cb36 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8293 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> diff --git a/src/target/target.c b/src/target/target.c index efc168903..7d4947a6e 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5365,17 +5365,19 @@ COMMAND_HANDLER(handle_target_reset) return ERROR_FAIL; } - if (target->defer_examine) - target_reset_examined(target); - /* determine if we should halt or not. */ target->reset_halt = (a != 0); /* When this happens - all workareas are invalid. */ target_free_all_working_areas_restore(target, 0); /* do the assert */ - if (n->value == NVP_ASSERT) - return target->type->assert_reset(target); + if (n->value == NVP_ASSERT) { + int retval = target->type->assert_reset(target); + if (target->defer_examine) + target_reset_examined(target); + return retval; + } + return target->type->deassert_reset(target); } ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- Main OpenOCD repository |