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 <peter.mayd...@linaro.org>
> ---
>  hw/intc/armv7m_nvic.c | 51 
> ++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 42 insertions(+), 9 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to