Interrupts aren't working after liballoc porting

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.
JoeEagar
Posts: 6
Joined: Tue Mar 15, 2016 8:46 am
Libera.chat IRC: joeedh

Re: Interrupts aren't working after liballoc porting

Post by JoeEagar »

I had a similar problem. Interrupts randomly disabled themselves. One thing I did was go through and make sure the IF flag was set in all copies of eflags saved on the stack. I noticed that changes in my kernel image were making a big difference in behavior, but it didn't seem to have anything to do with alignment. That led me to a couple of places where stack space was allocated for eflags, but the register itself wasn't saved.

I'm not completely sure it's fixed though. It's pretty, random, I'll have to do more testing to be sure.

Read up on how interrupts use the stack. IRQs that don't change privilege levels saves an eflags, a segment selector and then a jumpback address. If the privilege does change then all sorts of things can happen (I'm still playing around in ring 0 though so I don't know all the details).
Post Reply