summaryrefslogtreecommitdiff
path: root/common/image-fdt.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-09-26 15:07:41 +0300
committerAlexander Graf <agraf@suse.de>2018-09-26 16:03:12 +0300
commiteaac4fb296b1899369e49d941f2c0d346c7f5c7a (patch)
tree93e6b1803cd091cde7645f43acd4449c70be31b6 /common/image-fdt.c
parentc982874e930d5d673501cd94df07bcbd215d5883 (diff)
downloadu-boot-eaac4fb296b1899369e49d941f2c0d346c7f5c7a.tar.xz
sandbox: Fix set_working_fdt_addr users
When running sandbox with the new pointer sanitization we just recently introduced, we're running into a case with FIT images where we end up interpreting pointers as addresses. What happened is that most callers of set_working_fdt_addr() simply convert pointers into addresses without taking into account that they might be 2 separate address spaces. Fix the callers up to map their pointers into addresses. This makes sandbox tests pass for me again. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'common/image-fdt.c')
-rw-r--r--common/image-fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 9b41f16248..95748f0ae1 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -193,7 +193,7 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
*of_flat_tree = of_start;
*of_size = of_len;
- set_working_fdt_addr((ulong)*of_flat_tree);
+ set_working_fdt_addr(map_to_sysmem(*of_flat_tree));
return 0;
error: