[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/7] hw/arm: Mark the "fsl, imx31" device with user_c
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 4/7] hw/arm: Mark the "fsl, imx31" device with user_creatable = false |
Date: |
Tue, 7 Nov 2017 13:35:19 +0000 |
From: Thomas Huth <address@hidden>
QEMU currently crashes when the user tries to instantiate the fsl,imx31
device manually:
$ aarch64-softmmu/qemu-system-aarch64 -M kzm -device fsl,,imx31
**
ERROR:/home/thuth/devel/qemu/tcg/tcg.c:538:tcg_register_thread:
assertion failed: (n < max_cpus)
Aborted (core dumped)
The kzm board (which is the one that uses this CPU type) only supports
one CPU, and the realize function of the "fsl,imx31" device also uses
serial_hds[] directly, so this device clearly can not be instantiated
twice and thus we should mark it with user_creatable = false.
Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
hw/arm/fsl-imx31.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
index 0f2ebe8..3eee83d 100644
--- a/hw/arm/fsl-imx31.c
+++ b/hw/arm/fsl-imx31.c
@@ -260,8 +260,12 @@ static void fsl_imx31_class_init(ObjectClass *oc, void
*data)
DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = fsl_imx31_realize;
-
dc->desc = "i.MX31 SOC";
+ /*
+ * Reason: uses serial_hds in realize and the kzm board does not
+ * support multiple CPUs
+ */
+ dc->user_creatable = false;
}
static const TypeInfo fsl_imx31_type_info = {
--
2.7.4
- [Qemu-devel] [PULL 0/7] target-arm queue, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 5/7] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 4/7] hw/arm: Mark the "fsl, imx31" device with user_creatable = false,
Peter Maydell <=
- [Qemu-devel] [PULL 1/7] arm: implement cache/shareability attribute bits for PAR registers, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 2/7] hw/arm: Mark the "fsl, imx6" device with user_creatable = false, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 7/7] hw/intc/arm_gicv3_its: Don't abort on table save failure, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 3/7] hw/arm: Mark the "fsl, imx25" device with user_creatable = false, Peter Maydell, 2017/11/07
- [Qemu-devel] [PULL 6/7] hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler(), Peter Maydell, 2017/11/07
- Re: [Qemu-devel] [PULL 0/7] target-arm queue, Peter Maydell, 2017/11/07