diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-08-14 23:56:12 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-06-24 21:37:44 +0000 |
commit | 3f4bc6ce7f5c5a619590c3cc05a74d6bff6a124f (patch) | |
tree | 354f852c639d9cede0d208ccf397e55d245561c8 /src/target/mem_ap.c | |
parent | 72fb88613f02f2c9336426f78312ec2b1ad6ba3f (diff) | |
download | riscv-openocd-3f4bc6ce7f5c5a619590c3cc05a74d6bff6a124f.zip riscv-openocd-3f4bc6ce7f5c5a619590c3cc05a74d6bff6a124f.tar.gz riscv-openocd-3f4bc6ce7f5c5a619590c3cc05a74d6bff6a124f.tar.bz2 |
adiv6: use struct adiv5_ap->ap_num to contain the AP base address
ADIv5 DAP can only have 256 AP, while ADIv6 can provide till
2**40 (1,099,511,627,776) AP per DAP.
Reuse the field ap_num in struct adiv5_ap, currently used on ADIv5
to hold the ADIv5 AP number (apsel), to contain the ADIv6 AP base
address.
Convert struct adiv5_ap->ap_num to 64 bit and initialize it to
DP_APSEL_INVALID for unused AP.
Restrict dap_find_get_ap() to ADIv5 only. To be enhanced.
On ADIv6, let dap_get_ap() return an already allocated AP, or
allocate and return an unused AP.
Add function is_ap_num_valid() and use it.
Change-Id: Ib2fe8c7ec0d08393cd91c29fdac5d632dfc1e438
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6461
Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Tested-by: jenkins
Diffstat (limited to 'src/target/mem_ap.c')
-rw-r--r-- | src/target/mem_ap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/mem_ap.c b/src/target/mem_ap.c index 86bb29f..cf5aa54 100644 --- a/src/target/mem_ap.c +++ b/src/target/mem_ap.c @@ -29,7 +29,7 @@ struct mem_ap { int common_magic; struct adiv5_dap *dap; struct adiv5_ap *ap; - int ap_num; + uint64_t ap_num; }; static int mem_ap_target_create(struct target *target, Jim_Interp *interp) |