Revision dffc07ca
b/hw/ppc_newworld.c | ||
---|---|---|
134 | 134 |
int nvram_mem_index; |
135 | 135 |
int vga_bios_size, bios_size; |
136 | 136 |
int pic_mem_index, dbdma_mem_index, cuda_mem_index, escc_mem_index; |
137 |
int ide_mem_index[3]; |
|
137 | 138 |
int ppc_boot_device; |
138 | 139 |
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; |
139 | 140 |
void *fw_cfg; |
... | ... | |
364 | 365 |
fprintf(stderr, "qemu: too many IDE bus\n"); |
365 | 366 |
exit(1); |
366 | 367 |
} |
367 |
for(i = 0; i < MAX_IDE_BUS * MAX_IDE_DEVS; i++) { |
|
368 |
hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS); |
|
369 |
} |
|
370 | 368 |
dbdma = DBDMA_init(&dbdma_mem_index); |
371 |
pci_cmd646_ide_init(pci_bus, hd, 0); |
|
369 |
|
|
370 |
/* We only emulate 2 out of 3 IDE controllers for now */ |
|
371 |
ide_mem_index[0] = -1; |
|
372 |
hd[0] = drive_get(IF_IDE, 0, 0); |
|
373 |
hd[1] = drive_get(IF_IDE, 0, 1); |
|
374 |
ide_mem_index[1] = pmac_ide_init(hd, pic[0x0d], dbdma, 0x16, pic[0x02]); |
|
375 |
hd[0] = drive_get(IF_IDE, 1, 0); |
|
376 |
hd[1] = drive_get(IF_IDE, 1, 1); |
|
377 |
ide_mem_index[2] = pmac_ide_init(hd, pic[0x0e], dbdma, 0x1a, pic[0x02]); |
|
372 | 378 |
|
373 | 379 |
/* cuda also initialize ADB */ |
374 | 380 |
cuda_init(&cuda_mem_index, pic[0x19]); |
... | ... | |
378 | 384 |
|
379 | 385 |
|
380 | 386 |
macio_init(pci_bus, PCI_DEVICE_ID_APPLE_UNI_N_KEYL, 0, pic_mem_index, |
381 |
dbdma_mem_index, cuda_mem_index, NULL, 0, NULL,
|
|
387 |
dbdma_mem_index, cuda_mem_index, NULL, 3, ide_mem_index,
|
|
382 | 388 |
escc_mem_index); |
383 | 389 |
|
384 | 390 |
if (usb_enabled) { |
Also available in: Unified diff