[LinuxBIOS] emulator PIT setup

Tom Sylla tsylla at gmail.com
Sat Oct 6 00:27:03 CEST 2007


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/devices/emulator/biosemu.c#L301

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/cpu/amd/model_lx/syspreinit.c#L32

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.




More information about the coreboot mailing list