diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-05 16:09:03 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-05 16:09:03 +0200 |
commit | 13ab5aef4da9ded93d7c93442911554e86ea9714 (patch) | |
tree | e9efd37e3c65f3e0be9293f64f0f03e0ad2f4336 /src/idt/stubs.S | |
parent | Add makefile notes (diff) | |
download | kernel.cpp-13ab5aef4da9ded93d7c93442911554e86ea9714.tar.xz |
add broken Scheduler
Diffstat (limited to 'src/idt/stubs.S')
-rw-r--r-- | src/idt/stubs.S | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/idt/stubs.S b/src/idt/stubs.S index 97f1797..4f1440d 100644 --- a/src/idt/stubs.S +++ b/src/idt/stubs.S @@ -2,6 +2,7 @@ .section .text .extern handle_interrupt +.extern handle_exception .macro interrupt num .global interrupt\num @@ -16,14 +17,14 @@ interrupt\num: exception\num: push $0 push $\num - jmp interrupt_common + jmp exception_common .endm .macro exception_ec num .global exception\num exception\num: push $\num - jmp interrupt_common + jmp exception_common .endm /* exceptions */ @@ -67,12 +68,25 @@ interrupt 0x0d # fpu interrupt 0x0e # primary ATA interrupt 0x0f # secondary ATA +exception_common: + pusha + + push %esp + call handle_exception + mov %eax, %esp + + popa + /* remove error code and irq from stack */ + add $8, %esp + + iret + interrupt_common: pusha push %esp call handle_interrupt - mov %eax, %esp + add $4, %esp popa /* remove error code and irq from stack */ |