mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/arm: Make FAULTMASK register banked for v8M
Make the FAULTMASK register banked if v8M security extensions are enabled. Note that we do not yet implement the functionality of the new AIRCR.PRIS bit (which allows the effect of the NS copy of FAULTMASK to be restricted). This patch includes the code to determine for v8M which copy of FAULTMASK should be updated on exception exit; further changes will be required to the exception exit code in general to support v8M, so this is just a small piece of that. The v8M ARM ARM introduces a notation where individual paragraphs are labelled with R (for rule) or I (for information) followed by a random group of subscript letters. In comments where we want to refer to a particular part of the manual we use this convention, which should be more stable across document revisions than using section or page numbers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 1503414539-28762-9-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
6d80483419
commit
42a6686b2f
4 changed files with 39 additions and 9 deletions
|
@ -167,7 +167,7 @@ static inline int nvic_exec_prio(NVICState *s)
|
|||
CPUARMState *env = &s->cpu->env;
|
||||
int running;
|
||||
|
||||
if (env->v7m.faultmask) {
|
||||
if (env->v7m.faultmask[env->v7m.secure]) {
|
||||
running = -1;
|
||||
} else if (env->v7m.primask[env->v7m.secure]) {
|
||||
running = 0;
|
||||
|
@ -187,6 +187,13 @@ bool armv7m_nvic_can_take_pending_exception(void *opaque)
|
|||
return nvic_exec_prio(s) > nvic_pending_prio(s);
|
||||
}
|
||||
|
||||
int armv7m_nvic_raw_execution_priority(void *opaque)
|
||||
{
|
||||
NVICState *s = opaque;
|
||||
|
||||
return s->exception_prio;
|
||||
}
|
||||
|
||||
/* caller must call nvic_irq_update() after this */
|
||||
static void set_prio(NVICState *s, unsigned irq, uint8_t prio)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue