]> git.ipfire.org Git - people/ms/u-boot.git/commit - README
board_init: Change the logic to setup malloc_base
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 12 Nov 2015 14:30:19 +0000 (12:30 -0200)
committerTom Rini <trini@konsulko.com>
Fri, 13 Nov 2015 01:34:07 +0000 (20:34 -0500)
commit9ac4fc82071ce346e3885118242ff45d22f69b82
tree1faf780ca9c79168f1eecc7dacefed02df1900d4
parentbc80109b117abe4ed2cd4d12c8dc188561bc298e
board_init: Change the logic to setup malloc_base

Prior to commit 5ba534d247d418 ("arm: Switch 32-bit ARM to using generic
global_data setup") we used to have assembly code that configured the
malloc_base address.

Since this commit we use the board_init_f_mem() function in C to setup
malloc_base address.

In board_init_f_mem() there was a deliberate choice to support only
early malloc() or full malloc() in SPL, but not both.

Adapt this logic to allow both to be used, one after the other, in SPL.

This issue has been observed in a Congatec board, where we need to
retrieve the manufacturing information from the SPI NOR (the SPI API
calls malloc) prior to configuring the DRAM. In this case as malloc_base
was not configured we always see malloc to fail.

With this change we are able to use malloc in SPL prior to DRAM gets
initialized.

Also update the CONFIG_SYS_SPL_MALLOC_START entry in the README file.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
README
common/init/board_init.c