From 30d39222f34cbee80780625b23636113c5393899 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 6 May 2022 08:43:02 +0200 Subject: [PATCH] Minor refactor --- kernel/idt.c | 7 +++++-- kernel/idt.h | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/idt.c b/kernel/idt.c index 27d57d7..77b140a 100644 --- a/kernel/idt.c +++ b/kernel/idt.c @@ -1,4 +1,7 @@ #include "idt.h" +// VGA stuff +extern void set_cursor_pos(uint, uint); +extern void print(char*, int); typedef struct { uint16 offset_1; // offset 0 to 15 bits @@ -18,7 +21,7 @@ static idt_entry IDT[IDT_MAX_DESCS]; static idtr IDTR; void interupt_handler(uint interupt) { - pic_send_eoi(interupt); + pic_send_eoi(interupt); // ack int char* buf; set_cursor_pos(0, 0); @@ -30,7 +33,7 @@ void interupt_handler(uint interupt) { void idt_set_desc(uint8 idx, void* isr, uint8 flags) { idt_entry* desc = &IDT[idx]; // get descriptor - uint* gdt_code_ptr = 0xee88; + uint* gdt_code_ptr = (uint*)0xee88; uint8 gdt_code = *gdt_code_ptr; desc->offset_1 = (uint) isr & 0xffff; diff --git a/kernel/idt.h b/kernel/idt.h index 622454c..c1812c7 100644 --- a/kernel/idt.h +++ b/kernel/idt.h @@ -1,12 +1,12 @@ #include "../lib/types.h" #include "pic.h" -#include "../drivers/vga.h" +//#include "../drivers/vga.h" #include "../lib/conv.h" #define IDT_MAX_DESCS 256 #define EXC_COLOR 0x08 -__attribute__((noreturn)) +//__attribute__((noreturn)) void interupt_handler(uint); void idt_set_desc(uint8, void*, uint8);