Skip to content

Commit

Permalink
dummy_m68k: convert to memory API
Browse files Browse the repository at this point in the history
Reviewed-by: Richard Henderson  <rth@twiddle.net>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
avikivity committed Aug 25, 2011
1 parent c8a50e5 commit 9eadff4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hw/dummy_m68k.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "boards.h"
#include "loader.h"
#include "elf.h"
#include "exec-memory.h"

#define KERNEL_LOAD_ADDR 0x10000

Expand All @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 9eadff4

Please sign in to comment.