Expand description
8259 Programmable Interrupt Controller (PIC): remaps hardware IRQ vectors and signals end-of-interrupt.
Authors: MarioS271
Re-exportsยง
use crate::lib::sync::irq_mutex::IrqMutex;๐use pic8259::ChainedPics;๐
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
nfires atPIC_MASTER_OFFSET + n. - PIC_
SLAVE_ OFFSET - Vector offset for slave-PIC IRQs after remapping; IRQ
nfires atPIC_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).