qemu-e2k/include/hw/arm
Peter Maydell e73b8bb8a3 hw/arm: Set number of MPU regions correctly for an505, an521, an524
The IoTKit, SSE200 and SSE300 all default to 8 MPU regions.  The
MPS2/MPS3 FPGA images don't override these except in the case of
AN547, which uses 16 MPU regions.

Define properties on the ARMSSE object for the MPU regions (using the
same names as the documented RTL configuration settings, and
following the pattern we already have for this device of using
all-caps names as the RTL does), and set them in the board code.

We don't actually need to override the default except on AN547,
but it's simpler code to have the board code set them always
rather than tracking which board subtypes want to set them to
a non-default value separately from what that value is.

Tho overall effect is that for mps2-an505, mps2-an521 and mps3-an524
we now correctly use 8 MPU regions, while mps3-an547 stays at its
current 16 regions.

It's possible some guest code wrongly depended on the previous
incorrectly modeled number of memory regions. (Such guest code
should ideally check the number of regions via the MPU_TYPE
register.) The old behaviour can be obtained with additional
-global arguments to QEMU:

For mps2-an521 and mps2-an524:
 -global sse-200.CPU0_MPU_NS=16 -global sse-200.CPU0_MPU_S=16 -global sse-200.CPU1_MPU_NS=16 -global sse-200.CPU1_MPU_S=16

For mps2-an505:
 -global sse-200.CPU0_MPU_NS=16 -global sse-200.CPU0_MPU_S=16

NB that the way the implementation allows this use of -global
is slightly fragile: if the board code explicitly sets the
properties on the sse-200 object, this overrides the -global
command line option. So we rely on:
 - the boards that need fixing all happen to use the SSE defaults
 - we can write the board code to only set the property if it
   is different from the default, rather than having all boards
   explicitly set the property
 - the board that does need to use a non-default value happens
   to need to set it to the same value (16) we previously used
This works, but there are some kinds of refactoring of the
mps2-tz.c code that would break the support for -global here.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1772
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230724174335.2150499-4-peter.maydell@linaro.org
2023-08-31 11:07:02 +01:00
..
allwinner-a10.h hw/arm: Add WDT to Allwinner-A10 and Cubieboard 2023-04-20 10:21:13 +01:00
allwinner-h3.h hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC 2023-04-20 10:21:14 +01:00
allwinner-r40.h hw: arm: allwinner-sramc: Add SRAM Controller support for R40 2023-06-06 10:19:33 +01:00
armsse-version.h hw/arm/armsse: Introduce SSE subsystem version property 2021-03-08 17:20:01 +00:00
armsse.h hw/arm: Set number of MPU regions correctly for an505, an521, an524 2023-08-31 11:07:02 +01:00
armv7m.h hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties 2023-08-31 11:07:02 +01:00
aspeed.h hw/arm/aspeed: Allow machine to set UART default 2021-09-20 08:50:59 +02:00
aspeed_soc.h aspeed: Introduce a spi_boot region under the SoC 2023-03-02 13:57:50 +01:00
bcm2835_peripherals.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
bcm2836.h hw/arm/bcm2836: Introduce the BCM2835 SoC 2020-10-27 11:10:44 +00:00
boot.h hw/arm/boot: Make write_bootloader() public as arm_write_bootloader() 2023-05-02 15:47:40 +01:00
digic.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
fdt.h hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation 2015-06-19 14:17:44 +01:00
fsl-imx6.h fsl-imx6: Add SNVS support for i.MX6 boards 2023-05-30 13:02:53 +01:00
fsl-imx6ul.h Add i.MX6UL missing devices. 2023-08-31 09:45:16 +01:00
fsl-imx7.h Add i.MX7 SRC device implementation 2023-08-31 09:45:17 +01:00
fsl-imx25.h hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
fsl-imx31.h hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
linux-boot-if.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
msf2-soc.h hw/arm/msf2-soc: Wire up refclk 2021-09-01 11:08:20 +01:00
npcm7xx.h hw/arm: Attach PSPI module to NPCM7XX SoC 2023-02-16 16:00:48 +00:00
nrf51.h hw/arm/nrf51: Add NRF51_PERIPHERAL_SIZE definition 2020-05-11 11:05:11 +01:00
nrf51_soc.h hw/arm/nrf51: Wire up sysclk 2021-09-01 11:08:20 +01:00
omap.h hw/arm/omap: Remove unused omap_uart_attach() 2023-06-05 07:43:23 +01:00
primecell.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pxa.h hw/arm/pxa: Avoid forward-declaring PXA2xxI2CState 2023-01-12 17:15:09 +00:00
raspi_platform.h hw/misc/bcm2835_property: Handle CORE_CLK_ID firmware property 2023-06-19 15:27:21 +01:00
sharpsl.h hw/gpio/zaurus.c: Use LOG_GUEST_ERROR for bad guest register accesses 2020-07-03 16:59:45 +01:00
smmu-common.h hw/arm/smmuv3: Add CMDs related to stage-2 2023-05-30 15:50:16 +01:00
smmuv3.h hw/arm/smmuv3: Add knob to choose translation stage and enable stage-2 2023-05-30 15:50:16 +01:00
soc_dma.h Include exec/memory.h slightly less 2019-08-16 13:31:52 +02:00
stm32f100_soc.h hw/arm/stm32f100: Wire up sysclk and refclk 2021-09-01 11:08:19 +01:00
stm32f205_soc.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
stm32f405_soc.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
virt.h hw/arm/virt: Consolidate GIC finalize logic 2023-02-03 12:59:22 +00:00
xen_arch_hvm.h hw/arm: introduce xenpvh machine 2023-06-15 16:46:47 -07:00
xlnx-versal.h xlnx-versal: Connect Xilinx VERSAL CANFD controllers 2023-06-06 10:19:30 +01:00
xlnx-zynqmp.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00