[OpenBIOS] Sun OBP bugs in 1.0RC1

dlpaktor at netscape.net dlpaktor at netscape.net
Fri Mar 9 08:03:25 CET 2007


stepan at coresystems.de wrote:
> * Blue Swirl <blueswir1 at hotmail.com> [070217 09:57]:
>   
>>> 4) Error messages:
>>> "obp_devopen(sd(0,0,0):d) = 0xffd8e270
>>> obp_inst2pkg(fd 0xffd8e270) = 0xffd57f44
>>> obp_getprop(0xffd57f44, device_type) (not found)"
>>>
>>> Bug: The OpenBIOS "interpose" implementation is not transparent to
>>> non-interposition-aware code (in violation of the interposition spec).
>>> The inst2pkg call in this sequence returns the phandle for
>>> /packages/misc-files, instead of the proper phandle.
>>>       
>
>   
>>> Quick fix: Comment out the "interpose disk-label" lines in ob_sd_open.
>>>
>>> Shortcomings: It disables disk-label.  The correct fix is to fix the
>>> underlying problem with interposition, but I'm not sure exactly what
>>> it is.  Could someone help?
>>>       
>> Sorry, I'm not so familiar with Forth internals. Stepan?
>>     
>
> So what's the correct thing to do, inst2pkg is supposed to return the
> phandle to sd, even though the device was interposed?
>
> A quick look reveils we might need a special case for ihandle>phandle 
> in case of an interposed device. 
>   

This may be related to a bug I found a long time ago, but never had the 
mandate to fix.

It had to do with the way that the search for a device is implemented; 
it is a recursive procedure
and very tricky to understand or to debug.

In essence, the bug was that, under certain circumstances, (I seem to 
recall that one of them
was something like that there was a match for the name of the 
sought-after device but not for
its address -- e.g.: searching for  "memory at bf000000" when there were 
device-nodes called
"memory", but none with that address), the search would reach the end of 
the list of devices,
and, instead of returning a failure indication, it would return a 
phandle for the last device in the list.

If the device whose phandle was erroneously returned matches the last 
one in the output of
the  show-devs  command, then this might be an after-effect of that bug.

I apologize in advance if this advice is "off the mark".  I am no longer 
"in the game", and have
only memory that is getting increasingly remote to rely on...

-- 

David L. Paktor     DLPaktor at netscape.net




More information about the OpenBIOS mailing list