summaryrefslogtreecommitdiff
path: root/src/kernel/isrs.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/isrs.asm')
-rw-r--r--src/kernel/isrs.asm44
1 files changed, 37 insertions, 7 deletions
diff --git a/src/kernel/isrs.asm b/src/kernel/isrs.asm
index 472bb40..02b046d 100644
--- a/src/kernel/isrs.asm
+++ b/src/kernel/isrs.asm
@@ -22,8 +22,9 @@ extern advance_active_task
extern on_kbd_isr
extern make_sure_tasks
extern exception_halt
+extern pf_check_stack
-n_syscalls equ 0x10
+n_syscalls equ 0x19
;section .bss
;_debug_is_start_task resb 1
@@ -149,30 +150,59 @@ kbd_isr:
udf_isr:
push 0
push udid
- call exception_halt
+ jmp exception
dfa_isr:
push dfid
- call exception_halt
+ jmp exception
tsf_isr:
push tsid
- call exception_halt
+ jmp exception
npf_isr:
push npid
- call exception_halt
+ jmp exception
ssf_isr:
push ssid
- call exception_halt
+ jmp exception
gpf_isr:
push gpid
- call exception_halt
+ jmp exception
pff_isr:
+ push eax
+ push ecx
+ push edx
+
+ mov eax, cr2
+ push eax
+ call pf_check_stack
+ add esp, 4
+
+ pop edx
+ pop ecx
+ test eax, eax
+ jz .not_stack
+
+ pop eax
+ add esp, 4
+ iret
+
+.not_stack:
+ pop eax
push pfid
+ jmp exception
+
+exception:
+ push edi
+ push esi
+ push edx
+ push ecx
+ push ebx
+ push eax
call exception_halt
section .rodata