unicorn/qemu/target/arm
Peter Maydell e1349f817a
target/arm: Split "get pending exception info" from "acknowledge it"
Currently armv7m_nvic_acknowledge_irq() does three things:
* make the current highest priority pending interrupt active
* return a bool indicating whether that interrupt is targeting
Secure or NonSecure state
* implicitly tell the caller which is the highest priority
pending interrupt by setting env->v7m.exception

We need to split these jobs, because v7m_exception_taken()
needs to know whether the pending interrupt targets Secure so
it can choose to stack callee-saves registers or not, but it
must not make the interrupt active until after it has done
that stacking, in case the stacking causes a derived exception.
Similarly, it needs to know the number of the pending interrupt
so it can read the correct vector table entry before the
interrupt is made active, because vector table reads might
also cause a derived exception.

Create a new armv7m_nvic_get_pending_irq_info() function which simply
returns information about the highest priority pending interrupt, and
use it to rearrange the v7m_exception_taken() code so we don't
acknowledge the exception until we've done all the things which could
possibly cause a derived exception.

Backports part of commit 6c9485188170e11ad31ce477c8ce200b8e8ce59d from qemu
2018-03-07 08:12:35 -05:00
..
arm-powerctl.c ARM: Factor out ARM on/off PSCI control functions 2018-03-01 23:31:47 -05:00
arm-powerctl.h ARM: Factor out ARM on/off PSCI control functions 2018-03-01 23:31:47 -05:00
arm_ldst.h Fix Thumb-1 BE32 execution and disassembly. 2018-03-02 00:20:11 -05:00
cpu-qom.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
cpu.c accel/tcg: add size paremeter in tlb_fill() 2018-03-06 10:56:34 -05:00
cpu.h target/arm: Split "get pending exception info" from "acknowledge it" 2018-03-07 08:12:35 -05:00
cpu64.c target-arm: Enable EL2 feature bit on A53 and A57 2018-03-01 23:36:44 -05:00
crypto_helper.c target/arm: Use pointers in crypto helpers 2018-03-06 10:10:06 -05:00
helper-a64.c target/arm: Fix stlxp for aarch64_be 2018-03-06 08:48:12 -05:00
helper-a64.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
helper.c target/arm: Split "get pending exception info" from "acknowledge it" 2018-03-07 08:12:35 -05:00
helper.h target/arm: Use pointers in neon tbl helper 2018-03-06 10:20:21 -05:00
internals.h target/arm: Handle page table walk load failures correctly 2018-03-06 08:55:08 -05:00
iwmmxt_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
kvm-consts.h arm: better stub version for MISMATCH_CHECK 2018-03-02 00:13:45 -05:00
Makefile.objs ARM: Factor out ARM on/off PSCI control functions 2018-03-01 23:31:47 -05:00
neon_helper.c target/arm: Use pointers in neon zip/uzp helpers 2018-03-06 10:17:51 -05:00
op_addsub.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
op_helper.c accel/tcg: add size paremeter in tlb_fill() 2018-03-06 10:56:34 -05:00
psci.c fix WFI/WFE length in syndrome register 2018-03-05 11:21:51 -05:00
translate-a64.c target/arm: Use vector infrastructure for aa64 orr/bic immediate 2018-03-06 16:17:42 -05:00
translate.c target/arm: Use pointers in neon tbl helper 2018-03-06 10:20:21 -05:00
translate.h target/arm: Mark disas_set_insn_syndrome inline 2018-03-06 09:20:04 -05:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
unicorn_aarch64.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
unicorn_arm.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00