diff mbox series

[U-Boot,v3,6/9] fdt_support: fdt reservations on the sandbox

Message ID 20181118165854.8814-7-xypron.glpk@gmx.de
State Accepted
Commit 9ad0a799e55a55b23ebad26dbad5fcd0dbedecf6
Delegated to: Alexander Graf
Headers show
Series efi_loader: fix memory handling | expand

Commit Message

Heinrich Schuchardt Nov. 18, 2018, 4:58 p.m. UTC
On the sandbox the memory addresses in the device tree refer to the virtual
address space of the sandbox. This implies that the memory reservations for
the fdt also have to be converted to this address space.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v3
	map the correct parameter of fdt_add_mem_rsv
---
 common/fdt_support.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/common/fdt_support.c b/common/fdt_support.c
index e6daa67990d..3440e42a257 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -7,6 +7,7 @@ 
  */
 
 #include <common.h>
+#include <mapmem.h>
 #include <stdio_dev.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
@@ -633,7 +634,7 @@  int fdt_shrink_to_minimum(void *blob, uint extrasize)
 	fdt_set_totalsize(blob, actualsize);
 
 	/* Add the new reservation */
-	ret = fdt_add_mem_rsv(blob, (uintptr_t)blob, actualsize);
+	ret = fdt_add_mem_rsv(blob, map_to_sysmem(blob), actualsize);
 	if (ret < 0)
 		return ret;