acadia/zion/interrupt/driver_manager.h
Drew Galbraith f26fd73116 [Zion][Denali] Move to MSI for AHCI devices.
This will allow us to properly do interrupts for XHCI devices in the
future.

Also move PCI device header parsing to a shared library.

Get rid of the old irq register format which supplied an irq number and
instead pass the appropriate irq number back out to the caller.
2025-05-05 23:14:01 -07:00

24 lines
541 B
C++

#pragma once
#include <glacier/container/hash_map.h>
#include <glacier/memory/ref_ptr.h>
#include "object/port.h"
class DriverManager {
public:
static DriverManager& Get();
DriverManager();
DriverManager(const DriverManager&) = delete;
DriverManager(DriverManager&&) = delete;
void WriteMessage(uint64_t irq_num, IpcMessage&& message);
[[nodiscard]] glcr::ErrorOr<uint8_t> RegisterListener(
glcr::RefPtr<Port> port);
private:
const uint64_t IRQ_OFFSET = 0x60;
glcr::Vector<glcr::RefPtr<Port>> driver_list_;
};