diff options
-rw-r--r-- | hw/sparc/leon3.c | 3 | ||||
-rw-r--r-- | hw/sparc/sun4m.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index e41ec0bf3a..7f5dcd6d85 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -151,8 +151,7 @@ static void leon3_generic_hw_init(MachineState *machine) exit(1); } - memory_region_init_ram(ram, NULL, "leon3.ram", ram_size, &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "leon3.ram", ram_size); memory_region_add_subregion(address_space_mem, 0x40000000, ram); /* Allocate BIOS */ diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 255ba1f4f5..a69bf2da45 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -805,9 +805,8 @@ static int ram_init1(SysBusDevice *dev) { RamDevice *d = SUN4M_RAM(dev); - memory_region_init_ram(&d->ram, OBJECT(d), "sun4m.ram", d->size, - &error_abort); - vmstate_register_ram_global(&d->ram); + memory_region_allocate_system_memory(&d->ram, OBJECT(d), "sun4m.ram", + d->size); sysbus_init_mmio(dev, &d->ram); return 0; } |