From: OpenOCD-Gerrit <ope...@us...> - 2020-03-12 09:49:16
|
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 afe899f938a8edb3657c9455fc5caefcaef7e65f (commit) from a8b1bd8376ad30e8ffe7d4d87ed0b041d7adbe76 (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 afe899f938a8edb3657c9455fc5caefcaef7e65f Author: Matthias Welwarsky <mat...@sy...> Date: Thu Apr 11 10:22:27 2019 +0200 cortex_a: warn on broken debug_base setting A common problem with target configurations appears to be broken debug base address configuration. ARM DDI0406C.d specifies in App. D, 1.4.1, that bit 31 of the debug base address serves as identification of an external debugger, as opposed to an internal access to memory mapped debug registers by the CPU. External accesses are treated as privileged and require no debug authentification via the lock access register. Sometimes the base address of a debug component is wrong even in the targets' ROM table. In this case, the correct base address must be specified using the -dbgbase argument when creating the target. This patch adds a warning when bit 31 of the debug base address is not set, as a hint to the user. Change-Id: I9c41d85a138123c657ef655e3436a2aa39249dcc Signed-off-by: Matthias Welwarsky <mat...@sy...> Reviewed-on: http://openocd.zylin.com/5105 Tested-by: jenkins Reviewed-by: Tommy Vestermark <to...@ve...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 8773ea160..a79b0b906 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -2718,6 +2718,10 @@ static int cortex_a_examine_first(struct target *target) } else armv7a->debug_base = target->dbgbase; + if ((armv7a->debug_base & (1UL<<31)) == 0) + LOG_WARNING("Debug base address for target %s has bit 31 set to 0. Access to debug registers will likely fail!\n" + "Please fix the target configuration.", target_name(target)); + retval = mem_ap_read_atomic_u32(armv7a->debug_ap, armv7a->debug_base + CPUDBG_DIDR, &didr); if (retval != ERROR_OK) { ----------------------------------------------------------------------- Summary of changes: src/target/cortex_a.c | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- Main OpenOCD repository |