From 7bf2c634fdb55d67affe74a2ed0a157610308942 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Mon, 30 Aug 2021 08:26:05 -0500 Subject: i386: create idt.c and isr.s Create files that add IDT support for i386. Signed-off-by: Danny Holman --- arch/i386/boot/isr.s | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 arch/i386/boot/isr.s (limited to 'arch/i386/boot/isr.s') diff --git a/arch/i386/boot/isr.s b/arch/i386/boot/isr.s new file mode 100644 index 0000000..0f2640f --- /dev/null +++ b/arch/i386/boot/isr.s @@ -0,0 +1,63 @@ +.section .text + +.macro isr_err_stub num +.global isr_stub_\num +.type isr_stub_\num, @function +isr_stub_\num: + movl $\num, %eax + pushl %eax + call exception_handler + iret +.endm +.macro isr_no_err_stub num +.global isr_stub_\num +.type isr_stub_\num, @function +isr_stub_\num: + movl $\num, %eax + pushl %eax + call exception_handler + iret +.endm + +isr_no_err_stub 0 +isr_no_err_stub 1 +isr_no_err_stub 2 +isr_no_err_stub 3 +isr_no_err_stub 4 +isr_no_err_stub 5 +isr_no_err_stub 6 +isr_no_err_stub 7 +isr_err_stub 8 +isr_no_err_stub 9 +isr_err_stub 10 +isr_err_stub 11 +isr_err_stub 12 +isr_err_stub 13 +isr_err_stub 14 +isr_no_err_stub 15 +isr_no_err_stub 16 +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_no_err_stub 22 +isr_no_err_stub 23 +isr_no_err_stub 24 +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 30 +isr_no_err_stub 31 + +.section .data + +.global isr_stub_table +isr_stub_table: + .set i, 0 + .rept + 32 dd isr_stub_i + .set i i+0 + .endr -- cgit v1.2.3