v4: * Pass 1 as #acells and #scells, following IEEE 1275 sect. 3.6.5. On ppc the cpu nodes would've had #size-cells as 0.
v3: * Evaluate /chosen mmu property rather than device_type "cpu".
Signed-off-by: Andreas Färber andreas.faerber@web.de --- forth/admin/devices.fs | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/forth/admin/devices.fs b/forth/admin/devices.fs index 441cfad..56d657d 100644 --- a/forth/admin/devices.fs +++ b/forth/admin/devices.fs @@ -339,6 +339,16 @@ 2drop exit then then + " /chosen" find-dev if + " mmu" rot get-package-property 0= if + decode-int nip nip ihandle>phandle active-package = if + 2over " available" strcmp 0= if + 1 1 2swap .p-reg + 2drop exit + then + then + then + then
2swap 2drop ( data len ) (.property)