[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 10/26] armv7m: auto-clear FAULTMASK
From: |
Michael Davidsaver |
Subject: |
[Qemu-devel] [PATCH v2 10/26] armv7m: auto-clear FAULTMASK |
Date: |
Wed, 2 Dec 2015 19:18:37 -0500 |
on return from all exceptions other than NMI
---
target-arm/helper.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index d1ca011..b6ec761 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -5379,8 +5379,13 @@ static void do_v7m_exception_exit(CPUARMState *env)
uint32_t xpsr;
type = env->regs[15];
- if (env->v7m.exception != 0)
+ if (env->v7m.exception != ARMV7M_EXCP_NMI) {
+ /* Auto-clear FAULTMASK on return from other than NMI */
+ env->daif &= ~PSTATE_F;
+ }
+ if (env->v7m.exception != 0) {
armv7m_nvic_complete_irq(env->nvic, env->v7m.exception);
+ }
/* Switch to the target stack. */
switch_v7m_sp(env, (type & 4) != 0);
--
2.1.4
- Re: [Qemu-devel] [PATCH v2 06/26] armv7m: fix I and F flag handling, (continued)
[Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 07/26] armv7m: simpler/faster exception start, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 10/26] armv7m: auto-clear FAULTMASK,
Michael Davidsaver <=
[Qemu-devel] [PATCH v2 09/26] armv7m: implement CFSR, HFSR, BFAR, and MMFAR, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 11/26] arm: gic: Remove references to NVIC, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 12/26] armv7m: check exception return consistency, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 14/26] armv7m: prevent unprivileged write to STIR, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 13/26] armv7m: implement CCR, Michael Davidsaver, 2015/12/02