aboutsummaryrefslogtreecommitdiffstats
path: root/hw/virtex_ml507.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-10-05 18:51:29 +0200
committerAvi Kivity <avi@redhat.com>2011-11-24 18:31:54 +0200
commit333b13fc3c6b6172d0645aa4986257824e5c5745 (patch)
tree6fbd8aa249eb0b949df7aa2327f56c1d11799f14 /hw/virtex_ml507.c
parente6d17b056de3691748ff047c1b5baf012799fef8 (diff)
virtex_ml507: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/virtex_ml507.c')
-rw-r--r--hw/virtex_ml507.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/virtex_ml507.c b/hw/virtex_ml507.c
index 5ea0e60e4..6ffb896b7 100644
--- a/hw/virtex_ml507.c
+++ b/hw/virtex_ml507.c
@@ -192,7 +192,7 @@ static void virtex_init(ram_addr_t ram_size,
CPUState *env;
target_phys_addr_t ram_base = 0;
DriveInfo *dinfo;
- ram_addr_t phys_ram;
+ MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
qemu_irq irq[32], *cpu_irq;
int kernel_size;
int i;
@@ -205,8 +205,8 @@ static void virtex_init(ram_addr_t ram_size,
env = ppc440_init_xilinx(&ram_size, 1, cpu_model, 400000000);
qemu_register_reset(main_cpu_reset, env);
- phys_ram = qemu_ram_alloc(NULL, "ram", ram_size);
- cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
+ memory_region_init_ram(phys_ram, NULL, "ram", ram_size);
+ memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
dinfo = drive_get(IF_PFLASH, 0, 0);
pflash_cfi01_register(0xfc000000, NULL, "virtex.flash", FLASH_SIZE,