PATAChannel: Alert user when no PCI device is found

This helps aid debugging of issues such as #695, where the bridge chip
that controls IDE is NOT a PIIX3/4 compatible controller. Instead of
just hanging when the DMA registers can't be accessed, the system will
inform the user that no valid IDE controller has been found. In this
case, the system will not attempt to initialise the DMA registers and
instead use PIO mode.
This commit is contained in:
Jesse Buhagiar 2019-11-01 14:30:10 +11:00 committed by Andreas Kling
parent 1b2ef8582c
commit 6c1a549057
Notes: sideshowbarker 2024-07-19 11:23:44 +09:00

View file

@ -124,6 +124,8 @@ void PATAChannel::initialize()
m_bus_master_base = PCI::get_BAR4(m_pci_address) & 0xfffc;
m_dma_buffer_page = MM.allocate_supervisor_physical_page();
kprintf("PATAChannel: PIIX Bus master IDE: I/O @ %x\n", m_bus_master_base);
} else {
kprintf("PATAChannel: Unable to find valid PATAChannel controller! Falling back to PIO mode!\n");
}
}