[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 15/19] nvic: Handle v8M changes in nv
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 15/19] nvic: Handle v8M changes in nvic_exec_prio() |
Date: |
Wed, 20 Sep 2017 12:21:55 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/12/2017 01:14 PM, Peter Maydell wrote:
> Update nvic_exec_prio() to support the v8M changes:
> * BASEPRI, FAULTMASK and PRIMASK are all banked
> * AIRCR.PRIS can affect NS priorities
> * AIRCR.BFHFNMINS affects FAULTMASK behaviour
>
> These changes mean that it's no longer possible to
> definitely say that if FAULTMASK is set it overrides
> PRIMASK, and if PRIMASK is set it overrides BASEPRI
> (since if PRIMASK_NS is set and AIRCR.PRIS is set then
> whether that 0x80 priority should take effect or the
> priority in BASEPRI_S depends on the value of BASEPRI_S,
> for instance). So we switch to the same approach used
> by the pseudocode of working through BASEPRI, PRIMASK
> and FAULTMASK and overriding the previous values if
> needed.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> hw/intc/armv7m_nvic.c | 51
> ++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 42 insertions(+), 9 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [Qemu-arm] [Qemu-devel] [PATCH 07/19] nvic: Implement NVIC_ITNS<n> registers, (continued)
- [Qemu-arm] [PATCH 12/19] nvic: In escalation to HardFault, support HF not being priority -1, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 10/19] nvic: Make SHPR registers banked, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 09/19] nvic: Make set_pending and clear_pending take a secure parameter, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 01/19] target/arm: Implement MSR/MRS access to NS banked registers, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 15/19] nvic: Handle v8M changes in nvic_exec_prio(), Peter Maydell, 2017/09/12
- Re: [Qemu-arm] [Qemu-devel] [PATCH 15/19] nvic: Handle v8M changes in nvic_exec_prio(),
Richard Henderson <=
- [Qemu-arm] [PATCH 13/19] nvic: Implement v8M changes to fixed priority exceptions, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 18/19] nvic: Make SHCSR banked for v8M, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 11/19] nvic: Compare group priority for escalation to HF, Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 08/19] nvic: Handle banked exceptions in nvic_recompute_state(), Peter Maydell, 2017/09/12
- [Qemu-arm] [PATCH 14/19] nvic: Disable the non-secure HardFault if AIRCR.BFHFNMINS is clear, Peter Maydell, 2017/09/12