On Sun, Oct 10, 2021 at 11:52:09PM +0200, marek.vasut@gmail.com wrote: > From: Marek Vasut > > In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is > not relocated, however the stack and heap is at the end of DRAM > after relocation. Reserve a LMB area for the non-relocated U-Boot > code so it won't be overwritten. > > Signed-off-by: Marek Vasut > Cc: Simon Glass > Cc: Tom Rini > --- > arch/arm/lib/stack.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c > index 656084c7e5..d2e2715ecf 100644 > --- a/arch/arm/lib/stack.c > +++ b/arch/arm/lib/stack.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > DECLARE_GLOBAL_DATA_PTR; > > @@ -46,4 +47,12 @@ static ulong get_sp(void) > void arch_lmb_reserve(struct lmb *lmb) > { > arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 16384); > + > +#ifdef CONFIG_ARM > + if (gd->flags & GD_FLG_SKIP_RELOC) { > + lmb_reserve(lmb, (phys_addr_t)__image_copy_start, > + (phys_addr_t)__image_copy_end - > + (phys_addr_t)__image_copy_start); > + } > +#endif > } Erm, this is in the arm code, the patch subject says arm64 and you're testing for CONFIG_ARM (which will always be true here). Can you please respin? Also, the whitespace of the new code is too indented. Thanks. -- Tom