27 constinit static auto isrList {std::array<isr_t, ISR_SIZE> {}};
54 void isrHandler(
const igros::x86::register_t* regs)
noexcept {
81 UNHANDLED! CPU halted!
83 (isIrq ? "IRQ" :
"EXCEPTION"),
87 igros::x86::cpu::dumpRegisters(regs);
89 igros::x86::cpu::halt();
static void disable() noexcept
Disable interrupts.
static void eoi(const irq_t number) noexcept
Send EOI (IRQ done).
static auto isSpurious(const irq_t number) noexcept -> bool
Check if IRQ is spurious (only lines 7 and 15 can be).
std::size_t igros_usize_t
Unsigned size.
std::uint32_t igros_dword_t
32-bit unsigned integer
void isrHandler(const igros::x86::register_t *regs) noexcept
Interrupts handler function (called from isr.s).
Interrupts low-level operations.
Kernel text print functions.
void kprintf(const char *const format,...) noexcept
Kernel printf function (arguments are checked against format at compile time).
Code shared by i386 and x86_64: ports, interrupts, exceptions, paging.
static constinit auto isrList
Interrupt handlers.
void isrHandlerInstall(const igros_usize_t number, const isr_t handle) noexcept
Install interrupt service routine handler.
void isrHandlerUninstall(const igros_usize_t number) noexcept
Uninstall interrupt service routine handler.
constexpr auto irqFromVector(const igros_usize_t vector) noexcept -> irq_t
IRQ line of interrupt vector (vector must be IRQ vector).
constexpr auto isIrqVector(const igros_usize_t vector) noexcept -> bool
Check if interrupt vector belongs to IRQ line.
std::add_pointer_t< void(const register_t *const)> isr_t
Interrupt service routine handler type.
@ ATA_SECONDARY
Slave PIC spurious.
constexpr auto IRQ_OFFSET
IRQ offset in ISR list.
x86 family current (native) architecture selection
IO low-level port operations.
Interrupts low-level operations.