|
From: openocd-gerrit <ope...@us...> - 2023-04-30 14:46:56
|
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 0bb0056abc269ed14b04cbb1d768fb0281e64225 (commit)
from 91bd4313444c5a949ce49d88ab487608df7d6c37 (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 0bb0056abc269ed14b04cbb1d768fb0281e64225
Author: Julien Massot <jul...@io...>
Date: Wed Jan 12 14:10:36 2022 +0100
target:armv8: aarch32 do not try to restore same EL
While debugging a Cortex-R52 OpenOCD fail to restore context
on line
retval = dpm->instr_write_data_r0(dpm,
ARMV8_MSR_GP_xPSR_T1(1, 0, 15), cpsr);
which trigger this exception:
aarch64.c:1206 aarch64_restore_context(): r8a779a0.r52
armv8_dpm.c:560 armv8_dpm_modeswitch(): restoring mode, cpsr = 0x0000011f
1262753 armv8_dpm.c:598 armv8_dpm_modeswitch(): target_el = 1, last_el = 1
armv8_dpm.c:611 armv8_dpm_modeswitch(): SPSR = 0x0000011f
armv8_dpm.c:260 dpmv8_exec_opcode(): Opcode 0x8f00f390, DSCR.ERR=1, DSCR.EL=1
and finally OpenOCD doesn't succeed to restore the processor.
This check 'dpm->last_el != target_el' exist for aarch64,
so might be correct for aarch32 too.
Signed-off-by: Julien Massot <jul...@io...>
Change-Id: I41d1006233251dcaf6d69bda580488b204b7eb63
Reviewed-on: https://review.openocd.org/c/openocd/+/6807
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/armv8_dpm.c b/src/target/armv8_dpm.c
index f40beb847..fcd4d5971 100644
--- a/src/target/armv8_dpm.c
+++ b/src/target/armv8_dpm.c
@@ -587,6 +587,9 @@ int armv8_dpm_modeswitch(struct arm_dpm *dpm, enum arm_mode mode)
}
LOG_DEBUG("target_el = %i, last_el = %i", target_el, dpm->last_el);
+ if (dpm->last_el == target_el)
+ return ERROR_OK; /* nothing to do */
+
if (target_el > dpm->last_el) {
retval = dpm->instr_execute(dpm,
armv8_opcode(armv8, ARMV8_OPC_DCPS) | target_el);
-----------------------------------------------------------------------
Summary of changes:
src/target/armv8_dpm.c | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|