42 kprintf(
"Unhandled exception encountered\n");
52 kprintf(
"Timer interrupt occurred\n");
60 kprintf(
"Page fault handler is not yet set up\n");
68 kprintf(
"Unhandled interrupt encountered\n");
98 inline void Load_lidt(
void *lidtAddress, uint16_t LimitUse)
100 struct [[gnu::packed]]
104 } IDTR = { LimitUse, lidtAddress };
void Remap()
Remap default 8259 PIC interrupt number to new range.
DescriptorEntry idt_table[IDT_ENTRIES]
void RegisterHandler(DescriptorEntry IdtTable[], size_t Idx, func_ptr Handler)
Creates interrupt descriptor entries in idt_table, and loads into CPU.
void Load_lidt(void *lidtAddress, uint16_t LimitUse)
assembly instruction to load idt table to CPU
void kprintf(const char *Str)
Prints string to display.
void idt()
Creates interrupt descriptor table and loads to CPU.
void SetInterruptHandler(DescriptorEntry IdtTable[])
Installs default interrupt handler to all interrupts.
void Install_idt()
Assigns exception and interrupt handler to idt_table, and load to CPU.
const uint16_t IDT_ENTRIES
contains all kernel initialization routines
constexpr uint8_t SEG_OFFSET(const Segment Seg)
Translates code segment enum to code segment selector.
void UnhandledInterrupt()
default unhandled interrupt handler
Exception and interrupt gate descriptor entry.
void SetExceptionHandler(DescriptorEntry IdtTable[])
Installs default exception handler to all exceptions.
const uint8_t INTERRUPT_ACCESS
Interrupt access descriptor.
void UnhandledException()
default unhandled exception handler
void PageFaultHandler()
Page fault handler.
void TimerInterruptHandler()
Timer interrupt handler.