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

Wolfgang Denk wd at denx.de
Mon Aug 9 16:11:36 CEST 2021


Dear Tom,

In message <20210809131640.GN858 at bill-the-cat> you wrote:
> 
> Thanks for explaining.  It sounds like
> arch/arm/mach-imx/imx8m/soc.c::the=A0ft_system_setup() needs a comment
> that it uses a lot of stack, due to how complex it is, and that

I think this is the wrong approach.  It sounds as if we were
discouragin the use of the stack for dynamic buffers etc. We should
not do that. Instead, we should make sure that the stack starts
below any reserved memory locations, and is free to grow downward as
long as there is still memory available.

If U-Boot was an OS, we would probably think about implementing a
more complex memory management utilizing the MMU, but in a boot
loader this is clearly overkill.  But please, just let the stack
grow as it wants.

There may be completely legal use cases with unpredictable stack
requirements.  Think about recursive shell scripts, for example...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Remember, Information is not knowledge;  Knowledge  is  not  Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love; Love is
not music; Music is the best."                          - Frank Zappa


More information about the U-Boot mailing list