20 #ifndef KERNEL_MACHINE_PPC_COMMON_PIC_H 21 #define KERNEL_MACHINE_PPC_COMMON_PIC_H 23 #include "pedigree/kernel/machine/IrqManager.h" 24 #include "pedigree/kernel/processor/InterruptManager.h" 25 #include "pedigree/kernel/processor/MemoryMappedIo.h" 34 #define OPENPIC_REG_TASK_PRIORITY 0x20080 35 #define OPENPIC_REG_ACK 0x200A0 36 #define OPENPIC_REG_EOI 0x200B0 39 #define OPENPIC_REG_FEATURE 0x01000 40 #define OPENPIC_REG_CONF0 0x01020 41 #define OPENPIC_FLAG_CONF0_P \ 42 0x20000000 // 8259 passthrough DISABLE - 8259 passthrough is enabled by 45 #define OPENPIC_REG_SPURIOUS 0x010E0 48 #define OPENPIC_SOURCE_START 0x10000 49 #define OPENPIC_SOURCE_END 0x20000 51 #define OPENPIC_SOURCE_MASK 0x80000000 52 #define OPENPIC_SOURCE_ACT 0x40000000 53 #define OPENPIC_SOURCE_PRIORITY 0x00080000 // Default priority = 15 (highest) 69 virtual irq_id_t registerIsaIrqHandler(uint8_t irq,
IrqHandler *handler);
70 virtual irq_id_t registerPciIrqHandler(
IrqHandler *handler);
93 void searchNode(
class Device *pDev);
98 virtual void interrupt(
size_t interruptNumber, InterruptState &state);
100 void eoi(uint8_t irq);
101 void enable(uint8_t irq,
bool enable);
102 void enableAll(
bool enable);
118 uint32_t reserved0 : 5;
119 uint32_t num_irq : 11;
120 uint32_t reserved1 : 3;
121 uint32_t num_cpu : 5;
122 uint32_t version : 8;
OpenPic & operator=(const OpenPic &)
OpenPic() INITIALISATION_ONLY
static OpenPic m_Instance
#define INITIALISATION_ONLY
Abstrace base class for hardware I/O capabilities.
virtual void acknowledgeIrq(irq_id_t Id)
bool initialise() INITIALISATION_ONLY
virtual void interrupt(size_t interruptNumber, InterruptState &state)
IrqHandler * m_Handler[64]
static OpenPic & instance()
Abstract base class for interrupt-handlers.
virtual void unregisterHandler(irq_id_t Id, IrqHandler *handler)