summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-28 08:51:37 -0400
committerTom Rini <trini@konsulko.com>2020-08-28 08:51:37 -0400
commit9f04a634ef331b4fc6b3e677f276156192a413c7 (patch)
treea6b8663e5d156f85846d187248597888043e0d3e /common/image.c
parentf87c80ade3911f3d518036a28370fe44c85a95c7 (diff)
parent2ed1b242ab2f9ee7541ae0a655de67832a3eebc1 (diff)
Merge branch '2020-08-27-misc-fixes'
- Fix for gd->ram_top and bootm_size calculations - Assorted Kconfig entry cleanups / fixes. - Make checkpatch.pl error on fdt_high/initrd_high=0xffffffff - Resync scripts/setlocalversion - Other minor bugfixes
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c
index 9d7d5c17d12..da8bccd400d 100644
--- a/common/image.c
+++ b/common/image.c
@@ -694,6 +694,9 @@ phys_size_t env_get_bootm_size(void)
size = gd->bd->bi_memsize;
#endif
+ if (start + size > gd->ram_top)
+ size = gd->ram_top - start;
+
s = env_get("bootm_low");
if (s)
tmp = (phys_size_t)simple_strtoull(s, NULL, 16);