diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/cubieboard.c | 5 | ||||
-rw-r--r-- | hw/arm/digic_boards.c | 3 | ||||
-rw-r--r-- | hw/arm/highbank.c | 2 | ||||
-rw-r--r-- | hw/arm/integratorcp.c | 4 | ||||
-rw-r--r-- | hw/arm/kzm.c | 3 | ||||
-rw-r--r-- | hw/arm/musicpal.c | 5 | ||||
-rw-r--r-- | hw/arm/omap1.c | 7 | ||||
-rw-r--r-- | hw/arm/omap2.c | 6 | ||||
-rw-r--r-- | hw/arm/strongarm.c | 7 | ||||
-rw-r--r-- | hw/arm/versatilepb.c | 5 | ||||
-rw-r--r-- | hw/arm/vexpress.c | 10 | ||||
-rw-r--r-- | hw/arm/virt.c | 5 | ||||
-rw-r--r-- | hw/arm/xilinx_zynq.c | 5 |
13 files changed, 30 insertions, 37 deletions
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index d1e53be923..1582250eb7 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -63,9 +63,8 @@ static void cubieboard_init(MachineState *machine) exit(1); } - memory_region_init_ram(&s->sdram, NULL, "cubieboard.ram", - machine->ram_size, &error_abort); - vmstate_register_ram_global(&s->sdram); + memory_region_allocate_system_memory(&s->sdram, NULL, "cubieboard.ram", + machine->ram_size); memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE, &s->sdram); diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index e576646e86..f8ba9e5958 100644 --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -51,9 +51,8 @@ typedef struct DigicBoard { static void digic4_board_setup_ram(DigicBoardState *s, hwaddr ram_size) { - memory_region_init_ram(&s->ram, NULL, "ram", ram_size, &error_abort); + memory_region_allocate_system_memory(&s->ram, NULL, "ram", ram_size); memory_region_add_subregion(get_system_memory(), 0, &s->ram); - vmstate_register_ram_global(&s->ram); } static void digic4_board_init(DigicBoard *board) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 07cb4e057b..dd2a67bcf0 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -267,7 +267,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id) sysmem = get_system_memory(); dram = g_new(MemoryRegion, 1); - memory_region_init_ram(dram, NULL, "highbank.dram", ram_size, &error_abort); + memory_region_allocate_system_memory(dram, NULL, "highbank.dram", ram_size); /* SDRAM at address zero. */ memory_region_add_subregion(sysmem, 0, dram); diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index cb609cdbdf..0fbbf997ea 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -567,8 +567,8 @@ static void integratorcp_init(MachineState *machine) cpu = ARM_CPU(cpuobj); - memory_region_init_ram(ram, NULL, "integrator.ram", ram_size, &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "integrator.ram", + ram_size); /* ??? On a real system the first 1Mb is mapped as SSRAM or boot flash. */ /* ??? RAM should repeat to fill physical memory space. */ /* SDRAM at address zero*/ diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 94ceab6c8e..5be0369a50 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -97,8 +97,7 @@ static void kzm_init(MachineState *machine) /* On a real system, the first 16k is a `secure boot rom' */ - memory_region_init_ram(ram, NULL, "kzm.ram", ram_size, &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "kzm.ram", ram_size); memory_region_add_subregion(address_space_mem, KZM_RAMADDRESS, ram); memory_region_init_alias(ram_alias, NULL, "ram.alias", ram, 0, ram_size); diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 3712de6cba..a3b1314d96 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1600,9 +1600,8 @@ static void musicpal_init(MachineState *machine) } /* For now we use a fixed - the original - RAM size */ - memory_region_init_ram(ram, NULL, "musicpal.ram", MP_RAM_DEFAULT_SIZE, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "musicpal.ram", + MP_RAM_DEFAULT_SIZE); memory_region_add_subregion(address_space_mem, 0, ram); memory_region_init_ram(sram, NULL, "musicpal.sram", MP_SRAM_SIZE, diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 061504495d..91ffb589e5 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -16,6 +16,8 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, see <http://www.gnu.org/licenses/>. */ + +#include "hw/boards.h" #include "hw/hw.h" #include "hw/arm/arm.h" #include "hw/arm/omap.h" @@ -3878,9 +3880,8 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory, omap_clk_init(s); /* Memory-mapped stuff */ - memory_region_init_ram(&s->emiff_ram, NULL, "omap1.dram", s->sdram_size, - &error_abort); - vmstate_register_ram_global(&s->emiff_ram); + memory_region_allocate_system_memory(&s->emiff_ram, NULL, "omap1.dram", + s->sdram_size); memory_region_add_subregion(system_memory, OMAP_EMIFF_BASE, &s->emiff_ram); memory_region_init_ram(&s->imif_ram, NULL, "omap1.sram", s->sram_size, &error_abort); diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 32390140c0..e39b317290 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -20,6 +20,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" +#include "hw/boards.h" #include "hw/hw.h" #include "hw/arm/arm.h" #include "hw/arm/omap.h" @@ -2271,9 +2272,8 @@ struct omap_mpu_state_s *omap2420_mpu_init(MemoryRegion *sysmem, omap_clk_init(s); /* Memory-mapped stuff */ - memory_region_init_ram(&s->sdram, NULL, "omap2.dram", s->sdram_size, - &error_abort); - vmstate_register_ram_global(&s->sdram); + memory_region_allocate_system_memory(&s->sdram, NULL, "omap2.dram", + s->sdram_size); memory_region_add_subregion(sysmem, OMAP2_Q2_BASE, &s->sdram); memory_region_init_ram(&s->sram, NULL, "omap2.sram", s->sram_size, &error_abort); diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 32063459dd..1ddea6d89c 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -26,6 +26,8 @@ * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ + +#include "hw/boards.h" #include "hw/sysbus.h" #include "strongarm.h" #include "qemu/error-report.h" @@ -1604,9 +1606,8 @@ StrongARMState *sa1110_init(MemoryRegion *sysmem, exit(1); } - memory_region_init_ram(&s->sdram, NULL, "strongarm.sdram", sdram_size, - &error_abort); - vmstate_register_ram_global(&s->sdram); + memory_region_allocate_system_memory(&s->sdram, NULL, "strongarm.sdram", + sdram_size); memory_region_add_subregion(sysmem, SA_SDCS0, &s->sdram); s->pic = sysbus_create_varargs("strongarm_pic", 0x90050000, diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 624fdb09bb..6c69f4eaa8 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -226,9 +226,8 @@ static void versatile_init(MachineState *machine, int board_id) cpu = ARM_CPU(cpuobj); - memory_region_init_ram(ram, NULL, "versatile.ram", machine->ram_size, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "versatile.ram", + machine->ram_size); /* ??? RAM should repeat to fill physical memory space. */ /* SDRAM at address zero. */ memory_region_add_subregion(sysmem, 0, ram); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 54dd9673aa..3989bc52b7 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -276,9 +276,8 @@ static void a9_daughterboard_init(const VexpressMachineState *vms, exit(1); } - memory_region_init_ram(ram, NULL, "vexpress.highmem", ram_size, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "vexpress.highmem", + ram_size); low_ram_size = ram_size; if (low_ram_size > 0x4000000) { low_ram_size = 0x4000000; @@ -371,9 +370,8 @@ static void a15_daughterboard_init(const VexpressMachineState *vms, } } - memory_region_init_ram(ram, NULL, "vexpress.highmem", ram_size, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "vexpress.highmem", + ram_size); /* RAM is from 0x80000000 upwards; there is no low-memory alias for it. */ memory_region_add_subregion(sysmem, 0x80000000, ram); diff --git a/hw/arm/virt.c b/hw/arm/virt.c index febff22768..565f573137 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -805,9 +805,8 @@ static void machvirt_init(MachineState *machine) fdt_add_cpu_nodes(vbi); fdt_add_psci_node(vbi); - memory_region_init_ram(ram, NULL, "mach-virt.ram", machine->ram_size, - &error_abort); - vmstate_register_ram_global(ram); + memory_region_allocate_system_memory(ram, NULL, "mach-virt.ram", + machine->ram_size); memory_region_add_subregion(sysmem, vbi->memmap[VIRT_MEM].base, ram); create_flash(vbi); diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index 5c37521422..a4e7b5c637 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -161,9 +161,8 @@ static void zynq_init(MachineState *machine) } /* DDR remapped to address zero. */ - memory_region_init_ram(ext_ram, NULL, "zynq.ext_ram", ram_size, - &error_abort); - vmstate_register_ram_global(ext_ram); + memory_region_allocate_system_memory(ext_ram, NULL, "zynq.ext_ram", + ram_size); memory_region_add_subregion(address_space_mem, 0, ext_ram); /* 256K of on-chip memory */ |