Revision 7ffab4d7 hw/realview.c
b/hw/realview.c | ||
---|---|---|
29 | 29 |
const char *initrd_filename, const char *cpu_model) |
30 | 30 |
{ |
31 | 31 |
CPUState *env; |
32 |
ram_addr_t ram_offset; |
|
32 | 33 |
qemu_irq *pic; |
33 | 34 |
void *scsi_hba; |
34 | 35 |
PCIBus *pci_bus; |
... | ... | |
64 | 65 |
} |
65 | 66 |
} |
66 | 67 |
|
68 |
ram_offset = qemu_ram_alloc(ram_size); |
|
67 | 69 |
/* ??? RAM should repeat to fill physical memory space. */ |
68 | 70 |
/* SDRAM at address zero. */ |
69 |
cpu_register_physical_memory(0, ram_size, IO_MEM_RAM); |
|
71 |
cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM);
|
|
70 | 72 |
|
71 | 73 |
arm_sysctl_init(0x10000000, 0xc1400400); |
72 | 74 |
|
... | ... | |
182 | 184 |
/* 0x68000000 PCI mem 1. */ |
183 | 185 |
/* 0x6c000000 PCI mem 2. */ |
184 | 186 |
|
187 |
/* ??? Hack to map an additional page of ram for the secondary CPU |
|
188 |
startup code. I guess this works on real hardware because the |
|
189 |
BootROM happens to be in ROM/flash or in memory that isn't clobbered |
|
190 |
until after Linux boots the secondary CPUs. */ |
|
191 |
ram_offset = qemu_ram_alloc(0x1000); |
|
192 |
cpu_register_physical_memory(0x80000000, 0x1000, ram_offset | IO_MEM_RAM); |
|
193 |
|
|
185 | 194 |
realview_binfo.ram_size = ram_size; |
186 | 195 |
realview_binfo.kernel_filename = kernel_filename; |
187 | 196 |
realview_binfo.kernel_cmdline = kernel_cmdline; |
188 | 197 |
realview_binfo.initrd_filename = initrd_filename; |
189 | 198 |
realview_binfo.nb_cpus = ncpu; |
190 | 199 |
arm_load_kernel(first_cpu, &realview_binfo); |
191 |
|
|
192 |
/* ??? Hack to map an additional page of ram for the secondary CPU |
|
193 |
startup code. I guess this works on real hardware because the |
|
194 |
BootROM happens to be in ROM/flash or in memory that isn't clobbered |
|
195 |
until after Linux boots the secondary CPUs. */ |
|
196 |
cpu_register_physical_memory(0x80000000, 0x1000, IO_MEM_RAM + ram_size); |
|
197 | 200 |
} |
198 | 201 |
|
199 | 202 |
QEMUMachine realview_machine = { |
Also available in: Unified diff