mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
nvic: Implement AIRCR changes for v8M
The Application Interrupt and Reset Control Register has some changes for v8M: * new bits SYSRESETREQS, BFHFNMINS and PRIS: these all have real state if the security extension is implemented and otherwise are constant * the PRIGROUP field is banked between security states * non-secure code can be blocked from using the SYSRESET bit to reset the system if SYSRESETREQS is set Implement the new state and the changes to register read and write. For the moment we ignore the effects of the secure PRIGROUP. We will implement the effects of PRIS and BFHFNMIS later. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 1505240046-11454-6-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
5255fcf8e4
commit
3b2e934463
4 changed files with 59 additions and 12 deletions
|
@ -449,6 +449,7 @@ typedef struct CPUARMState {
|
|||
int exception;
|
||||
uint32_t primask[M_REG_NUM_BANKS];
|
||||
uint32_t faultmask[M_REG_NUM_BANKS];
|
||||
uint32_t aircr; /* only holds r/w state if security extn implemented */
|
||||
uint32_t secure; /* Is CPU in Secure state? (not guest visible) */
|
||||
} v7m;
|
||||
|
||||
|
@ -1200,6 +1201,17 @@ FIELD(V7M_CCR, STKALIGN, 9, 1)
|
|||
FIELD(V7M_CCR, DC, 16, 1)
|
||||
FIELD(V7M_CCR, IC, 17, 1)
|
||||
|
||||
/* V7M AIRCR bits */
|
||||
FIELD(V7M_AIRCR, VECTRESET, 0, 1)
|
||||
FIELD(V7M_AIRCR, VECTCLRACTIVE, 1, 1)
|
||||
FIELD(V7M_AIRCR, SYSRESETREQ, 2, 1)
|
||||
FIELD(V7M_AIRCR, SYSRESETREQS, 3, 1)
|
||||
FIELD(V7M_AIRCR, PRIGROUP, 8, 3)
|
||||
FIELD(V7M_AIRCR, BFHFNMINS, 13, 1)
|
||||
FIELD(V7M_AIRCR, PRIS, 14, 1)
|
||||
FIELD(V7M_AIRCR, ENDIANNESS, 15, 1)
|
||||
FIELD(V7M_AIRCR, VECTKEY, 16, 16)
|
||||
|
||||
/* V7M CFSR bits for MMFSR */
|
||||
FIELD(V7M_CFSR, IACCVIOL, 0, 1)
|
||||
FIELD(V7M_CFSR, DACCVIOL, 1, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue