board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
authorMarek Vasut <marex@denx.de>
Sat, 25 Jun 2022 17:58:24 +0000 (19:58 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 8 Jul 2022 16:20:28 +0000 (12:20 -0400)
commit5004901efb3b47f7fb22b29cdd127245d3814fd2
tree33251d05271c64614671b46ab1bb5522535a4594
parentcc5dfdee6b8a2c558f5c52f11004e26eb55fd830
board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR

In case the MALLOC_F_ADDR is set to non-zero value, the early malloc area is
not going to be placed just below stack top, but elsewhere. Do not reserve
MALLOC_F bytes in this case, as that wastes stack space and may even cause
insufficient stack space in SPL.

This functionality is particularly useful on i.MX8M, where the insufficient
stack space can be triggered.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Tom Rini <trini@konsulko.com>
common/init/board_init.c