summaryrefslogtreecommitdiffstats
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index df1d0380d4..bcb927fd10 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -932,7 +932,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
* so we flag it to be copied if it is not.
*/
if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
- of_data = of_flat_tree;
+ of_data = (ulong)of_flat_tree;
#endif
/* move of_flat_tree if needed */
@@ -987,6 +987,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
#endif
#endif /* CONFIG_OF_LIBFDT */
#if defined(CONFIG_OF_FLAT_TREE)
+#ifdef CFG_BOOTMAPSZ
+ /*
+ * The blob must be within CFG_BOOTMAPSZ,
+ * so we flag it to be copied if it is not.
+ */
+ if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
+ of_data = (ulong)of_flat_tree;
+#endif
+
/* move of_flat_tree if needed */
if (of_data) {
ulong of_start, of_len;
OpenPOWER on IntegriCloud