summaryrefslogtreecommitdiff
path: root/arch/i386/boot/isr.s
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/boot/isr.s')
-rw-r--r--arch/i386/boot/isr.s45
1 files changed, 23 insertions, 22 deletions
diff --git a/arch/i386/boot/isr.s b/arch/i386/boot/isr.s
index b5f8be5..76afa9f 100644
--- a/arch/i386/boot/isr.s
+++ b/arch/i386/boot/isr.s
@@ -4,6 +4,7 @@
.global isr_stub_\num
.type isr_stub_\num, @function
isr_stub_\num:
+ cli
pushl $\num
jmp isr_frame_asm
.endm
@@ -11,18 +12,32 @@ isr_stub_\num:
.global isr_stub_\num
.type isr_stub_\num, @function
isr_stub_\num:
+ cli
pushl $0
pushl $\num
jmp isr_frame_asm
.endm
+.macro irq_stub num
+.global irq_stub_\num
+.type irq_stub_\num, @function
+irq_stub_\num:
+ cli
+ pushl $0
+ pushl $\num
+ jmp isr_frame_asm
+.endm
+
+.global syscall_stub
+syscall_stub:
+ pushl $0
+ pushl $0x80
+ jmp isr_frame_asm
+
isr_frame_asm:
- pushl %ebp
- movl %esp, %ebp
pushl %eax
pushl %ebx
pushl %ecx
- pushl %ecx
pushl %edx
pushl %esi
pushl %edi
@@ -36,22 +51,9 @@ isr_frame_asm:
movl %cr4, %eax
pushl %eax
- movw %ds, %ax
- pushl %eax
- pushl $0
- movw $0x10, %ax
- movw %ax, %ds
- movw %ax, %es
- movw %ax, %ss
-
- lea 0xC(%esp), %edi
+ lea -8(%esp), %edi
pushl %edi
- call exception_handler
-
- popl %eax
- popl %eax
- movw %ax, %ds
- movw %ax, %es
+ call interrupt_handler
popl %eax
movl %eax, %cr4
@@ -69,8 +71,7 @@ isr_frame_asm:
popl %ebx
popl %eax
- popl %ebp
- add $0x10, %esp
+ addl $4, %esp
iret
isr_no_err_stub 0
@@ -94,7 +95,7 @@ isr_err_stub 17
isr_no_err_stub 18
isr_no_err_stub 19
isr_no_err_stub 20
-isr_no_err_stub 21
+isr_err_stub 21
isr_no_err_stub 22
isr_no_err_stub 23
isr_no_err_stub 24
@@ -102,6 +103,6 @@ isr_no_err_stub 25
isr_no_err_stub 26
isr_no_err_stub 27
isr_no_err_stub 28
-isr_no_err_stub 29
+isr_err_stub 29
isr_err_stub 30
isr_no_err_stub 31