[OpenBIOS] Bug in generated paths for CIF's package-to-path?

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Wed Nov 28 02:02:56 CET 2012

On 26/11/12 16:58, Tarl Neustaedter wrote:

>> Now AFAICT one of two things is wrong here:
>> 1) get-package-path should be fixed so that if a phandle belongs to a
>> leaf node, the unit address is not included as part of the node name
>> 2) open-dev should happily accept the trailing @8 on the keyboard node
>> Does anyone know which one of these is the correct solution?
> What does "adb" have for encode-unit and decode-unit? The fact that you
> can open "keyboard" but not "keyboard at 8" indicates that the
> encode-unit/decode-unit aren't properly translating between reg property
> and string unit-address.

Hi Tarl,

I've finally worked out what was going on here. The adb device doesn't 
have explicit encode-unit/decode-unit words, and currently if the 
path-resolution algorithm in OpenBIOS can't find one then it switches 
over to a default version based upon a single unit cell.

The reason that opening the keyboard with the trailing @8 didn't work 
was because there was no symmetry; i.e. if decode-unit didn't exist, the 
process terminated without matching rather than translating the single 
unit cell back into a string.

I now have a working patch to implement the opposite for decode-unit 
which doesn't cause regressions on any of my test images, and allows 
direct opening of the keyboard device obtained from get-package-path 
without any extra string manipulation. So unless I find any other 
issues, I'll apply this along with a correction for the previous patch 
over the next couple of days.



More information about the OpenBIOS mailing list