rustubs/arch/x86_64/interrupt/
plugbox.rs

1//! Registrar of IRQ handling routines
2
3use crate::arch::x86_64::interrupt::pit::PIT;
4use crate::defs::IntNumber as INT;
5use crate::machine::keyctrl::KeyboardDriver;
6use crate::proc::sync::IRQGate;
7use crate::proc::sync::IRQHandlerEpilogue;
8use alloc::collections::BTreeMap;
9use lazy_static::lazy_static;
10lazy_static! {
11	/// interrupt handler lookup table. For now it's built at compile time and
12	/// is immutable. Later we may ... make it hot pluggable?
13	pub static ref IRQ_GATE_MAP: BTreeMap<u16, IRQGate> = [
14		(INT::TIMER,    PIT::get_gate()),
15		(INT::KEYBOARD, KeyboardDriver::get_gate()),
16	].iter().copied().collect();
17}