target/arm: Make MMFAR banked for v8M

Make the MMFAR register banked if v8M security extensions are
enabled.

Backports commit c51a5cfc9fae82099028eb12cb1d064ee07f348e from qemu
This commit is contained in:
Peter Maydell 2018-03-04 21:10:45 -05:00 committed by Lioncash
parent 4b24f6d87b
commit 74c66cc2a9
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7
2 changed files with 3 additions and 3 deletions

View File

@ -432,7 +432,7 @@ typedef struct CPUARMState {
uint32_t cfsr; /* Configurable Fault Status */
uint32_t hfsr; /* HardFault Status */
uint32_t dfsr; /* Debug Fault Status Register */
uint32_t mmfar; /* MemManage Fault Address */
uint32_t mmfar[2]; /* MemManage Fault Address */
uint32_t bfar; /* BusFault Address */
unsigned mpu_ctrl[2]; /* MPU_CTRL */
int exception;

View File

@ -5644,10 +5644,10 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
case EXCP_DATA_ABORT:
env->v7m.cfsr |=
(R_V7M_CFSR_DACCVIOL_MASK | R_V7M_CFSR_MMARVALID_MASK);
env->v7m.mmfar = env->exception.vaddress;
env->v7m.mmfar[env->v7m.secure] = env->exception.vaddress;
qemu_log_mask(CPU_LOG_INT,
"...with CFSR.DACCVIOL and MMFAR 0x%x\n",
env->v7m.mmfar);
env->v7m.mmfar[env->v7m.secure]);
break;
}
// Unicorn: commented out