[OpenBIOS] Loading a PCI Option rom.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Dec 17 11:31:12 CET 2017


On 15/12/17 23:44, Jd Lyons wrote:

>> On Dec 15, 2017, at 4:02 PM, Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk> wrote:
>>
>> On 14/12/17 13:36, Jd Lyons wrote:
>>
>>> I’m trying to see if I can get Openbios to execute the Option rom of my Geforce 6600. Using the method described here:
>>> https://docs.oracle.com/cd/E19253-01/806-1379-10/fctest.html#35443
>>> I’m not understanding some of it, and I’m varying the commands, somewhat.
>>> ok4000 dload /stand/mydev.fcode
>>> ok0 0 " 4,0" " /pci at 1f,2000" begin-package
>>> ok4020 1 byte-load
>>> okend-package
>>
>> Yeah OpenBIOS doesn't implement dload because it doesn't have a TCP/IP stack :(
>>
>>> Rather than the above I’m using:
>>> ok4000 load hd:,6600.rom
>>> ok0 0 " 4,0" " /pci at f2000000" begin-package
>>> ok4020 1 byte-load
>>> okend-package
>>> I’m not sure the deference between “dload” and “load”?
>>> dload is not a word in Openbios, yet, and should load a file over ethernet, if I’m reading the documentation right?
>>
>> Yes, that's correct - dload probably pulls a file via TFTP or similar.
>>
>>> I’m not sure I can just load the raw rom image like this, or I need just the FCode?
>>> Also, should I be using the address of the pci controller( @f2000000 ) or am I misunderstanding this part, should I be using the address of my pci card?
>>
>>  From memory I think the FCode executes within the context of the parent, i.e. it is responsible for calling begin-package and end-package. And also I believe that for PCI the address of the package to be created should match the PCI slot I think you are fairly close with:
>>
>> 0 0 " 4,0" " /pci at f2000000" begin-package
>> 4020 1 byte-load
>> end-package
>>
>> What happens when you try and execute that? Do you get any messages? You should also be able to display the option ROM (assuming it has loaded successfully at 0x4000) with:
>>
>> 4000 1000 dump
>>
>> And with FCode it's always useful to test in -nographic mode until you know what commands you need as it's easier to cut/paste.
> 
>   Don’t seem to load the Rom at all, I get ok, but then:
> 1 >
> 
> And dumping the first 100 bytes doesn’t yield anything but zeroes.
> 
> I tested to see if load of a non existent file did the same thing, and it does. So I’m not getting the command right.

Actually I just noticed that you're missing the initial backslash on 
your command - do you get any further with something like this?

load hd:,\6600.fcode
4000 40 dump

(the first bytes should be 0x55 0xaa for a PCI option ROM)

Then to run the FCode:

4000 20 + 1 byte-load


Also what FS is your HD image? HFS/HFS+ should work best on 
qemu-system-ppc, ISO9660 works but is case-sensitive from memory.


ATB,

Mark.



More information about the OpenBIOS mailing list