Kapil Porwal has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74767 )
Change subject: payloads/libpayload: Support sending EOP from payload ......................................................................
payloads/libpayload: Support sending EOP from payload
Add support for sending EOP from payload
BUG=b:279184514 TEST=Verify sending EOP from depthcharge
Signed-off-by: Kapil Porwal kapilporwal@google.com Change-Id: I6e52434b178ba2963c756241e588cb075f71ffa4 --- M payloads/libpayload/include/coreboot_tables.h M payloads/libpayload/include/sysinfo.h M payloads/libpayload/libc/coreboot.c 3 files changed, 31 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/74767/1
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 5f6a223..53637fe 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -80,6 +80,7 @@ CB_TAG_TCPA_LOG = 0x0036, CB_TAG_FMAP = 0x0037, CB_TAG_SMMSTOREV2 = 0x0039, + CB_TAG_CSE_EOP = 0x003b, CB_TAG_BOARD_CONFIG = 0x0040, CB_TAG_ACPI_CNVS = 0x0041, CB_TAG_TYPE_C_INFO = 0x0042, @@ -419,6 +420,12 @@ u32 type; };
+struct cb_cse_eop { + uint32_t tag; + uint32_t size; + void (*send)(void); +}; + /* * Handoff the ACPI RSDP */ diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index 12d8a13..1bb64fe 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -159,6 +159,7 @@ uint32_t cbfs_ro_mcache_size; uintptr_t cbfs_rw_mcache_offset; uint32_t cbfs_rw_mcache_size; + struct cb_cse_eop *cse_eop; };
extern struct sysinfo_t lib_sysinfo; diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c index bcc9530..d48c7cf 100644 --- a/payloads/libpayload/libc/coreboot.c +++ b/payloads/libpayload/libc/coreboot.c @@ -277,6 +277,11 @@ info->acpi_rsdp = cb_acpi_rsdp->rsdp_pointer; }
+static void cb_parse_cse_eop(unsigned char *ptr, struct sysinfo_t *info) +{ + info->cse_eop = (struct cb_cse_eop*)ptr; +} + int cb_parse_header(void *addr, int len, struct sysinfo_t *info) { struct cb_header *header; @@ -423,6 +428,9 @@ case CB_TAG_PCIE: cb_parse_pcie(ptr, info); break; + case CB_TAG_CSE_EOP: + cb_parse_cse_eop(ptr, info); + break; default: cb_parse_arch_specific(rec, info); break;