IDT/interrupt problems [FIXED]
Posted: Mon Apr 20, 2009 6:12 pm
Hullo all. I would like to first mention that the next time I'm at a computer with internet access I'll further address the problem with some code to show, unfortunately I forgot my source code before I left the house to the library (My house has no internet access.)
I'm having trouble with either my kernel's IDT or how it handles interrupts. At first when I went to enable interrupts my ISR/IRQ handler was working great. I knew because I was getting a double fault exception that I couldn't pinpoint. After several hours of programming and a night of reset (and more programming) I determined I would try to rewrite all of the GDT/IDT/ISR/IRQ portion of the OS. Now, I haven't gotten to the IRQ part specifically (I'm following bran's kernel development tutorial to ensure that I'm doing everything right.) Now I when I try to enable interrupts (at the part in the tutorial where Brandon says to try dividing by zero.) I've tried this with and without interrupts disabled (without it, it doesn't work (obviously.)) With interrupts enabled QEMU manages to crash without any useful information, and I'm unable to see any useful messages.
I'm developing my OS in Linux, and I'm not following the tutorial *exactly.* (GDTs are done in just assembly, for example, and the video doesn't need to be initialized (and it's working great.)) But none of what I did should really be an issue of the problem. I'm sure the problem would go away if I just copied all of the "bkerndev" code, but that would be cheating, and it wouldn't be my code (so what would the fun be in that?)
Anyways, I'm hoping someone can reveal some sort of technique I could use to effectively debug the problem, or inform me of the most likely problem from the description above (sort of like going to a doctor.)
Thanks in advance.
Cheers,
-naota
I'm having trouble with either my kernel's IDT or how it handles interrupts. At first when I went to enable interrupts my ISR/IRQ handler was working great. I knew because I was getting a double fault exception that I couldn't pinpoint. After several hours of programming and a night of reset (and more programming) I determined I would try to rewrite all of the GDT/IDT/ISR/IRQ portion of the OS. Now, I haven't gotten to the IRQ part specifically (I'm following bran's kernel development tutorial to ensure that I'm doing everything right.) Now I when I try to enable interrupts (at the part in the tutorial where Brandon says to try dividing by zero.) I've tried this with and without interrupts disabled (without it, it doesn't work (obviously.)) With interrupts enabled QEMU manages to crash without any useful information, and I'm unable to see any useful messages.
I'm developing my OS in Linux, and I'm not following the tutorial *exactly.* (GDTs are done in just assembly, for example, and the video doesn't need to be initialized (and it's working great.)) But none of what I did should really be an issue of the problem. I'm sure the problem would go away if I just copied all of the "bkerndev" code, but that would be cheating, and it wouldn't be my code (so what would the fun be in that?)
Anyways, I'm hoping someone can reveal some sort of technique I could use to effectively debug the problem, or inform me of the most likely problem from the description above (sort of like going to a doctor.)
Thanks in advance.
Cheers,
-naota