Files
jsix_import/src/kernel/ahci/hba.h
Justin C. Miller 289104cde0 Enable AHCI interrupts.
* Implement MSI style interrupts
* Move interrupt handling to device_manager for IRQs
* Give device_manager the ability to allocate IRQs
* Move achi::port to an interrupt-based scheme
2018-05-12 18:38:47 -07:00

38 lines
591 B
C++

#pragma once
/// \file hba.h
/// Definition for AHCI host bus adapters
#include "kutil/vector.h"
#include "ahci/port.h"
class pci_device;
namespace ahci {
enum class hba_cap : uint32_t;
enum class hba_cap2 : uint32_t;
struct hba_data;
/// An AHCI host bus adapter
class hba
{
public:
/// Constructor.
/// \arg device The PCI device for this HBA
hba(pci_device *device);
/// Interrupt handler.
void handle_interrupt();
/// Debug: find the first disk
port * find_disk();
private:
pci_device *m_device;
hba_data *m_data;
kutil::vector<port> m_ports;
};
} // namespace ahci