diff options
author | Avi Kivity <avi@redhat.com> | 2011-08-08 20:44:23 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-08-25 10:56:33 +0300 |
commit | 9eadff4a94a55a481ee24b45ba3a83615499d339 (patch) | |
tree | 0f0a7ec91e47e2e2e28cb0a205fb7d4177d34ff8 | |
parent | c8a50e596c8eeb41bf5718df5bad6be4080f40c7 (diff) |
dummy_m68k: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | hw/dummy_m68k.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c index eed9e3843c..30146b9c9d 100644 --- a/hw/dummy_m68k.c +++ b/hw/dummy_m68k.c @@ -10,6 +10,7 @@ #include "boards.h" #include "loader.h" #include "elf.h" +#include "exec-memory.h" #define KERNEL_LOAD_ADDR 0x10000 @@ -21,6 +22,8 @@ static void dummy_m68k_init(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { CPUState *env; + MemoryRegion *address_space_mem = get_system_memory(); + MemoryRegion *ram = g_new(MemoryRegion, 1); int kernel_size; uint64_t elf_entry; target_phys_addr_t entry; @@ -37,8 +40,8 @@ static void dummy_m68k_init(ram_addr_t ram_size, env->vbr = 0; /* RAM at address zero */ - cpu_register_physical_memory(0, ram_size, - qemu_ram_alloc(NULL, "dummy_m68k.ram", ram_size) | IO_MEM_RAM); + memory_region_init_ram(ram, NULL, "dummy_m68k.ram", ram_size); + memory_region_add_subregion(address_space_mem, 0, ram); /* Load kernel. */ if (kernel_filename) { |