Revision 0d913fdb hw/ppc_oldworld.c
b/hw/ppc_oldworld.c | ||
---|---|---|
113 | 113 |
int vga_bios_size, bios_size; |
114 | 114 |
qemu_irq *dummy_irq; |
115 | 115 |
int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index; |
116 |
int ide_mem_index[2]; |
|
116 | 117 |
int ppc_boot_device; |
117 | 118 |
|
118 | 119 |
linux_boot = (kernel_filename != NULL); |
... | ... | |
213 | 214 |
initrd_base = 0; |
214 | 215 |
initrd_size = 0; |
215 | 216 |
ppc_boot_device = '\0'; |
216 |
for (i = 0; i < boot_device[i] != '\0'; i++) { |
|
217 |
ppc_boot_device = boot_device[i]; |
|
217 |
for (i = 0; boot_device[i] != '\0'; i++) { |
|
218 | 218 |
/* TOFIX: for now, the second IDE channel is not properly |
219 |
* emulated. The Mac floppy disk are not emulated.
|
|
219 |
* used by OHW. The Mac floppy disk are not emulated.
|
|
220 | 220 |
* For now, OHW cannot boot from the network. |
221 | 221 |
*/ |
222 | 222 |
#if 0 |
223 |
if (ppc_boot_device >= 'a' && ppc_boot_device <= 'f') |
|
223 |
if (boot_device[i] >= 'a' && boot_device[i] <= 'f') { |
|
224 |
ppc_boot_device = boot_device[i]; |
|
224 | 225 |
break; |
226 |
} |
|
225 | 227 |
#else |
226 |
if (ppc_boot_device >= 'c' && ppc_boot_device <= 'd') |
|
228 |
if (boot_device[i] >= 'c' && boot_device[i] <= 'd') { |
|
229 |
ppc_boot_device = boot_device[i]; |
|
227 | 230 |
break; |
231 |
} |
|
228 | 232 |
#endif |
229 | 233 |
} |
230 | 234 |
if (ppc_boot_device == '\0') { |
... | ... | |
278 | 282 |
nd_table[i].model = "ne2k_pci"; |
279 | 283 |
pci_nic_init(pci_bus, &nd_table[i], -1); |
280 | 284 |
} |
281 |
|
|
285 |
|
|
286 |
/* First IDE channel is a CMD646 on the PCI bus */ |
|
282 | 287 |
pci_cmd646_ide_init(pci_bus, &bs_table[0], 0); |
288 |
/* Second IDE channel is a MAC IDE on the MacIO bus */ |
|
289 |
ide_mem_index[0] = -1; |
|
290 |
ide_mem_index[1] = pmac_ide_init(&bs_table[2], pic[0x0D]); |
|
283 | 291 |
|
284 | 292 |
/* cuda also initialize ADB */ |
285 | 293 |
cuda_init(&cuda_mem_index, pic[0x12]); |
... | ... | |
293 | 301 |
dbdma_init(&dbdma_mem_index); |
294 | 302 |
|
295 | 303 |
macio_init(pci_bus, 0x0017, 1, pic_mem_index, dbdma_mem_index, |
296 |
cuda_mem_index, nvr, 0, NULL);
|
|
304 |
cuda_mem_index, nvr, 2, ide_mem_index);
|
|
297 | 305 |
|
298 | 306 |
if (usb_enabled) { |
299 | 307 |
usb_ohci_init_pci(pci_bus, 3, -1); |
Also available in: Unified diff