mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:47:35 +00:00
Kernel/Storage: Add a whole bunch of AHCI debug output
This commit is contained in:
parent
b7dd5dc7c3
commit
cf9ce0d857
3 changed files with 52 additions and 4 deletions
|
@ -44,6 +44,9 @@ AHCIPortHandler::AHCIPortHandler(AHCIController& controller, u8 irq, AHCI::Maske
|
|||
for (size_t index = 0; index < (((size_t)AHCI::Limits::MaxPorts * 512) / PAGE_SIZE); index++) {
|
||||
m_identify_metadata_pages.append(MM.allocate_supervisor_physical_page().release_nonnull());
|
||||
}
|
||||
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port Handler: IRQ {}", irq);
|
||||
|
||||
// Clear pending interrupts, if there are any!
|
||||
m_pending_ports_interrupts.set_all();
|
||||
enable_irq();
|
||||
|
@ -101,9 +104,11 @@ AHCIPortHandler::~AHCIPortHandler()
|
|||
|
||||
void AHCIPortHandler::handle_irq(const RegisterState&)
|
||||
{
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port Handler: IRQ received");
|
||||
for (auto port_index : m_pending_ports_interrupts.to_vector()) {
|
||||
auto port = m_handled_ports.get(port_index);
|
||||
VERIFY(port.has_value());
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port Handler: Handling IRQ for port {}", port_index);
|
||||
port.value()->handle_interrupt();
|
||||
// We do this to clear the pending interrupt after we handled it.
|
||||
m_pending_ports_interrupts.set_at(port_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue