diff --git a/common/image.c b/common/image.c index 9d7d5c17d1..da8bccd400 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);