From: Antonio Borneo Date: Thu, 25 May 2023 08:49:20 +0000 (+0200) Subject: target: armv8: fix support of pointer authentication X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=4a57f3ebb21db6b89b0ceb9df34d32157731ead2 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 Fixes: d0436b0cdabb ("armv8: Add support of pointer authentication") Reviewed-on: https://review.openocd.org/c/openocd/+/7712 Tested-by: jenkins Reviewed-by: Koudai Iwahori --- diff --git a/src/target/armv8.c b/src/target/armv8.c index ffed263a9f..e647c3b4cb 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;