Revision 2b90ca04
b/hw/milkymist.c | ||
---|---|---|
29 | 29 |
#include "blockdev.h" |
30 | 30 |
#include "milkymist-hw.h" |
31 | 31 |
#include "lm32.h" |
32 |
#include "exec-memory.h" |
|
32 | 33 |
|
33 | 34 |
#define BIOS_FILENAME "mmone-bios.bin" |
34 | 35 |
#define BIOS_OFFSET 0x00860000 |
... | ... | |
81 | 82 |
CPUState *env; |
82 | 83 |
int kernel_size; |
83 | 84 |
DriveInfo *dinfo; |
84 |
ram_addr_t phys_sdram; |
|
85 |
MemoryRegion *address_space_mem = get_system_memory(); |
|
86 |
MemoryRegion *phys_sdram = g_new(MemoryRegion, 1); |
|
85 | 87 |
MemoryRegion *phys_flash = g_new(MemoryRegion, 1); |
86 | 88 |
qemu_irq irq[32], *cpu_irq; |
87 | 89 |
int i; |
... | ... | |
109 | 111 |
|
110 | 112 |
cpu_lm32_set_phys_msb_ignore(env, 1); |
111 | 113 |
|
112 |
phys_sdram = qemu_ram_alloc(NULL, "milkymist.sdram", sdram_size); |
|
113 |
cpu_register_physical_memory(sdram_base, sdram_size, |
|
114 |
phys_sdram | IO_MEM_RAM); |
|
114 |
memory_region_init_ram(phys_sdram, NULL, "milkymist.sdram", sdram_size); |
|
115 |
memory_region_add_subregion(address_space_mem, sdram_base, phys_sdram); |
|
115 | 116 |
|
116 | 117 |
memory_region_init_rom_device(phys_flash, &pflash_cfi01_ops_be, |
117 | 118 |
NULL, "milkymist.flash", flash_size); |
Also available in: Unified diff