[solved]tripfault on x86 hardware after restoring interrupts
Posted: Fri Sep 16, 2011 10:09 am
Hi. I'm writing a sort of hobby os with C and the mandatory assembly. I've been reading the Intel I-32 manual, lots of asm books etc and my goal is basically to gain more understanding on how things work.
Anyways I've been using Bran's tutorial as a reference and I'm now facing a strange problem. I'm loading my IDT successfully (thou I have no entries in it and no ISRs yet) but after restoring interrupts with: __asm__ __volatile__ ("sti"); my kernel tripfaults on real hardware. On qemu it seems to work ok.
After loading the IDT I'm able to print out messages on to the screen so I know it crashes on that line.
Does this behaviour sound familiar to anyone? Do I need to implement the IDT entries and ISRs to get it to work? This question is something I can't seem to find info anywhere si I'm asking here to get this clear before I start work on those.
Anyways I've been using Bran's tutorial as a reference and I'm now facing a strange problem. I'm loading my IDT successfully (thou I have no entries in it and no ISRs yet) but after restoring interrupts with: __asm__ __volatile__ ("sti"); my kernel tripfaults on real hardware. On qemu it seems to work ok.
After loading the IDT I'm able to print out messages on to the screen so I know it crashes on that line.
Does this behaviour sound familiar to anyone? Do I need to implement the IDT entries and ISRs to get it to work? This question is something I can't seem to find info anywhere si I'm asking here to get this clear before I start work on those.