summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-07 16:40:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-08 11:43:23 -0600
commitff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch)
treedcfe4bc52848a5637c975a3352b57885e5b8a06d /common/board_f.c
parent34820924edbc4ec7803eb89d9852f4b870fa760a (diff)
parentf892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff)
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 99616fdac80..baf98fb8ec8 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -624,11 +624,14 @@ static int reserve_stacks(void)
static int reserve_bloblist(void)
{
#ifdef CONFIG_BLOBLIST
+ ulong size = bloblist_get_total_size();
+
+ if (size < CONFIG_BLOBLIST_SIZE_RELOC)
+ size = CONFIG_BLOBLIST_SIZE_RELOC;
+
/* Align to a 4KB boundary for easier reading of addresses */
- gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp -
- CONFIG_BLOBLIST_SIZE_RELOC, 0x1000);
- gd->boardf->new_bloblist = map_sysmem(gd->start_addr_sp,
- CONFIG_BLOBLIST_SIZE_RELOC);
+ gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp - size, 0x1000);
+ gd->boardf->new_bloblist = map_sysmem(gd->start_addr_sp, size);
#endif
return 0;
@@ -698,11 +701,14 @@ static int reloc_bloblist(void)
return 0;
}
if (gd->boardf->new_bloblist) {
- debug("Copying bloblist from %p to %p, size %x\n",
- gd->bloblist, gd->boardf->new_bloblist,
- gd->bloblist->total_size);
- return bloblist_reloc(gd->boardf->new_bloblist,
- CONFIG_BLOBLIST_SIZE_RELOC);
+ ulong size = bloblist_get_total_size();
+
+ if (size < CONFIG_BLOBLIST_SIZE_RELOC)
+ size = CONFIG_BLOBLIST_SIZE_RELOC;
+
+ debug("Copying bloblist from %p to %p, size %lx\n",
+ gd->bloblist, gd->boardf->new_bloblist, size);
+ return bloblist_reloc(gd->boardf->new_bloblist, size);
}
#endif