diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-09-07 13:54:54 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-09-07 13:54:54 +0100 |
commit | fb602cb726b3ebdd01ef3b1732d74baf9fee7ec9 (patch) | |
tree | c703819a2a18f13e416d0800488a260fa7644788 /target/arm/machine.c | |
parent | 61fcd69b0db268e7612b07fadc436b93def91768 (diff) |
target/arm: Implement BXNS, and banked stack pointers
Implement the BXNS v8M instruction, which is like BX but will do a
jump-and-switch-to-NonSecure if the branch target address has bit 0
clear.
This is the first piece of code which implements "switch to the
other security state", so the commit also includes the code to
switch the stack pointers around, which is the only complicated
part of switching security state.
BLXNS is more complicated than just "BXNS but set the link register",
so we leave it for a separate commit.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1503414539-28762-21-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/machine.c')
-rw-r--r-- | target/arm/machine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/arm/machine.c b/target/arm/machine.c index 0bcaa68d18..e5fe083da4 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -257,6 +257,8 @@ static const VMStateDescription vmstate_m_security = { .needed = m_security_needed, .fields = (VMStateField[]) { VMSTATE_UINT32(env.v7m.secure, ARMCPU), + VMSTATE_UINT32(env.v7m.other_ss_msp, ARMCPU), + VMSTATE_UINT32(env.v7m.other_ss_psp, ARMCPU), VMSTATE_UINT32(env.v7m.basepri[M_REG_S], ARMCPU), VMSTATE_UINT32(env.v7m.primask[M_REG_S], ARMCPU), VMSTATE_UINT32(env.v7m.faultmask[M_REG_S], ARMCPU), |