summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2020-02-13 19:29:50 +0100
committerTom Rini <trini@konsulko.com>2020-04-17 12:29:43 -0400
commit8ce1f10cf2b139258c890774f263bec55c4df8ce (patch)
treea5402e6d9fda6a865a6b742b8b2bd0f41c381e29 /arch
parent8d5d3bcf3c53d798bd7f3fe7092e994593bcc41c (diff)
ARM: bootm: take into account gd->ram_top
If gd->ram_top has been tuned using board_get_usable_ram_top(), it must be taken into account when reserving arch lmb. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lib/bootm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a135bcfc7b..f4b5ca6de0 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -75,6 +75,9 @@ void arch_lmb_reserve(struct lmb *lmb)
gd->bd->bi_dram[bank].size - 1;
if (sp > bank_end)
continue;
+ if (bank_end > gd->ram_top)
+ bank_end = gd->ram_top - 1;
+
lmb_reserve(lmb, sp, bank_end - sp + 1);
break;
}