Initialize hardware interrupts
This commit is contained in:
parent
1d9766b319
commit
49afcdfadf
1 changed files with 6 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue