qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 17/24] dummy_m68k: convert to memory API


From: Avi Kivity
Subject: [Qemu-devel] [PATCH 17/24] dummy_m68k: convert to memory API
Date: Wed, 24 Aug 2011 13:11:16 +0300

Signed-off-by: Avi Kivity <address@hidden>
---
 hw/dummy_m68k.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c
index 2de69ad..609d04c 100644
--- a/hw/dummy_m68k.c
+++ b/hw/dummy_m68k.c
@@ -6,6 +6,7 @@
  * This code is licensed under the GPL
  */
 
+#include <glib.h>
 #include "hw.h"
 #include "boards.h"
 #include "loader.h"
@@ -23,6 +24,7 @@ static void dummy_m68k_init(MemoryRegion *address_space_mem,
                      const char *initrd_filename, const char *cpu_model)
 {
     CPUState *env;
+    MemoryRegion *ram = g_new(MemoryRegion, 1);
     int kernel_size;
     uint64_t elf_entry;
     target_phys_addr_t entry;
@@ -39,8 +41,8 @@ static void dummy_m68k_init(MemoryRegion *address_space_mem,
     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) {
-- 
1.7.5.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]