[OpenBIOS] Bug in generated paths for CIF's package-to-path?
tarl-b2 at tarl.net
Mon Nov 26 17:58:44 CET 2012
On 2012-Nov-26 05:58 , Mark Cave-Ayland wrote:
> One of the reasons the previous posted patch for setting the keyboard
> devalias has to work with string concatenation is because of this
> oddity in get-package-path (the underlying word used by CIF's
> 0 > keyboard-phandle @ get-package-path ok
> 2 > type /pci at 80000000/mac-io at 4/via-cuda at 16000/adb/keyboard at 8 ok
> 0 > s" /pci at 80000000/mac-io at 4/via-cuda at 16000/adb/keyboard at 8" open-dev
> u. 0 ok
> Hmmmm. So the path we're returning is not valid. Some experimentation
> shows that the problem is due to the trailing @8 on the keyboard node:
> 0 > s" /pci at 80000000/mac-io at 4/via-cuda at 16000/adb/keyboard" open-dev u.
> 7c5b33c ok
> 0 > keyboard-phandle @ push-package ok
> 0 > .properties
> name "keyboard"
> device_type "keyboard"
> reg 00000008
> 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.
More information about the OpenBIOS