lmb: do away with arch_lmb_reserve()

All of the current definitions of arch_lmb_reserve() are doing the
same thing -- reserve the region of memory occupied by U-Boot,
starting from the current stack address to the ram_top. Introduce a
function lmb_reserve_uboot_region() which does this, and do away with
the arch_lmb_reserve() function.

Instead of using the current value of stack pointer for starting the
reserved region, have a fixed value, considering the stack size config
value.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Sughosh Ganu
2024-08-26 17:29:30 +05:30
committed by Tom Rini
parent 17f695dd1b
commit 6534d26ee9
13 changed files with 42 additions and 197 deletions

View File

@@ -101,16 +101,3 @@ int do_bootm_linux(int flag, struct bootm_info *bmi)
/* does not return */
return 1;
}
static ulong get_sp(void)
{
ulong ret;
asm("mov r15, %0" : "=r"(ret) : );
return ret;
}
void arch_lmb_reserve(void)
{
arch_lmb_reserve_generic(get_sp(), gd->ram_top, 4096);
}