Initialize hardware interrupts

This commit is contained in:
Eryn Wells 2016-03-06 13:00:38 -05:00
parent 1d9766b319
commit 49afcdfadf

View file

@ -2,6 +2,7 @@
#include <stdint.h>
#include "Console.hh"
#include "Descriptors.hh"
#include "PIC.hh"
#if defined(__linux__)
#error "This file should be compiled with a cross-compiler, not the Linux system compiler!"
@ -53,4 +54,9 @@ kmain()
idt.load();
console.writeString("IDT loaded\n");
auto pic = kernel::x86::PIC::systemPIC();
pic.remap(0x20, 0x28, 2); // Map hardware IRQs to interrupt vectors 32 through 48.
console.writeString("Hardware interrupts programmed\n");
}