[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] hw/arm: Mark the "fsl, imx25" device with user_
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PATCH 2/3] hw/arm: Mark the "fsl, imx25" device with user_creatable = false |
Date: |
Wed, 1 Nov 2017 07:58:56 +0100 |
QEMU currently crashes when the user tries to instantiate the fsl,imx25
device manually:
$ aarch64-softmmu/qemu-system-aarch64 -S -M imx25-pdk -device fsl,,imx25
**
ERROR:/home/thuth/devel/qemu/tcg/tcg.c:538:tcg_register_thread:
assertion failed: (n < max_cpus)
The imx25-pdk board (which is the one that uses this CPU type) only
supports one CPU, and the realize function of the "fsl,imx25" device
also uses serial_hds[] directly, so this device clearly can not be
instantiated twice and thus we should mark it with user_creatable = 0.
Signed-off-by: Thomas Huth <address@hidden>
---
hw/arm/fsl-imx25.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 3b97ece..cb988a6 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -288,8 +288,12 @@ static void fsl_imx25_class_init(ObjectClass *oc, void
*data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = fsl_imx25_realize;
-
dc->desc = "i.MX25 SOC";
+ /*
+ * Reason: uses serial_hds in realize and the imx25 board does not
+ * support multiple CPUs
+ */
+ dc->user_creatable = false;
}
static const TypeInfo fsl_imx25_type_info = {
--
1.8.3.1
- [Qemu-devel] [PATCH 0/3] hw/arm: Mark the "fsl, imx" devices with user_creatable = false, Thomas Huth, 2017/11/01
- [Qemu-devel] [PATCH 2/3] hw/arm: Mark the "fsl, imx25" device with user_creatable = false,
Thomas Huth <=
- [Qemu-devel] [PATCH 3/3] hw/arm: Mark the "fsl, imx31" device with user_creatable = false, Thomas Huth, 2017/11/01
- [Qemu-devel] [PATCH 1/3] hw/arm: Mark the "fsl, imx6" device with user_creatable = false, Thomas Huth, 2017/11/01
- Re: [Qemu-devel] [PATCH 0/3] hw/arm: Mark the "fsl, imx" devices with user_creatable = false, Peter Maydell, 2017/11/02