aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2023-05-25 10:49:20 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2023-06-02 20:57:05 +0000
commit4a57f3ebb21db6b89b0ceb9df34d32157731ead2 (patch)
treec92dc2f6f5a4713b25da0178f3c31fa2c348c685
parent78688fea984b69d1986b6b730ff2935668cc9208 (diff)
downloadriscv-openocd-4a57f3ebb21db6b89b0ceb9df34d32157731ead2.zip
riscv-openocd-4a57f3ebb21db6b89b0ceb9df34d32157731ead2.tar.gz
riscv-openocd-4a57f3ebb21db6b89b0ceb9df34d32157731ead2.tar.bz2
target: armv8: fix support of pointer authentication
The registers pauth_dmask and pauth_cmask are not accessible in AARCH32 mode. Tagging them as 'hidden' is not enough and triggers error: Failed to read pauth_dmask register while halting the core. Tag the pauth registers as not existing, unless required by user. Note: for non existing registers there should be no need to allocate their register cache. Let's keep this for a further improvement. Change-Id: Iaa0d006a3d8ee611ee93333ed49a8615a6c94276 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: d0436b0cdabb ("armv8: Add support of pointer authentication") Reviewed-on: https://review.openocd.org/c/openocd/+/7712 Tested-by: jenkins Reviewed-by: Koudai Iwahori <koudai@google.com>
-rw-r--r--src/target/armv8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/armv8.c b/src/target/armv8.c
index ffed263..e647c3b 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -1682,7 +1682,7 @@ struct reg_cache *armv8_build_reg_cache(struct target *target)
LOG_ERROR("unable to allocate reg type list");
if (i == ARMV8_PAUTH_CMASK || i == ARMV8_PAUTH_DMASK)
- reg_list[i].hidden = !armv8->enable_pauth;
+ reg_list[i].exist = armv8->enable_pauth;
}
arm->cpsr = reg_list + ARMV8_XPSR;