[OpenBIOS] [PATCH v3 5/5] Pretty-print MMU available property

Andreas Färber andreas.faerber at web.de
Sat Nov 6 01:05:16 CET 2010


v3:
* Evaluate /chosen mmu property rather than device_type "cpu".

Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 forth/admin/devices.fs |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/forth/admin/devices.fs b/forth/admin/devices.fs
index db7b48c..ecd2358 100644
--- a/forth/admin/devices.fs
+++ b/forth/admin/devices.fs
@@ -333,6 +333,13 @@
   active-package get-nodename " memory" strcmp 0= if
     2over " available" strcmp 0= if .p-reg 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 .p-reg 2drop exit then
+      then
+    then
+  then
 
   2swap 2drop ( data len )
   (.property)
-- 
1.7.3




More information about the OpenBIOS mailing list