diff options
author | Danny Holman <dholman@gymli.org> | 2022-01-15 16:24:08 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2022-01-15 16:25:41 -0600 |
commit | 06121c7075e91056820c674f192be460ef5eb656 (patch) | |
tree | 2d49c1ebfc0255877bf613d53dfd2723e48d8383 /arch/i386/boot/idt.c | |
parent | acc73186bc3de78ceb0a54cbf2605dff1b9a6d62 (diff) |
arch: i386: add support for IRQs and system calls
Add support for rudementary system calls and IRQ interrupts.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot/idt.c')
-rw-r--r-- | arch/i386/boot/idt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/boot/idt.c b/arch/i386/boot/idt.c index dbcfaa2..0789a17 100644 --- a/arch/i386/boot/idt.c +++ b/arch/i386/boot/idt.c @@ -1,4 +1,4 @@ -#include <kernel/idt.h> +#include "syscall.h" #include <kernel/isr.h> #include <kernel/io.h> #include <kernel/pic.h> @@ -157,6 +157,10 @@ void idt_install(void) { idt_set_gate(30, isr_stub_30, 0x08, IDT_EXCEPTION); idt_set_gate(31, isr_stub_31, 0x08, IDT_EXCEPTION); + idt_set_gate(128, syscall_stub, 0x08, IDT_INTERRUPT); + + register_syscall(halt_catch_fire, 0); + __asm__ volatile("lidt %0" : : "memory"(idtr)); __asm__ volatile("sti"); } |