public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] ARM: bootm: take into account gd->ram_top
@ 2020-02-13 18:29 Patrick Delaunay
  2020-02-14 19:16 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Patrick Delaunay @ 2020-02-13 18:29 UTC (permalink / raw)
  To: u-boot

From: Patrice Chotard <patrice.chotard@st.com>

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>
---

 arch/arm/lib/bootm.c | 3 +++
 1 file changed, 3 insertions(+)

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;
 	}
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-17 16:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-13 18:29 [PATCH] ARM: bootm: take into account gd->ram_top Patrick Delaunay
2020-02-14 19:16 ` Simon Glass
2020-02-18 10:32   ` Patrick DELAUNAY
2020-04-21 12:25 ` Tom Rini
2020-08-17  4:46 ` Baruch Siach
2020-08-17 16:29   ` Patrice CHOTARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox