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: d0436b0cda
("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>
This commit is contained in:
parent
78688fea98
commit
4a57f3ebb2
|
@ -1682,7 +1682,7 @@ struct reg_cache *armv8_build_reg_cache(struct target *target)
|
||||||
LOG_ERROR("unable to allocate reg type list");
|
LOG_ERROR("unable to allocate reg type list");
|
||||||
|
|
||||||
if (i == ARMV8_PAUTH_CMASK || i == ARMV8_PAUTH_DMASK)
|
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;
|
arm->cpsr = reg_list + ARMV8_XPSR;
|
||||||
|
|
Loading…
Reference in New Issue