Page 1 of 1

IRQs not working, any common mistakes I should check for?

Posted: Sat Sep 12, 2009 12:59 pm
by Auraomega
I've been following the tutorial here on getting IRQs set up, however I'm not getting anything up for the timer, this is my second attempt now (hence choosing a tutorial that lays everything out for me), but still nothing happens. Is there any common mistakes made, or, looking at that code anywhere that I could put some messages in to make sure its running properly? If you need me to supply my code, I'll upload it to my server but its in a real mess right now because of trying to fix this... I spent the past 4 hours trying to fix my code and it shows >.>

-Aura

Re: IRQs not working, any common mistakes I should check for?

Posted: Sat Sep 12, 2009 1:11 pm
by NickJohnson
Have you added interrupt handlers for the IRQs in the IDT? I don't mean the function table JamesM has you create to dynamically register IRQ handlers; the actual entries in the IDT (irq0-irq14, in the tutorial's naming scheme).

I doubt anyone is going to be able to give you much help beyond speculation (or ESP) without some code or at least a better analysis of the problem you're having.

Re: IRQs not working, any common mistakes I should check for?

Posted: Sat Sep 12, 2009 2:40 pm
by Creature
You should also make sure you've actually executed an STI instruction to turn hardware interrupts on.

Code: Select all

__asm__ __volatile__("sti");

Re: IRQs not working, any common mistakes I should check for?

Posted: Sat Sep 12, 2009 3:23 pm
by Auraomega
Oh BOY do I feel like the dumbest guy around. I'd forgotten to enable interrupts again, I commented the line of code out earlier as I was tidying some stuff up, glad you pointed that out otherwise I could have been searching for much longer for something right under my nose...

Sometimes I wonder why they let me lose with a compiler :roll:

-Aura