aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-09-04 18:41:01 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-09-04 18:41:01 +0100
commitd6acc8a5cf561be3feed8dac236e8921f0b6a68d (patch)
tree190a0baf2d4fff333455095423ebae5e58203185 /hw
parente1030ca5abc97e1465bc03776ebccaff1e9f7083 (diff)
sun4u: switch to using qdev to instantiate fw_cfg interface
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw')
-rw-r--r--hw/sparc64/sun4u.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index bcac7fcc42..9507461810 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -512,7 +512,15 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
graphic_width, graphic_height, graphic_depth,
(uint8_t *)&nd_table[0].macaddr);
- fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT);
+ dev = qdev_create(NULL, TYPE_FW_CFG_IO);
+ qdev_prop_set_bit(dev, "dma_enabled", false);
+ object_property_add_child(OBJECT(qdev_get_machine()), TYPE_FW_CFG,
+ OBJECT(dev), NULL);
+ qdev_init_nofail(dev);
+ memory_region_add_subregion(get_system_io(), BIOS_CFG_IOPORT,
+ &FW_CFG_IO(dev)->comb_iomem);
+
+ fw_cfg = FW_CFG(dev);
fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)smp_cpus);
fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)max_cpus);
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);