[PATCH] Revert "arm: bootm: Disable LMB reservation for command line and board info on arm64"

Tom Rini trini at konsulko.com
Thu Jul 29 17:23:07 CEST 2021


On Thu, Jul 29, 2021 at 05:01:09PM +0200, Marek Vasut wrote:
> On 7/29/21 9:22 AM, Jan Kiszka wrote:
> > From: Jan Kiszka <jan.kiszka at siemens.com>
> > 
> > This reverts commit 2359fa7a87848626bcbd3399e92c657595880cd7.
> > 
> > While the goal is valid and there is surely unused memory in that area,
> > we also have a lot of crucial things still located at the top-of-memory
> > while running lmb_alloc_base. Such things are the page table (tlb_addr),
> > relocated U-Boot and the active stack. Possibly more. So this patch was
> > premature, we will need relocations of those things first if we want to
> > use the range.
> > 
> > Fixes booting on the IOT2050, but likely also on other boards. It got
> > stuck on relocating the FDT - over the relocated U-Boot code.
> > 
> > Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> > ---
> > 
> > Practically,
> > 
> > void arch_lmb_reserve(struct lmb *lmb)
> > {
> > 	lmb_reserve(lmb, gd->relocaddr, gd->ram_top - gd->relocaddr);
> > }
> 
> So this is wrong and breaks a use case on rcar3, where there is more stuff
> which should not be reserved until the ram top.
>
> I suspect the real fix here is to protect only the stack and tlb on arm64,
> not just everything from current stack bottom to ram top ?

Wait, what?  There's never been a U-Boot release that didn't reserve
that area so when did rcar3 introduce something there that shouldn't be
reserved?  And you had phrased this to me on IRC as about reserving spot
for ATAGS, and that not being needed of course on arm64.  But that's not
what's going on.  Perhaps the answer is that rcar3 needs to introduce a
board_lmb_reserve to free the normal arch one and provide whatever more
narrow scope it needs.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210729/b1987f92/attachment.sig>


More information about the U-Boot mailing list