aboutsummaryrefslogtreecommitdiff
path: root/hw/leon3.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-25 14:39:18 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-25 14:39:18 -0500
commit01e0451a08e0afb9af04783c320d70084cf4e574 (patch)
tree30dbbf868845acd99099c7165769f1762fa40e28 /hw/leon3.c
parentf065aa0a005ac539bf8ca556775e5cc4c3d2d3b7 (diff)
downloadqemu-01e0451a08e0afb9af04783c320d70084cf4e574.zip
qemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.gz
qemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.bz2
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.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/hw/leon3.c b/hw/leon3.c
index 607ec85..a62a941 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) {