diff mbox

mambo: Fix reserved-ranges node

Message ID 20170502085238.28736-1-oohall@gmail.com
State Accepted
Headers show

Commit Message

Oliver O'Halloran May 2, 2017, 8:52 a.m. UTC
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@gmail.com>
---
 external/mambo/skiboot.tcl | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stewart Smith May 3, 2017, 6:43 a.m. UTC | #1
Oliver O'Halloran <oohall@gmail.com> writes:
> 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@gmail.com>

Merged to master as of 4f930a016f791db2d46c37c2946eac8d2966aee0
diff mbox

Patch

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