
Dear Tom,
In message 20210809131640.GN858@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