> On Tuesday 06 May 2008, Simon Felix wrote:
>> The guest OS is Valhalla, my own OS.
>>
>> The problem is that the code doesn't find a single PCI device.
>
> I assume this is a 32-bit OS running in 32-bit protected mode?
>
> Kind regards,
>
> Frank

I found out what the problem was/is. When my code tries to read a byte from the 
PCI configuration space, it does the following:


function readb(bus,dev,func,reg:byte):byte;
begin
  outportl(PCI_ADR_REG,PCI_ENABLE or (longint(bus) shl 16) or (longint(dev) shl 
11)
                                  or (longint(func) shl 8) or longint(reg));
  readb:=inportb(PCI_DATA_REG+(reg and 3));
end;


According to the PCI specs the last two bits written to the PCI_ADR_REG (0xcf8) 
port must be zero. After changing the code to force the last two bits of "reg" 
to zero everything worked as expected.

Simon

_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to