aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-02-01 14:55:42 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-02-01 14:55:42 +0000
commitf0cab7fe88e1751209d6f3d8b9bac04b09b2e7ea (patch)
tree3d46a5eef03ad05a1a85105509c07ca153733bfb /include/hw
parent0a78d7ebf8524fdcf701e6e228d8a5720a0ffd1e (diff)
downloadqemu-f0cab7fe88e1751209d6f3d8b9bac04b09b2e7ea.zip
qemu-f0cab7fe88e1751209d6f3d8b9bac04b09b2e7ea.tar.gz
qemu-f0cab7fe88e1751209d6f3d8b9bac04b09b2e7ea.tar.bz2
hw/arm/armsse: Make number of SRAM banks parameterised
The SSE-200 has four banks of SRAM, each with its own Memory Protection Controller, where the IoTKit has only one. Make the number of SRAM banks a field in ARMSSEInfo. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190121185118.18550-10-peter.maydell@linaro.org
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/arm/armsse.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h
index ff51205..99714aa 100644
--- a/include/hw/arm/armsse.h
+++ b/include/hw/arm/armsse.h
@@ -90,6 +90,11 @@
#define NUM_EXTERNAL_PPCS (IOTS_NUM_AHB_EXP_PPC + IOTS_NUM_APB_EXP_PPC)
#define NUM_PPCS (NUM_EXTERNAL_PPCS + 2)
+#define MAX_SRAM_BANKS 4
+#if MAX_SRAM_BANKS > IOTS_NUM_MPC
+#error Too many SRAM banks
+#endif
+
typedef struct ARMSSE {
/*< private >*/
SysBusDevice parent_obj;
@@ -99,7 +104,7 @@ typedef struct ARMSSE {
IoTKitSecCtl secctl;
TZPPC apb_ppc0;
TZPPC apb_ppc1;
- TZMPC mpc;
+ TZMPC mpc[IOTS_NUM_MPC];
CMSDKAPBTIMER timer0;
CMSDKAPBTIMER timer1;
CMSDKAPBTIMER s32ktimer;
@@ -123,7 +128,7 @@ typedef struct ARMSSE {
MemoryRegion alias1;
MemoryRegion alias2;
MemoryRegion alias3;
- MemoryRegion sram0;
+ MemoryRegion sram[MAX_SRAM_BANKS];
qemu_irq *exp_irqs;
qemu_irq ppc0_irq;