Skip to content

Commit

Permalink
hw/arm: Mark the "fsl,imx31" device with user_creatable = false
Browse files Browse the repository at this point in the history
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 <thuth@redhat.com>
Message-id: 1509519537-6964-4-git-send-email-thuth@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
huth authored and pm215 committed Nov 7, 2017
1 parent 5e0c704 commit e4e05b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/arm/fsl-imx31.c
Expand Up @@ -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 = {
Expand Down

0 comments on commit e4e05b7

Please sign in to comment.