Skip to main content

Module pic

Module pic 

Source
Expand description

8259 Programmable Interrupt Controller (PIC): remaps hardware IRQ vectors and signals end-of-interrupt.

Authors: MarioS271

Constants§

PIC_MASTER_CMD_PORT
I/O port for sending commands (including ISR read) to the master PIC.
PIC_MASTER_OFFSET
Vector offset for master-PIC IRQs after remapping; IRQ n fires at PIC_MASTER_OFFSET + n.
PIC_SLAVE_OFFSET
Vector offset for slave-PIC IRQs after remapping; IRQ n fires at PIC_SLAVE_OFFSET + (n - 8).

Statics§

CHAINED_PICS 🔒
The chained master+slave PIC pair, lockable from IRQ handlers.

Functions§

end_of_interrupt
Send an End-of-Interrupt (EOI) for the vector that fired; every hardware IRQ handler must call this before returning or that IRQ line stays blocked.
init
Initialize and remap the PIC, then enable only IRQ0 (PIT timer).