[OpenBIOS] [PATCH 3/3] forth: Fix MMU available pretty-printing for sparc64

Andreas Färber andreas.faerber at web.de
Sat Dec 4 14:38:04 CET 2010


On sparc64 a virtual address or size value is contained within one stack cell
but that makes two property cells. The columns for the /virtual-memory
"available" property thus looked wrong.

Do read the number of cells from #address-cells but make sure the size is
at least one to not break ppc.

Cc: Tarl Neustaedter <tarl-b2 at tarl.net>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 forth/admin/devices.fs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/forth/admin/devices.fs b/forth/admin/devices.fs
index 1bf7e6f..38cb5bb 100644
--- a/forth/admin/devices.fs
+++ b/forth/admin/devices.fs
@@ -407,7 +407,7 @@
     " 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
+          my-#acells my-#scells 1 max 2swap .p-reg
           2drop exit
         then
         2over " translations" strcmp 0= if
-- 
1.7.3




More information about the OpenBIOS mailing list