diff options
author | Anthony Liguori | 2011-08-25 21:39:18 +0200 |
---|---|---|
committer | Anthony Liguori | 2011-08-25 21:39:18 +0200 |
commit | 01e0451a08e0afb9af04783c320d70084cf4e574 (patch) | |
tree | 30dbbf868845acd99099c7165769f1762fa40e28 /hw/leon3.c | |
parent | vga: Silence bogus gcc warning about uninitialized variables (diff) | |
download | qemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.gz qemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.xz qemu-01e0451a08e0afb9af04783c320d70084cf4e574.zip |
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing
changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this
out - it isn't trivial.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/leon3.c')
-rw-r--r-- | hw/leon3.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/hw/leon3.c b/hw/leon3.c index 607ec852fe..a62a9419f3 100644 --- a/hw/leon3.c +++ b/hw/leon3.c @@ -29,7 +29,6 @@ #include "loader.h" #include "elf.h" #include "trace.h" -#include "exec-memory.h" #include "grlib.h" @@ -101,9 +100,7 @@ static void leon3_generic_hw_init(ram_addr_t ram_size, const char *cpu_model) { CPUState *env; - MemoryRegion *address_space_mem = get_system_memory(); - MemoryRegion *ram = g_new(MemoryRegion, 1); - MemoryRegion *prom = g_new(MemoryRegion, 1); + ram_addr_t ram_offset, prom_offset; int ret; char *filename; qemu_irq *cpu_irqs = NULL; @@ -142,14 +139,14 @@ static void leon3_generic_hw_init(ram_addr_t ram_size, exit(1); } - memory_region_init_ram(ram, NULL, "leon3.ram", ram_size); - memory_region_add_subregion(address_space_mem, 0x40000000, ram); + ram_offset = qemu_ram_alloc(NULL, "leon3.ram", ram_size); + cpu_register_physical_memory(0x40000000, ram_size, ram_offset | IO_MEM_RAM); /* Allocate BIOS */ prom_size = 8 * 1024 * 1024; /* 8Mb */ - memory_region_init_ram(prom, NULL, "Leon3.bios", prom_size); - memory_region_set_readonly(prom, true); - memory_region_add_subregion(address_space_mem, 0x00000000, prom); + prom_offset = qemu_ram_alloc(NULL, "Leon3.bios", prom_size); + cpu_register_physical_memory(0x00000000, prom_size, + prom_offset | IO_MEM_ROM); /* Load boot prom */ if (bios_name == NULL) { |