[Skiboot] [PATCH] mambo: Fix reserved-ranges node

Oliver O'Halloran oohall at gmail.com
Tue May 2 18:52:38 AEST 2017


The DT bindings for the /reserved-memory node requires that it:

a) Has #size-cells equal to the root
b) Has #address-cells equal to the root
c) Has an empty ranges property (i.e directly maps on the root)

Currently we do not assign any of these when generating the Mambo
device tree which causes the booted kernel to ignore the reservations
in the /reserved-memory node.

Fixes: b7b5302af737
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 external/mambo/skiboot.tcl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 8cdfb819be97..68ea2bd44e49 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -210,6 +210,10 @@ if { [info exists env(SKIBOOT_NVRAM)] } {
 
 # Add device tree entry for NVRAM
 set reserved_memory [mysim of addchild $root_node "reserved-memory" ""]
+mysim of addprop $reserved_memory int "#size-cells" 2
+mysim of addprop $reserved_memory int "#address-cells" 2
+mysim of addprop $reserved_memory empty "ranges" ""
+
 set fake_nvram_node [mysim of addchild $reserved_memory "ibm,fake-nvram" ""]
 set reg [list $fake_nvram_start $fake_nvram_size ]
 mysim of addprop $fake_nvram_node array64 "reg" reg
-- 
2.9.3



More information about the Skiboot mailing list