ADLO/Bochs and PCI config write

Richard Smith rsmith at bitworks.com
Mon Jun 9 15:35:00 CEST 2003


Anyone have any idea why writing to PCI config space while in the middle 
of the Bochs BIOS with ADLO is running would cause lockups?

Our board has 2 video chips on the PCI bus and for Xwindows to be able 
to use the head I have to init it from the bios.  X (even 4.3) has 
issues with our setup because there is only one copy of the video bios 
for both chips and I haven't been able to make X go look for the bios in 
the right location.  Plus I need the head to come up early for field 
service reasons.

The way we did this under our old COTS bios kit was

enable IO on head 1
call vga bios
disable io on head 1
enable io on head 2
call vga bios
disable io on head 2
enable IO on head 1

Then all is well with X.

I found the vido init part of ADLO/Bochs and ported the 
PCI_[WRITE:READ]_CONFIG_DWORD macro from linuxbios but when I call it 
the system hangs.  Currently I'm down to just re-writing the IO bit in 
the config register of the already active head and it still hangs.

Perhaps I don't have my device IDs correct?  Can someone verify that if 
I want to read and write to the PCI command register and lspci lists my 
2 video heads as 0:12.0 and 0:14.0 that the corresponding values I 
should load into eax before calling the macros are:

12.0	0x9010
14.0	0xa010

Other than that is there prehaps some freaky 16bit real mode issue thats 
busting me?

-- 
Richard A. Smith
rsmith at bitworks.com





More information about the coreboot mailing list