Interrupts and PMode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Al

Interrupts and PMode

Post by Al »

Hello All,

I am having a problem(a triple fault) with enabling interrupts in protected mode after remapping the PIC and setting up the IDT. The problem does not appear to be in the code for the IDT, as the computer triple faults with the IDT in or out.

The problem occurs when I unmask an IRQ

Does anyone know what my problem is?

Al
Al

Re:Interrupts and PMode

Post by Al »

BTW, I am using C.
XStream

Re:Interrupts and PMode

Post by XStream »

You may need to supply some of your code if anyone is going to be able to help you.

I would guess the problem is probably in your IRQ handler code.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Interrupts and PMode

Post by Pype.Clicker »

A few rules to observe (more at the WikiFAQ)...

1. don't enable IRQs until you have a working IDT
2. make sure you loaded the proper values in the IDT (sizeof(struct IDTR)==6, base address is linear, etc.)
3. check your IDT is set up properly by calling INT nn in your code
4. provide working handlers for exceptions
5. only then you can try to toy with IRQ handlers.
Al

Re:Interrupts and PMode

Post by Al »

Thanks!

I did not set the _packed_ attribute; I did not even know what it meant. I finally figured it out, and it works perfectly.

Thanks again,

Al
Post Reply