OMG INTERRUPTS ARE WORKING
The segment selector that you put in the interrupt table is a byte offset, and *not* an index into the table. Now interrupts work! But only one. And I think I know how to fix this...
This commit is contained in:
parent
1f6ce53e08
commit
5e2c89e588
1 changed files with 4 additions and 2 deletions
|
@ -50,10 +50,12 @@ InterruptHandler::initialize()
|
|||
auto& console = kernel::Console::systemConsole();
|
||||
|
||||
for (size_t i = 0; i < IDT::Size; i++) {
|
||||
mIDT.setDescriptor(i, IDT::DescriptorSpec::exceptionHandler(1, &unhandledInterrupt));
|
||||
mIDT.setDescriptor(i, IDT::DescriptorSpec::exceptionHandler(0x8, &unhandledInterrupt));
|
||||
}
|
||||
mIDT.setDescriptor(0x21, IDT::DescriptorSpec::exceptionHandler(0x8, &handleHardwareInterrupt1));
|
||||
mIDT.load();
|
||||
console.printString("Interrupt table loaded\n");
|
||||
|
||||
console.printString("IDT loaded\n");
|
||||
|
||||
mPIC.initialize(0x20, 0x28); // Map hardware IRQs to interrupt vectors 32 through 48.
|
||||
console.printString("Hardware interrupts initialized\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue