On 08.10.2007 19:01, Marc Jones wrote:
Tom Sylla wrote:
Many moons ago I had a problem with an XGI VGA option ROM in the emulator:
http://www.linuxbios.org/pipermail/linuxbios/2006-December/017568.html
I poked at it again this week, and found that my PIT was not set up on my platform, so port 61 was not ticking, and the delay routines in the option ROM were getting stuck.
It looks like the emulator attempts to set up something in the PIT: http://tracker.linuxbios.org/trac/LinuxBIOS/browser/trunk/LinuxBIOSv2/src/de...
but that is timer 0, which is for the timer tick, not the refresh timer (port 61).
To fix my problem, I just added LX's PIT counter 1 init I/Os:
http://tracker.linuxbios.org/trac/LinuxBIOS/browser/trunk/LinuxBIOSv2/src/cp...
before the Counter 0 code, and the XGI ROM then loaded ok.
My first question is about the current PIT code in the emulator. What is it trying to do? Is it supposed to be turning on counter 1, and just broken? Or is it really meant to be enabling the timer tick?
The next question is where would be a good place for the Counter 1 init? It seems like it should be done generically in LB for any SB with a PIT.
I agree with Tom. The PIT should be setup by linuxbios for x86 systems. I can't think of an x86 that doesn't have a PIT. I don't see a good generic place to put this. PIT init should go in early init so that it can be used for timing loops.
Agreed. IIRC Linux even complains about the non-initialized PIT.
Carl-Daniel