[SOLVED] Interrupts only firing once
[SOLVED] Interrupts only firing once
I've been working on my OS and ran into a problem with the interrupts, interrupts from the pic only seem to fire once. I've made sure to send the reset signal to the PIC in the handler code so I'm not sure what else could be causing it.
The interrupt should be printed as 32 instead of 23, that's a known issue with my screen code and is not related to the problem. code is located herehttps://github.com/dgriffen/sigmos/tree ... bdcd601579
The interrupt should be printed as 32 instead of 23, that's a known issue with my screen code and is not related to the problem. code is located herehttps://github.com/dgriffen/sigmos/tree ... bdcd601579
Last edited by dgriffen on Mon Dec 29, 2014 9:32 pm, edited 1 time in total.
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Re: Interrupts only firing once
You are not sending EOI to the PIC. See 8259 PIC.
Adam
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
Re: Interrupts only firing once
I send EOI in my interrupt handler code here https://github.com/dgriffen/sigmos/blob ... /handler.ceryjus wrote:You are not sending EOI to the PIC. See 8259 PIC.
-
- Member
- Posts: 283
- Joined: Mon Jan 03, 2011 6:58 pm
Re: Interrupts only firing once
Looks to me like your kernel is doing EXACTLY what you told it to do, including disabling interrupts the second kmain returns. To be honest, I'm surprised you even get one interrupt in that time.dgriffen wrote:...
Also, your isr_wrapper stuff is all sorts of weird. You probably want pushad and popad unless you are writing a real-mode kernel...
- Monk
Re: Interrupts only firing once
Oh yeah, I forgot I disabled interrupts when I returned from kmain. I tried using pushad and popad, but they were considered invalid commands by the assembler. perhaps gcc got rid of those commands?tjmonk15 wrote:Looks to me like your kernel is doing EXACTLY what you told it to do, including disabling interrupts the second kmain returns. To be honest, I'm surprised you even get one interrupt in that time.dgriffen wrote:...
Also, your isr_wrapper stuff is all sorts of weird. You probably want pushad and popad unless you are writing a real-mode kernel...
- Monk
Re: Interrupts only firing once
What assembler are you using? GNU AS recognizes this piece of code perfectly:dgriffen wrote:Oh yeah, I forgot I disabled interrupts when I returned from kmain. I tried using pushad and popad, but they were considered invalid commands by the assembler. perhaps gcc got rid of those commands?tjmonk15 wrote:Looks to me like your kernel is doing EXACTLY what you told it to do, including disabling interrupts the second kmain returns. To be honest, I'm surprised you even get one interrupt in that time.dgriffen wrote:...
Also, your isr_wrapper stuff is all sorts of weird. You probably want pushad and popad unless you are writing a real-mode kernel...
- Monk
Code: Select all
myLabel:
pushad
popad
Happy New Code!
Hello World in Brainfuck :[/size]
Hello World in Brainfuck :
Code: Select all
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
Re: Interrupts only firing once
I am using GNU AS 2.24 compiled for i686-elf. After some research it looks like it uses pushal and popal.KemyLand wrote: What assembler are you using? GNU AS recognizes this piece of code perfectly:Code: Select all
myLabel: pushad popad
Re: Interrupts only firing once
A sorry, sorry! I just wrote the code without thinking ! It's true, now I remember. What happens is simple, the instructions' names are "pusha" and "popa" for Intel. But prefixes specific to assemblers happen to exist. Both 'd' in NASM and 'l' in GAS mean 32-bits.dgriffen wrote:I am using GNU AS 2.24 compiled for i686-elf. After some research it looks like it uses pushal and popal.KemyLand wrote: What assembler are you using? GNU AS recognizes this piece of code perfectly:Code: Select all
myLabel: pushad popad
Happy New Code!
Hello World in Brainfuck :[/size]
Hello World in Brainfuck :
Code: Select all
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.