fdt_support: fdt reservations on the sandbox
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 18 Nov 2018 16:58:51 +0000 (17:58 +0100)
committerAlexander Graf <agraf@suse.de>
Sun, 2 Dec 2018 20:59:37 +0000 (21:59 +0100)
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
common/fdt_support.c

index e6daa67..3440e42 100644 (file)
@@ -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;