diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-12 10:33:33 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-09-01 11:08:18 +0100 |
commit | e36a25cb4759b9cfc122650a720e5a968b370a46 (patch) | |
tree | 37a0fe2eb4b71e4751d410c033520f51909a6e09 /include/hw | |
parent | 2f9db77ea8330db9d038603055e0543512365283 (diff) | |
download | qemu-e36a25cb4759b9cfc122650a720e5a968b370a46.zip qemu-e36a25cb4759b9cfc122650a720e5a968b370a46.tar.gz qemu-e36a25cb4759b9cfc122650a720e5a968b370a46.tar.bz2 |
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
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/arm/armv7m.h | 12 | ||||
-rw-r--r-- | include/hw/intc/armv7m_nvic.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h index 4cae0d7..360c35c 100644 --- a/include/hw/arm/armv7m.h +++ b/include/hw/arm/armv7m.h @@ -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; diff --git a/include/hw/intc/armv7m_nvic.h b/include/hw/intc/armv7m_nvic.h index 33b6d88..6a6a990 100644 --- a/include/hw/intc/armv7m_nvic.h +++ b/include/hw/intc/armv7m_nvic.h @@ -81,16 +81,12 @@ struct NVICState { MemoryRegion sysregmem; MemoryRegion sysreg_ns_mem; - MemoryRegion systickmem; - MemoryRegion systick_ns_mem; MemoryRegion container; MemoryRegion defaultmem; uint32_t num_irq; qemu_irq excpout; qemu_irq sysresetreq; - - SysTickState systick[M_REG_NUM_BANKS]; }; #endif |