From: openocd-gerrit <ope...@us...> - 2025-03-29 18:27:53
|
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 f885a8d76c96ec94e2f7a4c4fadd57dfe384a8ac (commit) from a9fa3392670659dfd558d8733911ffce9538e2d2 (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 f885a8d76c96ec94e2f7a4c4fadd57dfe384a8ac Author: Adrien Grassein <agr...@na...> Date: Thu Jan 18 11:54:15 2024 +0100 target/aarch64: Cleanup on exit Restore target configuration on exit so that OpenOCD get correct values when restarting. Change-Id: I8cbba1fdae1d3c4a580197b7a97691443780ed06 Signed-off-by: Adrien Grassein <agr...@na...> Signed-off-by: Adrien Charruel <ach...@na...> Reviewed-on: https://review.openocd.org/c/openocd/+/8654 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/aarch64.c b/src/target/aarch64.c index 609965ba5..ce7808e3a 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -2857,6 +2857,14 @@ static void aarch64_deinit_target(struct target *target) struct aarch64_common *aarch64 = target_to_aarch64(target); struct armv8_common *armv8 = &aarch64->armv8_common; struct arm_dpm *dpm = &armv8->dpm; + uint64_t address; + + if (target->state == TARGET_HALTED) { + // Restore the previous state of the target (gp registers, MMU, caches, etc) + int retval = aarch64_restore_one(target, true, &address, false, false); + if (retval != ERROR_OK) + LOG_TARGET_ERROR(target, "Failed to restore target state"); + } if (armv8->debug_ap) dap_put_ap(armv8->debug_ap); ----------------------------------------------------------------------- Summary of changes: src/target/aarch64.c | 8 ++++++++ 1 file changed, 8 insertions(+) hooks/post-receive -- Main OpenOCD repository |