aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorJean-Christophe Dubois <jcd@tribudubois.net>2023-08-31 09:45:17 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-08-31 09:45:17 +0100
commit12517bc978e62ce19df0160ad2ef229169a567b2 (patch)
treee3c2129fbd40de62a2087145ca1878541bc0b5f0 /hw/arm
parent736988a040b58b7021445580634d4d2d35a4a6cc (diff)
downloadqemu-12517bc978e62ce19df0160ad2ef229169a567b2.zip
qemu-12517bc978e62ce19df0160ad2ef229169a567b2.tar.gz
qemu-12517bc978e62ce19df0160ad2ef229169a567b2.tar.bz2
Add i.MX7 SRC device implementation
The SRC device is normally used to start the secondary CPU. When running Linux directly, QEMU is emulating a PSCI interface that UBOOT is installing at boot time and therefore the fact that the SRC device is unimplemented is hidden as Qemu respond directly to PSCI requets without using the SRC device. But if you try to run a more bare metal application (maybe uboot itself), then it is not possible to start the secondary CPU as the SRC is an unimplemented device. This patch adds the ability to start the secondary CPU through the SRC device so that you can use this feature in bare metal applications. Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: ce9a0162defd2acee5dc7f8a674743de0cded569.1692964892.git.jcd@tribudubois.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/fsl-imx7.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c
index 97e982b..474cfdc 100644
--- a/hw/arm/fsl-imx7.c
+++ b/hw/arm/fsl-imx7.c
@@ -83,6 +83,11 @@ static void fsl_imx7_init(Object *obj)
object_initialize_child(obj, "gpcv2", &s->gpcv2, TYPE_IMX_GPCV2);
/*
+ * SRC
+ */
+ object_initialize_child(obj, "src", &s->src, TYPE_IMX7_SRC);
+
+ /*
* ECSPIs
*/
for (i = 0; i < FSL_IMX7_NUM_ECSPIS; i++) {
@@ -488,7 +493,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
/*
* SRC
*/
- create_unimplemented_device("src", FSL_IMX7_SRC_ADDR, FSL_IMX7_SRC_SIZE);
+ sysbus_realize(SYS_BUS_DEVICE(&s->src), &error_abort);
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->src), 0, FSL_IMX7_SRC_ADDR);
/*
* Watchdogs