[PATCH v2 3/4] malloc: Don't statically initialize av_ if using malloc_init

Tom Rini trini at konsulko.com
Fri Aug 11 00:11:38 CEST 2023


On Tue, Aug 08, 2023 at 06:53:19PM -0400, Sean Anderson wrote:

> When we enable malloc_init, there is no need to statically initialize
> av_, since we are going to do it manually. This lets us move av_ to
> .bss, saving around 1-2k of data (depending on the pointer size).
> 
> cALLOc must be adjusted to not access top before malloc_init.
> 
> While we're at it, rename/reword the Kconfig to better describe what
> this option does.
> 
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

As-is, this leads to a failure to build on ls1012aqds_tfa_SECURE_BOOT
and a number of other platforms.  For v3, please throw this at CI,
either in Azure or GitLab via the clock tree, thanks.

In specifics, I've thrown this and the fls/ffs series at my lab and it
seems to cause mx6cuboxi to fail to boot (a Pi 3 in 32bit mode, and
am335x_evm are booting fine as are the Pi 3 in 64bit mode, libretech-cc,
pine64_plus, am65x_evm_a53, and j721e_evm_a72).  I did a size comparison
build again and the whole log is at:
https://gist.github.com/trini/2e88e94743821586ef742a936c45c389
as there's some oddities again (like SPL growing).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230810/418f735e/attachment.sig>


More information about the U-Boot mailing list