Message ID | 1491381329-3995-5-git-send-email-mark.cave-ayland@ilande.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/05/2017 05:35 AM, Mark Cave-Ayland wrote: > Previous to the existence of load_image_mr(), the only way to load in the > FCode ROM image was to pass in its physical address via qdev properties > and use load_image_targphys(). > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/display/cg3.c | 4 +--- > hw/sparc/sun4m.c | 1 - > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/hw/display/cg3.c b/hw/display/cg3.c > index 178a6dd..3d36960 100644 > --- a/hw/display/cg3.c > +++ b/hw/display/cg3.c > @@ -300,8 +300,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp) > vmstate_register_ram_global(&s->rom); > fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, CG3_ROM_FILE); > if (fcode_filename) { > - ret = load_image_targphys(fcode_filename, s->prom_addr, > - FCODE_MAX_ROM_SIZE); > + ret = load_image_mr(fcode_filename, &s->rom); > g_free(fcode_filename); > if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) { > error_report("cg3: could not load prom '%s'", CG3_ROM_FILE); > @@ -366,7 +365,6 @@ static Property cg3_properties[] = { > DEFINE_PROP_UINT16("width", CG3State, width, -1), > DEFINE_PROP_UINT16("height", CG3State, height, -1), > DEFINE_PROP_UINT16("depth", CG3State, depth, -1), > - DEFINE_PROP_UINT64("prom-addr", CG3State, prom_addr, -1), > DEFINE_PROP_END_OF_LIST(), > }; > > diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c > index 873cd7d..7a0922b 100644 > --- a/hw/sparc/sun4m.c > +++ b/hw/sparc/sun4m.c > @@ -544,7 +544,6 @@ static void cg3_init(hwaddr addr, qemu_irq irq, int vram_size, int width, > qdev_prop_set_uint16(dev, "width", width); > qdev_prop_set_uint16(dev, "height", height); > qdev_prop_set_uint16(dev, "depth", depth); > - qdev_prop_set_uint64(dev, "prom-addr", addr); > qdev_init_nofail(dev); > s = SYS_BUS_DEVICE(dev); > >
diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 178a6dd..3d36960 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -300,8 +300,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp) vmstate_register_ram_global(&s->rom); fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, CG3_ROM_FILE); if (fcode_filename) { - ret = load_image_targphys(fcode_filename, s->prom_addr, - FCODE_MAX_ROM_SIZE); + ret = load_image_mr(fcode_filename, &s->rom); g_free(fcode_filename); if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) { error_report("cg3: could not load prom '%s'", CG3_ROM_FILE); @@ -366,7 +365,6 @@ static Property cg3_properties[] = { DEFINE_PROP_UINT16("width", CG3State, width, -1), DEFINE_PROP_UINT16("height", CG3State, height, -1), DEFINE_PROP_UINT16("depth", CG3State, depth, -1), - DEFINE_PROP_UINT64("prom-addr", CG3State, prom_addr, -1), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 873cd7d..7a0922b 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -544,7 +544,6 @@ static void cg3_init(hwaddr addr, qemu_irq irq, int vram_size, int width, qdev_prop_set_uint16(dev, "width", width); qdev_prop_set_uint16(dev, "height", height); qdev_prop_set_uint16(dev, "depth", depth); - qdev_prop_set_uint64(dev, "prom-addr", addr); qdev_init_nofail(dev); s = SYS_BUS_DEVICE(dev);
Previous to the existence of load_image_mr(), the only way to load in the FCode ROM image was to pass in its physical address via qdev properties and use load_image_targphys(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- hw/display/cg3.c | 4 +--- hw/sparc/sun4m.c | 1 - 2 files changed, 1 insertion(+), 4 deletions(-)