mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
arm: Move systick device creation from NVIC to ARMv7M object
There's no particular reason why the NVIC should be owning the SysTick device objects; move them into the ARMv7M container object instead, as part of consolidating the "create the devices which are built into an M-profile CPU and map them into their architected locations in the address space" work into one place. This involves temporarily creating a duplicate copy of the nvic_sysreg_ns_ops struct and its read/write functions (renamed as v7m_sysreg_ns_*), but we will delete the NVIC's copy of this code in a subsequent patch. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Luc Michel <luc@lmichel.fr> Message-id: 20210812093356.1946-3-peter.maydell@linaro.org
This commit is contained in:
parent
2f9db77ea8
commit
e36a25cb47
4 changed files with 137 additions and 77 deletions
|
@ -60,11 +60,23 @@ struct ARMv7MState {
|
|||
BitBandState bitband[ARMV7M_NUM_BITBANDS];
|
||||
ARMCPU *cpu;
|
||||
ARMv7MRAS ras;
|
||||
SysTickState systick[M_REG_NUM_BANKS];
|
||||
|
||||
/* MemoryRegion we pass to the CPU, with our devices layered on
|
||||
* top of the ones the board provides in board_memory.
|
||||
*/
|
||||
MemoryRegion container;
|
||||
/*
|
||||
* MemoryRegion which passes the transaction to either the S or the
|
||||
* NS systick device depending on the transaction attributes
|
||||
*/
|
||||
MemoryRegion systickmem;
|
||||
/*
|
||||
* MemoryRegion which enforces the S/NS handling of the systick
|
||||
* device NS alias region and passes the transaction to the
|
||||
* NS systick device if appropriate.
|
||||
*/
|
||||
MemoryRegion systick_ns_mem;
|
||||
|
||||
/* Properties */
|
||||
char *cpu_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue