summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-14 06:29:43 +0300
committerTom Rini <trini@konsulko.com>2021-01-28 01:03:16 +0300
commit9fe064646d2c9f3914cd5ceae51c34020aa77599 (patch)
tree971f208a76257181d735a00c200ff04a7c2591b1 /common/board_f.c
parent09d9ba9097ceb374f2802506c9e755fd8d5dd861 (diff)
downloadu-boot-9fe064646d2c9f3914cd5ceae51c34020aa77599.tar.xz
bloblist: Support relocating to a larger space
Typically in TPL/SPL the bloblist is quite small. But U-Boot proper may want to add a lot more to it, such as ACPI tables. Add a way to expand the bloblist by relocating it in U-Boot proper, along with the other relocation activities. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c
index ae3001bed1..4327a43a33 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -568,9 +568,10 @@ static int reserve_bloblist(void)
{
#ifdef CONFIG_BLOBLIST
/* Align to a 4KB boundary for easier reading of addresses */
- gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp - CONFIG_BLOBLIST_SIZE,
- 0x1000);
- gd->new_bloblist = map_sysmem(gd->start_addr_sp, CONFIG_BLOBLIST_SIZE);
+ gd->start_addr_sp = ALIGN_DOWN(gd->start_addr_sp -
+ CONFIG_BLOBLIST_SIZE_RELOC, 0x1000);
+ gd->new_bloblist = map_sysmem(gd->start_addr_sp,
+ CONFIG_BLOBLIST_SIZE_RELOC);
#endif
return 0;
@@ -658,7 +659,8 @@ static int reloc_bloblist(void)
debug("Copying bloblist from %p to %p, size %x\n",
gd->bloblist, gd->new_bloblist, size);
- memcpy(gd->new_bloblist, gd->bloblist, size);
+ bloblist_reloc(gd->new_bloblist, CONFIG_BLOBLIST_SIZE_RELOC,
+ gd->bloblist, size);
gd->bloblist = gd->new_bloblist;
}
#endif