*q++ = 0; /* min */
*q++ = 0; /* sec */
*q++ = 0; /* frame */
- *q++ = 0;
- *q++ = 0;
- *q++ = 0;
- *q++ = 0;
+ if (msf) {
+ *q++ = 0;
+ lba_to_msf(q, 0);
+ q += 3;
+ } else {
+ *q++ = 0;
+ *q++ = 0;
+ *q++ = 0;
+ *q++ = 0;
+ }
len = q - buf;
cpu_to_ube16(buf, len - 2);
unit = (val >> 4) & 1;
s = ide_if + unit;
ide_if->cur_drive = s;
-#ifdef TARGET_PPC
- /* XXX: currently a workaround for Darwin/PPC. Need to check
- the IDE spec to see if it is correct */
- ide_set_signature(s);
-#endif
break;
default:
case 7:
if (!ide_state)
return;
- ide_init2(ide_state, hd0, hd1, pic_set_irq_new, NULL, irq);
+ ide_init2(ide_state, hd0, hd1, pic_set_irq_new, isa_pic, irq);
ide_init_ioport(ide_state, iobase, iobase2);
}
pci_conf[0x01] = 0x80;
pci_conf[0x02] = 0x10;
pci_conf[0x03] = 0x70;
+ pci_conf[0x09] = 0x80; // legacy ATA mode
pci_conf[0x0a] = 0x01; // class_sub = PCI_IDE
pci_conf[0x0b] = 0x01; // class_base = PCI_mass_storage
pci_conf[0x0e] = 0x00; // header_type
PCI_ADDRESS_SPACE_IO, bmdma_map);
ide_init2(&d->ide_if[0], hd_table[0], hd_table[1],
- pic_set_irq_new, NULL, 14);
+ pic_set_irq_new, isa_pic, 14);
ide_init2(&d->ide_if[2], hd_table[2], hd_table[3],
- pic_set_irq_new, NULL, 15);
+ pic_set_irq_new, isa_pic, 15);
ide_init_ioport(&d->ide_if[0], 0x1f0, 0x3f6);
ide_init_ioport(&d->ide_if[2], 0x170, 0x376);
}