aboutsummaryrefslogtreecommitdiff
path: root/common/fdt_support.c
diff options
context:
space:
mode:
authorMichal Simek2020-09-03 12:44:51 +0200
committerMichal Simek2020-10-27 08:13:32 +0100
commit13d1ca8742ab714d4238f7b1598931bb6aaa1ea4 (patch)
treeb7b2af12b71288dbe12282e4db98056b66319d58 /common/fdt_support.c
parentcaa7fc2c57750f323d53aef38c7ee2e01898c4ba (diff)
spl: fdt: Record load/entry fit-images entries in 64bit format
The commit 9f45aeb93727 ("spl: fit: implement fdt_record_loadable") which introduced fdt_record_loadable() state there spl_fit.c is not 64bit safe. Based on my tests on Xilinx ZynqMP zcu102 platform there shouldn't be a problem to record these addresses in 64bit format. The patch adds support for systems which need to load images above 4GB. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r--common/fdt_support.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index b8a8768a214..5ae75df3c65 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -611,14 +611,9 @@ int fdt_record_loadable(void *blob, u32 index, const char *name,
if (node < 0)
return node;
- /*
- * We record these as 32bit entities, possibly truncating addresses.
- * However, spl_fit.c is not 64bit safe either: i.e. we should not
- * have an issue here.
- */
- fdt_setprop_u32(blob, node, "load", load_addr);
+ fdt_setprop_u64(blob, node, "load", load_addr);
if (entry_point != -1)
- fdt_setprop_u32(blob, node, "entry", entry_point);
+ fdt_setprop_u64(blob, node, "entry", entry_point);
fdt_setprop_u32(blob, node, "size", size);
if (type)
fdt_setprop_string(blob, node, "type", type);