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

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 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).