Message ID | 20210910204718.17765-11-marek.vasut+renesas@gmail.com |
---|---|
State | Accepted |
Commit | 7996b7e9f5826d172b820cea0d072e68cfe485ba |
Delegated to: | Tom Rini |
Headers | show |
Series | [01/12] lmb: Always compile arch_lmb_reserve() into U-Boot on arm | expand |
On Fri, Sep 10, 2021 at 10:47:17PM +0200, Marek Vasut wrote: > 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: Chris Zankel <chris@zankel.net> > Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> > Cc: Tom Rini <trini@konsulko.com> Applied to u-boot/next, thanks!
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index bb1e2886ab..277af18168 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -197,3 +197,15 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) return 1; } +static ulong get_sp(void) +{ + ulong ret; + + asm("mov %0, a1" : "=r"(ret) : ); + return ret; +} + +void arch_lmb_reserve(struct lmb *lmb) +{ + arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096); +}
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: Chris Zankel <chris@zankel.net> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com> --- V2: No change --- arch/xtensa/lib/bootm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)