[OpenBIOS] [PATCH v3 3/5] Pretty-print reg property
segher at kernel.crashing.org
Sat Nov 6 03:39:01 CET 2010
>>> +\ HELPER: get #size-cells value (from parent)
>>> +\ Legal values are 1..4 (we may optionally support larger sizes)
>>> +: my-#scells ( -- #size-cells )
>>> + my-self ?dup if >in.device-node @ else active-package then
>>> + ?dup if >dn.parent @ then
>>> + ?dup if
>>> + " #size-cells" rot get-package-property if 1 exit then
>>> + \ we don't have to support more than 4 (and 0 is illegal)
>>> + decode-int nip nip 4 min 1 max
> This seems wrong: 0 appears be a valid #size-cells value for
> device_type cpu.
It is valid. Why are you bounding the value here at all?
> If I use 0 max here though, I just get one column for the /cpus/
> PowerPC,970FX available property instead of two...
But that's correct then, isn't it.
More information about the OpenBIOS