From 457a2117706cdaee34f894e67c89da7bf29f6143 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 12 Apr 2021 10:28:04 +0200 Subject: Refactoring --- src/core/idt.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/core/idt.c (limited to 'src/core/idt.c') diff --git a/src/core/idt.c b/src/core/idt.c new file mode 100644 index 0000000..4e08d62 --- /dev/null +++ b/src/core/idt.c @@ -0,0 +1,39 @@ +#include "idt.h" + +struct IDT_REGISTER IDTR={ + 8*IDT_MAX_ENTRY, + 0x0 +}; + +// Interrupt functions (cf int.S) +extern u32 +INT_DEFAULT, +INT_PAGE_FAULT, +INT_CLOCK, +INT_KEYPRESS, +INT_SYSCALL; + + +void idt_init(){ + // Map first default 32 entries + for(int i=0;i