[PATCH] Revert "spl: Drop bd_info in the data section"

Tom Rini trini at konsulko.com
Mon Apr 19 19:33:41 CEST 2021


On Thu, Apr 08, 2021 at 11:56:11AM -0500, Alexandru Gagniuc wrote:

> This reverts commit 38d6b7ebdaee3e0e8426ef1b9df88bdce8ae2e75.
> 
> struct global_data contains a pointer to the bd_info structure. This
> pointer was populated spl_set_bd() to a pre-allocated bd_info in the
> ".data" section. The referenced commit replaced this mechanism to one
> that uses malloc(). That new mechanism is only used if SPL_ALLOC_BD=y.
> which very few boards do.
> 
> The result is that (struct global_data)->bd is NULL in SPL on most
> platforms. This breaks falcon mode, since arch_fixup_fdt() tries to
> access (struct global_data)->bd and set the "/memory" node in the
> devicetree. The result is that the "/memory" node contains garbage
> values, causing linux to panic() as it sets up the page table.
> 
> Instead of trying to fix the mess, potentially causing other issues,
> revert to the code that worked, while this change is reworked.
> 
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>

Applied to u-boot/master, thanks!

-- 
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/20210419/028c1a28/attachment.sig>


More information about the U-Boot mailing list