Hi Philippe,

> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index 82c3e7c855b..6dc9f64b74d 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -683,14 +683,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
>                             graphic_width, graphic_height, graphic_depth,
>                             (uint8_t *)&macaddr);
>  
> -    dev = qdev_new(TYPE_FW_CFG_IO);
> -    qdev_prop_set_bit(dev, "dma_enabled", false);
> -    object_property_add_child(OBJECT(ebus), TYPE_FW_CFG, OBJECT(dev));

There's another difference: fw_cfg_init_io_nodma() uses `machine` as the
parent and here sun4uv uses `ebus`.

I think maybe one reason to use `ebus` is because...

> -    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
> -    memory_region_add_subregion(pci_address_space_io(ebus), BIOS_CFG_IOPORT,
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
... because the parent region is managed by ebus.

Perhaps we should add another argument: Object *parent?

> -                                &FW_CFG_IO(dev)->comb_iomem);
> -

Thanks,
Zhao


Reply via email to