Revision 4c9e975d
b/hw/lm32_boards.c | ||
---|---|---|
28 | 28 |
#include "elf.h" |
29 | 29 |
#include "lm32_hwsetup.h" |
30 | 30 |
#include "lm32.h" |
31 |
#include "exec-memory.h" |
|
31 | 32 |
|
32 | 33 |
typedef struct { |
33 | 34 |
CPUState *env; |
... | ... | |
76 | 77 |
{ |
77 | 78 |
CPUState *env; |
78 | 79 |
DriveInfo *dinfo; |
79 |
ram_addr_t phys_ram; |
|
80 |
MemoryRegion *address_space_mem = get_system_memory(); |
|
81 |
MemoryRegion *phys_ram = g_new(MemoryRegion, 1); |
|
80 | 82 |
MemoryRegion *phys_flash = g_new(MemoryRegion, 1); |
81 | 83 |
qemu_irq *cpu_irq, irq[32]; |
82 | 84 |
ResetInfo *reset_info; |
... | ... | |
105 | 107 |
|
106 | 108 |
reset_info->flash_base = flash_base; |
107 | 109 |
|
108 |
phys_ram = qemu_ram_alloc(NULL, "lm32_evr.sdram", ram_size);
|
|
109 |
cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
|
|
110 |
memory_region_init_ram(phys_ram, NULL, "lm32_evr.sdram", ram_size);
|
|
111 |
memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
|
|
110 | 112 |
|
111 | 113 |
memory_region_init_rom_device(phys_flash, &pflash_cfi02_ops_be, |
112 | 114 |
NULL, "lm32_evr.flash", flash_size); |
... | ... | |
165 | 167 |
{ |
166 | 168 |
CPUState *env; |
167 | 169 |
DriveInfo *dinfo; |
168 |
ram_addr_t phys_ram; |
|
170 |
MemoryRegion *address_space_mem = get_system_memory(); |
|
171 |
MemoryRegion *phys_ram = g_new(MemoryRegion, 1); |
|
169 | 172 |
MemoryRegion *phys_flash = g_new(MemoryRegion, 1); |
170 | 173 |
qemu_irq *cpu_irq, irq[32]; |
171 | 174 |
HWSetup *hw; |
... | ... | |
201 | 204 |
|
202 | 205 |
reset_info->flash_base = flash_base; |
203 | 206 |
|
204 |
phys_ram = qemu_ram_alloc(NULL, "lm32_uclinux.sdram", ram_size);
|
|
205 |
cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
|
|
207 |
memory_region_init_ram(phys_ram, NULL, "lm32_uclinux.sdram", ram_size);
|
|
208 |
memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
|
|
206 | 209 |
|
207 | 210 |
memory_region_init_rom_device(phys_flash, &pflash_cfi01_ops_be, |
208 | 211 |
NULL, "lm32_uclinux.flash", flash_size); |
Also available in: Unified diff