diff options
author | Benji Dial <benji6283@gmail.com> | 2021-01-24 12:00:11 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-01-24 12:00:11 -0500 |
commit | bce944d1498eaa3b6940ee234c863b3548a66b37 (patch) | |
tree | ea40c087ab4f0f236aee8d158cf68550f5209f72 /src/kernel/isrs.asm | |
parent | ca731aa747214919df7b3dfe3478dbe787ce5b68 (diff) | |
download | portland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz |
graphics!
Diffstat (limited to 'src/kernel/isrs.asm')
-rw-r--r-- | src/kernel/isrs.asm | 44 |
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 |