From 8c1d518232c3105e5599099f41038212250f3798 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Mon, 9 Aug 2021 15:31:10 +0200 Subject: 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 Reviewed-on: https://review.openocd.org/c/openocd/+/6462 Tested-by: jenkins --- src/target/arm_adi_v5.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/target/arm_adi_v5.h') 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); -- cgit v1.1