1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-26 16:13:55 +01:00

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>
This commit is contained in:
Simon Glass
2021-01-13 20:29:43 -07:00
committed by Tom Rini
parent 09d9ba9097
commit 9fe064646d
5 changed files with 73 additions and 4 deletions

View File

@@ -317,6 +317,15 @@ void bloblist_show_list(void)
}
}
void bloblist_reloc(void *to, uint to_size, void *from, uint from_size)
{
struct bloblist_hdr *hdr;
memcpy(to, from, from_size);
hdr = to;
hdr->size = to_size;
}
int bloblist_init(void)
{
bool expected;
@@ -327,6 +336,8 @@ int bloblist_init(void)
* that runs
*/
expected = !u_boot_first_phase();
if (spl_prev_phase() == PHASE_TPL && !IS_ENABLED(CONFIG_TPL_BLOBLIST))
expected = false;
if (expected)
ret = bloblist_check(CONFIG_BLOBLIST_ADDR,
CONFIG_BLOBLIST_SIZE);