mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
lmb: x86: Add arch_lmb_reserve()
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). It is rather likely this architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
7996b7e9f5
commit
a69753f31d
1 changed files with 18 additions and 0 deletions
|
@ -223,3 +223,21 @@ int do_bootm_linux(int flag, int argc, char *const argv[],
|
|||
|
||||
return boot_jump_linux(images);
|
||||
}
|
||||
|
||||
static ulong get_sp(void)
|
||||
{
|
||||
ulong ret;
|
||||
|
||||
#if CONFIG_IS_ENABLED(X86_64)
|
||||
ret = gd->start_addr_sp;
|
||||
#else
|
||||
asm("mov %%esp, %0" : "=r"(ret) : );
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void arch_lmb_reserve(struct lmb *lmb)
|
||||
{
|
||||
arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue