aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorMichael Davidsaver <mdavidsaver@gmail.com>2017-02-28 12:08:17 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-02-28 12:08:17 +0000
commita73c98e159d18155445d29b6044be6ad49fd802f (patch)
treeae3ad5aa25517336f2519ac4a21f866e91efe59a /target
parent7c14b3ac072c48614ca888e101d17ee64312c89f (diff)
downloadqemu-a73c98e159d18155445d29b6044be6ad49fd802f.zip
qemu-a73c98e159d18155445d29b6044be6ad49fd802f.tar.gz
qemu-a73c98e159d18155445d29b6044be6ad49fd802f.tar.bz2
armv7m: Escalate exceptions to HardFault if necessary
The v7M exception architecture requires that if a synchronous exception cannot be taken immediately (because it is disabled or at too low a priority) then it should be escalated to HardFault (and the HardFault exception is then taken). Implement this escalation logic. Signed-off-by: Michael Davidsaver <mdavidsaver@gmail.com> [PMM: extracted from another patch] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/arm/helper.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c
index bcedb4a..2fc6802 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -6106,8 +6106,6 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
/* For exceptions we just mark as pending on the NVIC, and let that
handle it. */
- /* TODO: Need to escalate if the current priority is higher than the
- one we're raising. */
switch (cs->exception_index) {
case EXCP_UDEF:
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);