mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43: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
|
@ -102,7 +102,7 @@ static const VMStateDescription vmstate_m_faultmask_primask = {
|
|||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(env.v7m.faultmask, ARMCPU),
|
||||
VMSTATE_UINT32(env.v7m.faultmask[M_REG_NS], ARMCPU),
|
||||
VMSTATE_UINT32(env.v7m.primask[M_REG_NS], ARMCPU),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
|
@ -252,6 +252,7 @@ static const VMStateDescription vmstate_m_security = {
|
|||
VMSTATE_UINT32(env.v7m.secure, 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),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
@ -289,7 +290,7 @@ static int get_cpsr(QEMUFile *f, void *opaque, size_t size,
|
|||
* transferred using the vmstate_m_faultmask_primask subsection.
|
||||
*/
|
||||
if (val & CPSR_F) {
|
||||
env->v7m.faultmask = 1;
|
||||
env->v7m.faultmask[M_REG_NS] = 1;
|
||||
}
|
||||
if (val & CPSR_I) {
|
||||
env->v7m.primask[M_REG_NS] = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue