mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 09:08:25 +00:00
target/arm: Enable API, APK bits in SCR, HCR
These bits become writable with the ARMv8.3-PAuth extension. Backports commit ef682cdb4aded5c65a018e175482e875de66059d from qemu
This commit is contained in:
parent
0dd5bf84fc
commit
50cf5634da
1 changed files with 6 additions and 0 deletions
|
@ -1655,6 +1655,9 @@ static void scr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)
|
|||
if (cpu_isar_feature(aa64_lor, cpu)) {
|
||||
valid_mask |= SCR_TLOR;
|
||||
}
|
||||
if (cpu_isar_feature(aa64_pauth, cpu)) {
|
||||
valid_mask |= SCR_API | SCR_APK;
|
||||
}
|
||||
|
||||
/* Clear all-context RES0 bits. */
|
||||
value &= valid_mask;
|
||||
|
@ -4023,6 +4026,9 @@ static void hcr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)
|
|||
if (cpu_isar_feature(aa64_lor, cpu)) {
|
||||
valid_mask |= HCR_TLOR;
|
||||
}
|
||||
if (cpu_isar_feature(aa64_pauth, cpu)) {
|
||||
valid_mask |= HCR_API | HCR_APK;
|
||||
}
|
||||
|
||||
/* Clear RES0 bits. */
|
||||
value &= valid_mask;
|
||||
|
|
Loading…
Reference in a new issue