
On 7/29/21 9:22 AM, Jan Kiszka wrote:
From: Jan Kiszka jan.kiszka@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@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 ?