Create a system interrupt handler and call initialize()

Loads interrupt table and programs PIC chips
This commit is contained in:
Eryn Wells 2016-03-09 01:23:06 -05:00
parent 6677af27f6
commit 3e973716f8
2 changed files with 8 additions and 10 deletions

View file

@ -7,6 +7,7 @@
*/
#include "Interrupts.hh"
#include "Console.hh"
namespace x86 {
@ -34,8 +35,12 @@ InterruptHandler::InterruptHandler()
void
InterruptHandler::initialize()
{
auto console = kernel::Console::systemConsole();
mIDT.load();
console.writeString("Interrupt table loaded\n");
mPIC.remap(0x20, 0x28, 2); // Map hardware IRQs to interrupt vectors 32 through 48.
console.writeString("Hardware interrupts initialized\n");
}