diff options
author | Alexandru Gagniuc | 2021-04-08 11:56:11 -0500 |
---|---|---|
committer | Tom Rini | 2021-04-19 11:34:01 -0400 |
commit | 58b504e5e1f382891b8a58bb4103046c858c758e (patch) | |
tree | 01cc230e559458ea5c6567da2da69ef042f31e82 /arch | |
parent | 3a9aaefcaa3efc2a1cef86fbe0bf229a1bff9902 (diff) |
Revert "spl: Drop bd_info in the data section"
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@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/spl.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 5b43a2a2316..b3f1148f9df 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -41,9 +41,6 @@ u32 spl_boot_device(void) #ifdef CONFIG_SPL_BUILD -/* Define board data structure */ -static struct bd_info bdata __attribute__ ((section(".data"))); - void spl_board_init(void) { #if defined(CONFIG_NXP_ESBC) && defined(CONFIG_FSL_LSCH2) @@ -89,7 +86,7 @@ void board_init_f(ulong dummy) get_clocks(); preloader_console_init(); - gd->bd = &bdata; + spl_set_bd(); #ifdef CONFIG_SYS_I2C #ifdef CONFIG_SPL_I2C_SUPPORT |