mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
7c14b3ac07
commit
a73c98e159
2 changed files with 53 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue