Re: [PATCH v1 4/5] hw/arm: Add Axiado SoC AX3005
Jack Wang <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Kuan-Jui
I tested this series with ax3005-evb machine,the initialization did not complete.
The process showed it repeatedly executing in 'ax3005_init'
> +static const TypeInfo ax3005_soc_types[] = {
> + {
> + .name = TYPE_AX3005_SOC,
> + .parent = TYPE_SYS_BUS_DEVICE,
> + .instance_size = sizeof(Ax3005SoCState),
> + .instance_init = ax3005_init,
> + .class_init = ax3005_class_init,
> + }
> +};
You add instance_size here but forget to add class_size. Then qemu defaultly use SysBusDeviceClass’s class_size cause of father-son relationship.
> +typedef struct Ax3005SoCClass {
> + SysBusDeviceClass parent;
> +
> + uint32_t num_cpus;
> +} Ax3005SoCClass;
Here your struct apparently extend SysBusDeviceClass field. I think it is the way why previous repeating behavior.After add class_size locally and rebuild the the machine completed initialization and responded to QMP commands successfully.
Best regards :)
Jack Wang