LtG wrote:
Like what? Which specific Wiki page are you referring to?
Mostly
http://wiki.osdev.org/I_Can%27t_Get_Interrupts_Working.
LtG wrote:
You have re-mapped the PIC? Have you enabled paging (could a page fault occur)?
I did intentionally skip the remapping step. I saw it more as a required step after I was sure my GDT/IDT were working properly. Of course, this turned out to be exactly my problem.
LtG wrote:
Add a #DF handler to see what the original fault is.. Also debug with gdb to see what exactly happens. There's an article about gdb in the Wiki I think.
I have been using GDB, but it turns out that improper configuration was causing the triple fault. It's hard to debug the GDT/IDT configuration when the behavior is a hardware-driven triple fault. Now that I understand the problem I can do this more effectively.
Brendan wrote:
I suspect you may have gotten "int 0x01" and "IRQ 0x01" mixed up. For the default BIOS (mis)configuration of the PIC chips, "IRQ 0x01" is "int 0x09"; but this conflicts with exceptions so everyone reconfigures the PIC chips (and a lot of people choose to configure PIC chips so that "IRQ 0x01" is "int 0x21").
This is exactly what the problem was. As mentioned above, I was planning to remap the PIC once I was sure my interrupt configuration was sound. Your wording is a bit confusing, though. My IDT had only a single entry at index 1 (for what I was interpreting to be IRQ1). I was able to successfully execute/return from this interrupt by issuing:
After this comment, I added the same entry to index 9 of my IDT and was able to properly handle interrupts from the keyboard.
I suppose I was thinking of the entries in the IDT as "IRQ" handlers, rather than "INT" handlers. It seems they just share the same handler space but with different mappings.
It's mentioned here:
http://wiki.osdev.org/PIC#The_IBM_PC.2F ... chitecture