Interrupt Dispatch and Handling (for first common vectors)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user