diff --git a/interrupt_entry.s b/interrupt_entry.s index 903adb4..fe736f8 100644 --- a/interrupt_entry.s +++ b/interrupt_entry.s @@ -120,7 +120,33 @@ no_err_handler 31 common_irq_handler: - ret + pusha + push ds + push es + push fs + push gs + + mov ax, 0x10 + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + + mov eax, esp + push eax + mov eax, irq_handler + call eax + pop eax + + pop gs + pop fs + pop es + pop ds + + popa + add esp, 8 + iret + ; Remapped IRQ's for the APIC diff --git a/interrupts.c b/interrupts.c index 6c32892..b87acbc 100644 --- a/interrupts.c +++ b/interrupts.c @@ -114,6 +114,9 @@ void interrupt_handler(struct cpu_reg_state* cpu) { return; } +void irq_handler() { +} + void init_idt() { // setup special idt pointer idt_ptr.address = (u32)(&IDT);