summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/interrupts/isr_stub.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/i386/interrupts/isr_stub.s')
-rw-r--r--src/kernel/arch/i386/interrupts/isr_stub.s25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/kernel/arch/i386/interrupts/isr_stub.s b/src/kernel/arch/i386/interrupts/isr_stub.s
new file mode 100644
index 0000000..a8a97b3
--- /dev/null
+++ b/src/kernel/arch/i386/interrupts/isr_stub.s
@@ -0,0 +1,25 @@
+.section .text
+
+.global _isr_stubs
+_isr_stubs:
+
+.rept 256
+ .align 8
+ pushal
+ call _isr_stage2
+.endr
+
+_isr_stage2:
+ cld
+
+ // convert the return address into the vector nr
+ pop %eax
+ add $-_isr_stubs, %eax
+ shr $3, %eax
+ push %eax
+
+ call isr_stage3
+ add $4, %esp
+
+ popal
+ iret