Interrupt Dispatch and Handling (for first common vectors)

This commit is contained in:
2025-12-22 21:04:45 +01:00
parent d0b4da0596
commit 42fc169e10
6 changed files with 30 additions and 4 deletions

View File

@@ -44,13 +44,14 @@ void idt_init()
// Each vector handler is 16-byte aligned, so <vector_no>*16 = address of that handler
idt_set_entry(i, vector_0_handler + (i*16), 0);
}
idt_load(&idt);
serial_kputs("kernel: idt: Initialized IDT!\n");
}
struct cpu_status_t* interrupt_dispatch(struct cpu_status_t* context)
{
switch(context->vector_number)
{
// TODO: add serial logs for all interrupts
case 0:
serial_kputs("kernel: idt: Divide Error!\n");
break;