master
E. Almqvist 3 years ago
parent ced00ad854
commit ff1d8c5003
  1. 2
      kernel/interupt.c
  2. 3
      kernel/irq.c
  3. 0
      kernel/irq.h
  4. 4
      kernel/kernel.c

@ -31,7 +31,7 @@ void idt_set_desc(uint8 idx, void* isr, uint8 flags) {
idt_entry* desc = &IDT[idx]; // get descriptor idt_entry* desc = &IDT[idx]; // get descriptor
desc->offset_1 = (uint) isr & 0xffff; 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->reserved = 0;
desc->type_attr = flags; desc->type_attr = flags;
desc->offset_2 = (uint) isr >> 16; desc->offset_2 = (uint) isr >> 16;

@ -1,3 +0,0 @@
#include "io.h"

@ -52,6 +52,7 @@ void print_kernel_stats() {
} }
void kernel_init() { void kernel_init() {
idt_init(); // Enable interupts
vga_init(); // Initialize the screen first vga_init(); // Initialize the screen first
// i.e. clear the screen et cetera. // i.e. clear the screen et cetera.
@ -65,7 +66,4 @@ void kernel_init() {
clear_screen(); clear_screen();
print_kernel_motd(); print_kernel_motd();
print_kernel_stats(); print_kernel_stats();
idt_init(); // Enable interupts
while(true) {}
} }

Loading…
Cancel
Save