mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 06:25:12 +00:00
target/arm: Make PRIMASK register banked for v8M
Make the PRIMASK register banked if v8M security extensions are enabled. Note that we do not yet implement the functionality of the new AIRCR.PRIS bit (which allows the effect of the NS copy of PRIMASK to be restricted). Backports commit 6d8048341995b31a77dc2e0dcaaf4e3df0e3121a from qemu
This commit is contained in:
parent
c9a7aad4dc
commit
ff3f7811ce
|
@ -436,7 +436,7 @@ typedef struct CPUARMState {
|
|||
uint32_t bfar; /* BusFault Address */
|
||||
unsigned mpu_ctrl; /* MPU_CTRL */
|
||||
int exception;
|
||||
uint32_t primask;
|
||||
uint32_t primask[2];
|
||||
uint32_t faultmask;
|
||||
uint32_t secure; /* Is CPU in Secure state? (not guest visible) */
|
||||
} v7m;
|
||||
|
|
|
@ -8103,7 +8103,7 @@ uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
|
|||
return (env->v7m.control & R_V7M_CONTROL_SPSEL_MASK) ?
|
||||
env->regs[13] : env->v7m.other_sp;
|
||||
case 16: /* PRIMASK */
|
||||
return env->v7m.primask;
|
||||
return env->v7m.primask[env->v7m.secure];
|
||||
case 17: /* BASEPRI */
|
||||
case 18: /* BASEPRI_MAX */
|
||||
return env->v7m.basepri[env->v7m.secure];
|
||||
|
@ -8171,7 +8171,7 @@ void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
|
|||
}
|
||||
break;
|
||||
case 16: /* PRIMASK */
|
||||
env->v7m.primask = val & 1;
|
||||
env->v7m.primask[env->v7m.secure] = val & 1;
|
||||
break;
|
||||
case 17: /* BASEPRI */
|
||||
env->v7m.basepri[env->v7m.secure] = val & 0xff;
|
||||
|
|
Loading…
Reference in a new issue