#include "elf.h"
#include "lm32_hwsetup.h"
#include "lm32.h"
+#include "exec-memory.h"
typedef struct {
CPUState *env;
{
CPUState *env;
DriveInfo *dinfo;
- ram_addr_t phys_ram;
+ MemoryRegion *address_space_mem = get_system_memory();
+ MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
MemoryRegion *phys_flash = g_new(MemoryRegion, 1);
qemu_irq *cpu_irq, irq[32];
ResetInfo *reset_info;
reset_info->flash_base = flash_base;
- phys_ram = qemu_ram_alloc(NULL, "lm32_evr.sdram", ram_size);
- cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
+ memory_region_init_ram(phys_ram, NULL, "lm32_evr.sdram", ram_size);
+ memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
memory_region_init_rom_device(phys_flash, &pflash_cfi02_ops_be,
NULL, "lm32_evr.flash", flash_size);
{
CPUState *env;
DriveInfo *dinfo;
- ram_addr_t phys_ram;
+ MemoryRegion *address_space_mem = get_system_memory();
+ MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
MemoryRegion *phys_flash = g_new(MemoryRegion, 1);
qemu_irq *cpu_irq, irq[32];
HWSetup *hw;
reset_info->flash_base = flash_base;
- phys_ram = qemu_ram_alloc(NULL, "lm32_uclinux.sdram", ram_size);
- cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
+ memory_region_init_ram(phys_ram, NULL, "lm32_uclinux.sdram", ram_size);
+ memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
memory_region_init_rom_device(phys_flash, &pflash_cfi01_ops_be,
NULL, "lm32_uclinux.flash", flash_size);