From 9fe064646d2c9f3914cd5ceae51c34020aa77599 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 13 Jan 2021 20:29:43 -0700 Subject: 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 --- common/bloblist.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'common/bloblist.c') diff --git a/common/bloblist.c b/common/bloblist.c index 33b58623807..e32f551e27e 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -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); -- cgit v1.2.3 From 02d7a53ce6e31dc8f9f45949209468c16a025638 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 13 Jan 2021 20:29:44 -0700 Subject: bloblist: Add missing tag names Add tag names for recently added types. Fixes: d2cb7a22da0 (x86: Allow putting some tables in the bloblist) Signed-off-by: Simon Glass --- common/bloblist.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/bloblist.c') diff --git a/common/bloblist.c b/common/bloblist.c index e32f551e27e..0e6448becbc 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -33,6 +33,12 @@ static const char *const tag_name[] = { [BLOBLISTT_SPL_HANDOFF] = "SPL hand-off", [BLOBLISTT_VBOOT_CTX] = "Chrome OS vboot context", [BLOBLISTT_VBOOT_HANDOFF] = "Chrome OS vboot hand-off", + [BLOBLISTT_ACPI_GNVS] = "ACPI GNVS", + [BLOBLISTT_INTEL_VBT] = "Intel Video-BIOS table", + [BLOBLISTT_TPM2_TCG_LOG] = "TPM v2 log space", + [BLOBLISTT_TCPA_LOG] = "TPM log space", + [BLOBLISTT_ACPI_TABLES] = "ACPI tables for x86", + [BLOBLISTT_SMBIOS_TABLES] = "SMBIOS tables for x86", }; const char *bloblist_tag_name(enum bloblist_tag_t tag) -- cgit v1.2.3