Am 13. März 2025 10:12:18 UTC schrieb Peter Maydell <peter.mayd...@linaro.org>:
>On Wed, 12 Mar 2025 at 23:58, BALATON Zoltan <bala...@eik.bme.hu> wrote:
>>
>> On Wed, 12 Mar 2025, Bernhard Beschow wrote:
>> > Fixes a crash when creating the SoC object on the command line:
>> >
>> >  $ ./qemu-system-aarch64  -M virt -device fsl-imx8mp
>> >  **
>> >  ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: assertion 
>> > failed:
>> >  (n < tcg_max_ctxs)
>> >  Bail out! ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread:
>> >  assertion failed: (n < tcg_max_ctxs)
>> >  Aborted (core dumped)
>> >
>> > Furthermore, the SoC object should be derived from TYPE_SYS_BUS_DEVICE 
>> > such that
>> > it gets properly reset.
>> >
>> > Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board"
>> > Reported-by: Thomas Huth <th...@redhat.com>
>> > Suggested-by: Peter Maydell <peter.mayd...@linaro.org>
>> > Signed-off-by: Bernhard Beschow <shen...@gmail.com>
>
>> > diff --git a/hw/arm/fsl-imx8mp.c b/hw/arm/fsl-imx8mp.c
>> > index 1ea98e1463..9133d49383 100644
>> > --- a/hw/arm/fsl-imx8mp.c
>> > +++ b/hw/arm/fsl-imx8mp.c
>> > @@ -698,13 +698,15 @@ static void fsl_imx8mp_class_init(ObjectClass *oc, 
>> > void *data)
>> >     device_class_set_props(dc, fsl_imx8mp_properties);
>> >     dc->realize = fsl_imx8mp_realize;
>> >
>> > +    /* Reason: SoC can only be instantiated from a board */
>> > +    dc->user_creatable = false;
>>
>> I think sysbus devices are not user creatable by default (that's why
>> dynamic sysbus device was introduced) so either this or the .parent change
>> below is enough. You can have both just in case but maybe not necessary as
>> other sysbus devices usually don't set user_createble either.
>
>Yes, that's correct -- we don't need to manually set the
>user_creatable flag here now we've changed the parent class
>to be sysbus.

I'll send a patch later this day.

Best regards,
Bernhard

>
>-- PMM

Reply via email to