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

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Nov 26 11:58:24 CET 2012


Hi all,

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 package-to-path):

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
  ok

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?


Many thanks,

Mark.



More information about the OpenBIOS mailing list