[OpenBIOS] Apple's Open Firmware.

Jd Lyons lyons_dj at yahoo.com
Mon Apr 2 21:18:28 CEST 2018


Just to be clear, in this thread, we are talking about how to load a PCI Option ROM from for file on actual Apple Hardware.

It relates to Openbios because at this time Openbios has no support for probing the PCI Bus for Option ROM’s.

I just thought if we could learn how this works on real hardware it may tell us something useful on what changes maybe needed to Openbios to support VGA Passthrough.

Other than that, I’m not sure how useful it will be, maybe some network cards had an FCode Option ROM, and there where some PCI/PCI-E drive controllers that did. So, maybe some day someone will want to use one with PCI Passthrough.

To sum up:

1. Apple’s Open firmware handles “load” a little different than Openbios. I imagine Openbios handles it correctly and conforms to the IEEE 1275 standard. As it can load a full option rom to the load-base address without error vs, Apple’s implementation where I have to remove everything up to the start of the FCode in the rom image.

2. Even removing the the data up to the start of the FCode does not result in a working PCI Device when I call byte-load from the load-base address. I’m not sure what is going wrong, likely I’m just doing it wrong, as I would assume PCI Device Developers would have used loading an Option ROM from file on Apple systems to test their changes before they flashed it to an EEPROM, but that’s only an assumption.

Really just my way of learning how VGA FCode Roms should work if loaded from file, to see why it’s not working with Openbios.



> On Apr 2, 2018, at 1:27 PM, Joe van Tunen <joevt at shaw.ca> wrote:
> 
> On 4/2/18, 6:04 AM, "Mark Cave-Ayland" <mark.cave-ayland at ilande.co.uk> wrote:
> 
>    On 02/04/18 13:19, Joe van Tunen wrote:
> 
>> From: Jd Lyons <lyons_dj at yahoo.com>
>> Date: Monday, April 2, 2018 at 3:52 AM
>> 
>> 	On Apr 2, 2018, at 6:43 AM, Jd Lyons via OpenBIOS <mailto:openbios at openbios.org> wrote:
>> 
>> 		load hd:12,\ppc\Quadro900Mac.rom load-size=c400 adler32=5ff1641b
>> 		load-base 100 dump
>> 
>> 		Result:
>> 
>> 		00800000
>> 		DEFAULT CATCH!, code=300 at %SRR0: ff847470 %SRR1:0000b030
>> 
>> 	Not sure on that load-size, and I have no clue what the adler32 is?
>> 
>> 
>> What is the size of the Quadro900Mac.rom file? adler32 is a checksum algorithm (look it up on Wikipedia). It is called by boot|load. Try calling it yourself with
>> 
>> load_base load-size adler32
>> 
>> Looking at (init-program) more carefully (which is called after boot|load), it appears that the “unrecognized Client Program format” error causes the loaded data to be released, so you can’t dump it or byte-load it or adler32 it.
>> Therefore, you must load only the fcode part of the rom or make your own load command.
> 
>    From memory the IEEE-1275 specification states that a minimum of 8MB 
>    memory should be available at load-base for the bootloader, so OpenBIOS 
>    simply maps this region on startup.
> 
>    Hence with OpenBIOS you can quite happily do a "load hd:,\path\to\file" 
>    and then dump it with "load-base 100 dump" as above even if the file 
>    format is unrecognised.
> 
>    I suspect the problem is that your Quadro900Mac.rom is in a format which 
>    is recognised by init-program as executable which proceeds to try and 
>    run it. But as rightly pointed out earlier in the thread, load should 
>    only move the file into memory at load-base and run init-program - it 
>    should be up to the user to manually switch to the saved program state 
>    with "go".
> 
> 
>    ATB,
> 
>    Mark.
> 
> So far, without trying the load ourselves, we only have evidence that the load is not accepting the format (which is a PCI option rom with fcode image - if it's just the fcode image than the file should be renamed to make it clear). We don't have evidence that load is running the fcode. You need to check "here" before and after load to see if anything is added to the dictionary (if the fcode makes at least one definition).
> 
> 
> 




More information about the OpenBIOS mailing list