Problem with software interrupts and IRQs

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.
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Problem with software interrupts and IRQs

Post by Nable »

kubawal wrote:
Combuster wrote:I also said you were bad at copy-pasting.
No, I'm simply not very good in english :)
What do you mean in 'count the instructions'?
I don't know what Combuster meant (I can only guess) but just look at your code more attentively. For example, in `intInit' you perform 5 operations on PIC1 and only 4 on PIC2.

Btw, I think that bumping the thread (when no-one answers you) is not a good idea.
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: Problem with software interrupts and IRQs

Post by thepowersgang »

Take a look at the sequence of function calls used to reset the PIC. Notice how most of them are paired? (Two calls, differing only by the base port). Now look at the last call... what Combuster meant was that the final call didn't have a corresponding call to the second PIC.

HOWEVER - Looking at that call, you're DISABLING every external IRQ (by masking them off), it even says so in the comment (and that call technically doesn't need a matching one to the secondary PIC, because by masking Line 2, you mask off the entire secondary PIC).
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Post Reply