git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Complete (almost!) printf fmt support
[lunaix-os.git]
/
lunaix-os
/
kernel
/
asm
/
x86
/
interrupt.S
diff --git
a/lunaix-os/kernel/asm/x86/interrupt.S
b/lunaix-os/kernel/asm/x86/interrupt.S
index 5f3d333c10d6cf0f50f6ad3c175702e6d34fdc9f..9d392734efbbd7e7f640e01c7611984ce193e447 100644
(file)
--- a/
lunaix-os/kernel/asm/x86/interrupt.S
+++ b/
lunaix-os/kernel/asm/x86/interrupt.S
@@
-1,3
+1,6
@@
+#define __ASM__
+#include <arch/x86/interrupts.h>
+
.macro isr_template vector, no_error_code=1
.global _asm_isr\vector
.type _asm_isr\vector, @function
.macro isr_template vector, no_error_code=1
.global _asm_isr\vector
.type _asm_isr\vector, @function
@@
-10,10
+13,21
@@
.endm
.section .text
.endm
.section .text
- isr_template 0
- isr_template 13, no_error_code=0
+ isr_template FAULT_DIVISION_ERROR
+ isr_template FAULT_GENERAL_PROTECTION, no_error_code=0
+ isr_template FAULT_PAGE_FAULT, no_error_code=0
+
+ isr_template LUNAIX_SYS_PANIC
interrupt_wrapper:
interrupt_wrapper:
+ pushl %esp
+ pushl %esi
+ pushl %ebp
+ pushl %edi
+ pushl %edx
+ pushl %ecx
+ pushl %ebx
+ pushl %eax
movl %esp, %eax
andl $0xfffffff0, %esp
movl %esp, %eax
andl $0xfffffff0, %esp
@@
-21,8
+35,18
@@
movl %eax, (%esp)
call interrupt_handler
movl %eax, (%esp)
call interrupt_handler
- pop %eax
+ pop
l
%eax
movl %eax, %esp
movl %eax, %esp
+
+ popl %eax
+ popl %ebx
+ popl %ecx
+ popl %edx
+ popl %edi
+ popl %ebp
+ popl %esi
+ popl %esp
+
addl $8, %esp
iret
\ No newline at end of file
addl $8, %esp
iret
\ No newline at end of file