From ff1d8c5003fda148b53ab35a31c19d298491c9e1 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 18 Apr 2022 01:40:56 +0200 Subject: [PATCH] Cleanup --- kernel/interupt.c | 2 +- kernel/irq.c | 3 --- kernel/irq.h | 0 kernel/kernel.c | 4 +--- 4 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 kernel/irq.c delete mode 100644 kernel/irq.h diff --git a/kernel/interupt.c b/kernel/interupt.c index cd4ac59..2768540 100644 --- a/kernel/interupt.c +++ b/kernel/interupt.c @@ -31,7 +31,7 @@ void idt_set_desc(uint8 idx, void* isr, uint8 flags) { idt_entry* desc = &IDT[idx]; // get descriptor desc->offset_1 = (uint) isr & 0xffff; - desc->selector = 0x08; // kernel code selector for the GDT (null is 0x0 - 0x4 => code is 0x05 to something...) + desc->selector = 0x08; // kernel code selector for the GDT desc->reserved = 0; desc->type_attr = flags; desc->offset_2 = (uint) isr >> 16; diff --git a/kernel/irq.c b/kernel/irq.c deleted file mode 100644 index 8d12b88..0000000 --- a/kernel/irq.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "io.h" - - diff --git a/kernel/irq.h b/kernel/irq.h deleted file mode 100644 index e69de29..0000000 diff --git a/kernel/kernel.c b/kernel/kernel.c index c49bd10..e0e84cd 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -52,6 +52,7 @@ void print_kernel_stats() { } void kernel_init() { + idt_init(); // Enable interupts vga_init(); // Initialize the screen first // i.e. clear the screen et cetera. @@ -65,7 +66,4 @@ void kernel_init() { clear_screen(); print_kernel_motd(); print_kernel_stats(); - - idt_init(); // Enable interupts - while(true) {} }