+\ 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.
Segher