Soft reset on IDE device 1 causes the assertion of PDIAG- which causes the error register of device 0 to also be set to 1, indicating diagnostics passed successfully (+ a PIIX3 fix), fixes #4002.

This commit is contained in:
OBattler
2024-01-08 02:35:03 +01:00
parent 86d7c248f4
commit 215c507634
2 changed files with 11 additions and 1 deletions

View File

@@ -597,6 +597,12 @@ piix_write(int func, int addr, uint8_t val, void *priv)
pci_set_mirq_routing(PCI_MIRQ0 + (addr & 0x01), PCI_IRQ_DISABLED);
else
pci_set_mirq_routing(PCI_MIRQ0 + (addr & 0x01), val & 0xf);
if (dev->type == 3) {
if (val & 0x20)
sff_set_irq_mode(dev->bm[1], IRQ_MODE_MIRQ_0);
else
sff_set_irq_mode(dev->bm[1], IRQ_MODE_LEGACY);
}
piix_log("MIRQ%i is %s\n", addr & 0x01, (val & 0x20) ? "disabled" : "enabled");
}
break;