summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2021-04-08 11:56:11 -0500
committerTom Rini <trini@konsulko.com>2021-04-19 11:34:01 -0400
commit58b504e5e1f382891b8a58bb4103046c858c758e (patch)
tree01cc230e559458ea5c6567da2da69ef042f31e82 /include/spl.h
parent3a9aaefcaa3efc2a1cef86fbe0bf229a1bff9902 (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 'include/spl.h')
-rw-r--r--include/spl.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/spl.h b/include/spl.h
index 4f6e0e53f5..cee9a42ddb 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -357,15 +357,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device);
* If not overridden, it is weakly defined in common/spl/spl_mmc.c.
*/
int spl_mmc_boot_partition(const u32 boot_device);
-
-/**
- * spl_alloc_bd() - Allocate space for bd_info
- *
- * This sets up the gd->bd pointer by allocating memory for it
- *
- * @return 0 if OK, -ENOMEM if out of memory
- */
-int spl_alloc_bd(void);
+void spl_set_bd(void);
/**
* spl_set_header_raw_uboot() - Set up a standard SPL image structure