hw/arm/xilinx_zynq: Add cache controller
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Fri, 24 May 2024 12:08:36 +0000 (14:08 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 30 May 2024 12:21:06 +0000 (13:21 +0100)
The Zynq 7000 SoCs contain a CoreLink L2C-310 cache controller.  Add the
corresponding Qemu device to the xilinx-zynq-a9 machine.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Message-id: 20240524120837.10057-2-sebastian.huber@embedded-brains.de
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/Kconfig
hw/arm/xilinx_zynq.c

index 8b97683a45ebed951bc4cb40abb2aae50236cbbf..1ad60da7aa2d1fcb157561461c229cb486b65e3a 100644 (file)
@@ -370,6 +370,7 @@ config ZYNQ
     select A9MPCORE
     select CADENCE # UART
     select PFLASH_CFI02
+    select PL310 # cache controller
     select PL330
     select SDHCI
     select SSI_M25P80
index fc3abcbe88b939f4e9e9a777e544670edbabab3b..0abb62f131d2356ddcc1c1f53606717da8d7a634 100644 (file)
@@ -241,6 +241,7 @@ static void zynq_init(MachineState *machine)
     busdev = SYS_BUS_DEVICE(dev);
     sysbus_realize_and_unref(busdev, &error_fatal);
     sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE);
+    sysbus_create_varargs("l2x0", MPCORE_PERIPHBASE + 0x2000, NULL);
     sysbus_connect_irq(busdev, 0,
                        qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ));
     sysbus_connect_irq(busdev, 1,