|
From: openocd-gerrit <ope...@us...> - 2025-11-08 16:00:54
|
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 ab22b0bf8f23924d8c76d3affd9e11528ba18438 (commit)
from 2bb3e52436247e445e9cf0d7e18a6962688dff40 (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 ab22b0bf8f23924d8c76d3affd9e11528ba18438
Author: Antonio Borneo <bor...@gm...>
Date: Mon Nov 3 11:18:02 2025 +0100
target: cortex-m: don't query cache on hla targets
The cache handling code is written and optimized for dap queuing.
On hla targets it causes a segmentation fault due to uninitialized
AP pointer still set to NULL.
While it's possible to modify the code to cope with hla targets,
this would lower the OpenOCD performance on modern adapters.
Make cache handling not available on hla targets.
Reported-by: Tomas Vanek <va...@fb...>
Change-Id: Ief4499caedcee477b9517a7ad4597d06b5cb061e
Signed-off-by: Antonio Borneo <bor...@gm...>
Fixes: 04da6e2c6246 ("target: cortex-m: add support for armv8m caches")
Reviewed-on: https://review.openocd.org/c/openocd/+/9202
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index 21b611b29..9f0b6284b 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -3007,10 +3007,12 @@ int cortex_m_examine(struct target *target)
cortex_m->fp_num_code,
cortex_m->dwt_num_comp);
- retval = armv7m_identify_cache(target);
- if (retval != ERROR_OK) {
- LOG_ERROR("Cannot detect cache");
- return retval;
+ if (!armv7m->is_hla_target) {
+ retval = armv7m_identify_cache(target);
+ if (retval != ERROR_OK) {
+ LOG_ERROR("Cannot detect cache");
+ return retval;
+ }
}
}
-----------------------------------------------------------------------
Summary of changes:
src/target/cortex_m.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|