aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm_adi_v5.h
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-08-09 15:31:10 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2022-06-24 21:38:08 +0000
commit8c1d518232c3105e5599099f41038212250f3798 (patch)
treef0282c8ec963d4684e9b54b4c6754106c407bb89 /src/target/arm_adi_v5.h
parent3f4bc6ce7f5c5a619590c3cc05a74d6bff6a124f (diff)
downloadriscv-openocd-8c1d518232c3105e5599099f41038212250f3798.zip
riscv-openocd-8c1d518232c3105e5599099f41038212250f3798.tar.gz
riscv-openocd-8c1d518232c3105e5599099f41038212250f3798.tar.bz2
arm_adi_v5: add option 'root' to 'dap info' command
On ADIv6 the system root ROM table is found by reading the DAP DP registers BASEPTR0 and BASEPTR1. Add option 'root' to the commands 'dap info' to let it retrieve the system root ROM table's AP from DAP DP, then use such AP for following dump. Change-Id: I1789457a005faa3870c5d14f763378d2f6a5f095 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6462 Tested-by: jenkins
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r--src/target/arm_adi_v5.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 534dd3b..8fb5747 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -86,6 +86,9 @@
#define DP_DPIDR1_ASIZE_MASK (0x7F)
#define DP_DPIDR1_ERRMODE BIT(7)
+/* Fields of register DP_BASEPTR0 */
+#define DP_BASEPTR0_VALID BIT(0)
+
/* Fields of the DP's CTRL/STAT register */
#define CORUNDETECT (1UL << 0)
#define SSTICKYORUN (1UL << 1)
@@ -692,6 +695,9 @@ int mem_ap_init(struct adiv5_ap *ap);
/* Invalidate cached DP select and cached TAR and CSW of all APs */
void dap_invalidate_cache(struct adiv5_dap *dap);
+/* read ADIv6 baseptr register */
+int adiv6_dap_read_baseptr(struct command_invocation *cmd, struct adiv5_dap *dap, target_addr_t *baseptr);
+
/* test if ap_num is valid, based on current knowledge of dap */
bool is_ap_num_valid(struct adiv5_dap *dap, uint64_t ap_num);