Page 1 of 1

Port of NuttX to x86

Posted: Tue Mar 15, 2011 8:56 am
by bifferos
I've tried with the help of the author, (who is not an x86 expert) to port this to x86. We haven't used any of the MMU features, just setup GDT/IDT and a timer interrupt with the help of the James Molloy tutorials. 99% of the work has been done in terms of setting everything up, but the timer interrupt only seems to fire once and that's it. If anyone wants to help they'd be more than welcome but for the moment we're scratching our heads as to what the problem may be.

For NuttX features please checkout http://nuttx.sourceforge.net/. In brief:

- C microkernel
- Preemptable
- (Some) Posix compatibility
- BSD License
- In-memory file system
- Character devices and block drivers
- FAT 12/16/32 support
- Networking
- BSD socket layer
- Bash-like shell.

thanks,
Biff.

Re: Port of NuttX to x86

Posted: Tue Mar 15, 2011 12:27 pm
by davidv1992
Does the interrupt handler send an end of interrupt command to the PIC when it's done? your timer interrupt problem sounds like that might not be the case.

Re: Port of NuttX to x86

Posted: Tue Mar 15, 2011 3:15 pm
by bifferos
davidv1992 wrote:Does the interrupt handler send an end of interrupt command to the PIC when it's done?
It certainly seems so:
http://nuttx.svn.sourceforge.net/viewvc ... iew=markup

cheers,
Biff.

Re: Port of NuttX to x86

Posted: Tue Mar 15, 2011 3:47 pm
by Tosi
I actually had the same problem with the timer in my OS. The problem was that I was masking flags incorrectly and basically sending the incorrect values to the PIT. The end result was that timer 0 was initialized to a mode that required sending the reload value on each interrupt, instead of the rate generator or square wave I desired.

In short, step through your code and make sure the values you are sending to whatever timer to initialize it are correct.
If the timer requires any special commands on every interrupt, make sure to do this.
Always make sure you are sending an EOI as well, and that you properly configured the PIC.