Why would an end-of-interrupt for the master PIC cause a triple fault (reboot)?

708 views Asked by At

Ok, in school we are developing an operating system. My project has been to develop an ATA hard disk driver. I thought I had my interrupt service routine working quite well when my professor pointed out that I was only sending end-of-interrupt commands to the slave PIC, and not the master as well.

My problem is that whenever I send the end-of-interrupt to the master PIC, it causes a triple fault which then causes my system to reboot. Now I have un/commented a bunch of lines and it appears that whenever the function to send the end-of-interrupt to the master PIC is left in the code I get the triple fault.

Now I am quite sure of the following:

  1. interrupts are disabled upon entering my ISR
  2. I am properly sending the end-of-interrupt byte (class tested)
  3. I am not re-acknowledging the same interrupt

This has been causing massive frustration, so I am hoping that someone can give me some guidance without needed to see our code.

Thanks!

1

There are 1 answers

0
Nathan Fellman On BEST ANSWER

I can only guess at this. Here are some things to check.

  • Is the EOI outside of your segment limit?
  • Is the EOI on a readonly page?
  • Is your interrupt handler at the correct privilege level to access the EOI?
  • Are you using the correct segment register?

Any of those could cause a fault. That in turn could cause a double or triple fault if the descriptor tables are either corrupted or were improperly set up to begin with.