[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 19/26] armv7m: mpu not allowed to map exception r
From: |
Michael Davidsaver |
Subject: |
[Qemu-devel] [PATCH v2 19/26] armv7m: mpu not allowed to map exception return codes |
Date: |
Wed, 2 Dec 2015 19:18:46 -0500 |
Always pass these through to be caught be by the
unassigned handler.
---
target-arm/helper.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index e42f6d0..a5adf2d 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -7106,6 +7106,15 @@ static bool get_phys_addr_pmsav7(CPUARMState *env,
uint32_t address,
*phys_ptr = address;
*prot = 0;
+ /* Magic exception codes returns always pass through the MPU
+ * to be trapped later in arm_v7m_unassigned_access()
+ */
+ if (IS_M(env) && env->v7m.exception != 0 && address >= 0xfffffff0) {
+ *prot = PAGE_EXEC;
+ *fsr = 0;
+ return false;
+ }
+
if (regime_translation_disabled(env, mmu_idx)) { /* MPU disabled */
get_phys_addr_pmsav7_default(env, mmu_idx, address, prot);
} else { /* MPU enabled */
--
2.1.4
- [Qemu-devel] [PATCH v2 17/26] armv7m: mpu background miss is perm fault, (continued)
- [Qemu-devel] [PATCH v2 17/26] armv7m: mpu background miss is perm fault, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 23/26] qom: add cpu_generic_init_unrealized(), Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 25/26] armv7m: remove extra cpu_reset(), Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 24/26] armv7m: split armv7m_init in two parts, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 21/26] armv7m: CONTROL<1> handling, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 26/26] armv7m: decide whether faults are MemManage or BusFault, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 08/26] armv7m: rewrite NVIC, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 19/26] armv7m: mpu not allowed to map exception return codes,
Michael Davidsaver <=
- [Qemu-devel] [PATCH v2 20/26] armv7m: observable initial register state, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 16/26] armv7m: add some mpu debugging prints, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 15/26] armv7m: add MPU to cortex-m3 and cortex-m4, Michael Davidsaver, 2015/12/02
- [Qemu-devel] [PATCH v2 22/26] armv7m: priority field mask, Michael Davidsaver, 2015/12/02
- Re: [Qemu-devel] [PATCH v2 00/26] armv7m: exception handling, MPU, and more, Peter Maydell, 2015/12/17