summaryrefslogtreecommitdiff
path: root/arch/i386
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-11-26 18:28:16 -0600
committerDanny Holman <dholman@gymli.org>2023-11-26 18:28:16 -0600
commit00c05974661bd1b55b75cfc7a829ac9f7b14b989 (patch)
tree5c6064599a5a371d84115d30ee1dbcf1dae4d648 /arch/i386
parenta6475b60dd1420877fd6ba438f5400fac42f04ba (diff)
arch: i386: isr.s: create the irq stubs
Create the ISR stubs for use by IRQ handlers. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/isr.s24
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/i386/boot/isr.s b/arch/i386/boot/isr.s
index 893dd1f..5bd63ed 100644
--- a/arch/i386/boot/isr.s
+++ b/arch/i386/boot/isr.s
@@ -24,7 +24,7 @@ isr_stub_\num:
irq_stub_\num:
cli
pushl $0
- pushl $\num
+ pushl $\num+32
jmp isr_frame_asm
.endm
@@ -41,6 +41,7 @@ isr_frame_asm:
pushl %edx
pushl %esi
pushl %edi
+ pushl %esp
movl %cr0, %eax
pushl %eax
@@ -51,7 +52,7 @@ isr_frame_asm:
movl %cr4, %eax
pushl %eax
- pushl %esp
+ cld
call interrupt_handler
popl %eax
@@ -63,6 +64,7 @@ isr_frame_asm:
popl %eax
movl %eax, %cr0
+ popl %esp
popl %edi
popl %esi
popl %edx
@@ -70,7 +72,6 @@ isr_frame_asm:
popl %ebx
popl %eax
- addl $20, %esp
iret
isr_no_err_stub 0
@@ -105,3 +106,20 @@ isr_no_err_stub 28
isr_err_stub 29
isr_err_stub 30
isr_no_err_stub 31
+
+irq_stub 0
+irq_stub 1
+irq_stub 2
+irq_stub 3
+irq_stub 4
+irq_stub 5
+irq_stub 6
+irq_stub 7
+irq_stub 8
+irq_stub 9
+irq_stub 10
+irq_stub 11
+irq_stub 12
+irq_stub 13
+irq_stub 14
+irq_stub 15