#pragma once #include #include #include namespace Kernel { class InterruptController { public: virtual ~InterruptController() {} virtual void eoi(uint8_t) = 0; virtual void enable_irq(uint8_t) = 0; virtual bool is_in_service(uint8_t) = 0; static void initialize(bool force_pic); static bool is_initialized(); static InterruptController& get(); virtual void initialize_multiprocessor() = 0; virtual void broadcast_ipi() = 0; virtual void enable() = 0; virtual BAN::ErrorOr reserve_irq(uint8_t irq) = 0; virtual BAN::Optional get_free_irq() = 0; bool is_using_apic() const { return m_using_apic; } private: bool m_using_apic { false }; }; }