[OpenBIOS] fcode rom loading

Bob Breuer breuerr at mc.net
Wed Jul 13 17:24:02 CEST 2011


Mark Cave-Ayland wrote:
[ snip ]
> 
>> Next up is my-address and my-space.  Under OBP on an SS-20, I can do
>> this:
>>    ok " /iommu/sbus" select-dev
>>    ok new-device
>>    ok 0 0 " 1,abc" set-args
>>    ok my-address . my-space .
>>    abc 1
>> With OpenBIOS, I just get zeros for both my-address and my-space.
>>
>> While skimming the IEEE-1275 spec, I found begin-package, which under
>> OpenBIOS does set my-address and my-space correctly.  Am I just missing
>> something, or could there be a bug in either set-args or new-device?
> 
> Possibly. Bear in mind that OpenBIOS now has a source debugger so you
> can try something like:
> 
> " /iommu/sbus" select-dev
> new-device
> 0 0 " 1,abc"
> debug set-args
> set-args
> 
> ...and off you go.

I've found the cause - my-self was still 0 when calling new-device, so
the $call-parent in set-args was failing.  OpenBIOS treats select-dev
and open-dev as the same, but they are not, see the of1275 errata for
section H.8.  Most importantly, open-dev does not set my-self, while
select-dev does.

OBP uses select-dev to make begin-package almost trivial, as in
: begin-package  ( ... )
   select-dev new-device set-args
;

Any objection to simplifying the OpenBIOS version of begin-package to
match the OBP version, and moving the extra logic from begin-package
into select-dev?

Bob



More information about the OpenBIOS mailing list