Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33536 )
Change subject: vboot: deprecate vboot_handoff structure ......................................................................
vboot: deprecate vboot_handoff structure
vboot_handoff is no longer used in coreboot, and is not needed in CBMEM or cbtable.
BUG=b:124141368, b:124192753 TEST=make clean && make runtests BRANCH=none
Change-Id: I782d53f969dc9ae2775e3060371d06e7bf8e1af6 Signed-off-by: Joel Kitching kitching@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/33536 Reviewed-by: Patrick Georgi pgeorgi@google.com Reviewed-by: Martin Roth martinroth@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M payloads/libpayload/include/coreboot_tables.h M payloads/libpayload/include/sysinfo.h M payloads/libpayload/libc/coreboot.c M src/commonlib/include/commonlib/cbmem_id.h M src/commonlib/include/commonlib/coreboot_tables.h M src/lib/coreboot_table.c M src/security/vboot/vboot_common.c M src/security/vboot/vboot_common.h 8 files changed, 3 insertions(+), 80 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Martin Roth: Looks good to me, approved
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index b0d7c90..9b69a6d 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -57,7 +57,7 @@ CB_TAG_CBMEM_CONSOLE = 0x0017, CB_TAG_MRC_CACHE = 0x0018, CB_TAG_VBNV = 0x0019, - CB_TAG_VBOOT_HANDOFF = 0x0020, + CB_TAG_VBOOT_HANDOFF = 0x0020, /* deprecated */ CB_TAG_X86_ROM_MTRR = 0x0021, CB_TAG_DMA = 0x0022, CB_TAG_RAM_OOPS = 0x0023, diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index 72059ad..50f0e39 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -95,8 +95,6 @@ struct cb_header *header; struct cb_mainboard *mainboard;
- void *vboot_handoff; - u32 vboot_handoff_size; void *vboot_workbuf; uint32_t vboot_workbuf_size;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c index 26a3a48..03778b6 100644 --- a/payloads/libpayload/libc/coreboot.c +++ b/payloads/libpayload/libc/coreboot.c @@ -78,14 +78,6 @@ info->serial = ((struct cb_serial *)ptr); }
-static void cb_parse_vboot_handoff(unsigned char *ptr, struct sysinfo_t *info) -{ - struct lb_range *vbho = (struct lb_range *)ptr; - - info->vboot_handoff = (void *)(uintptr_t)vbho->range_start; - info->vboot_handoff_size = vbho->range_size; -} - static void cb_parse_vboot_workbuf(unsigned char *ptr, struct sysinfo_t *info) { struct lb_range *vbwb = (struct lb_range *)ptr; @@ -367,9 +359,6 @@ case CB_TAG_VBNV: cb_parse_vbnv(ptr, info); break; - case CB_TAG_VBOOT_HANDOFF: - cb_parse_vboot_handoff(ptr, info); - break; case CB_TAG_VBOOT_WORKBUF: cb_parse_vboot_workbuf(ptr, info); break; diff --git a/src/commonlib/include/commonlib/cbmem_id.h b/src/commonlib/include/commonlib/cbmem_id.h index 2236c95..ec702ec 100644 --- a/src/commonlib/include/commonlib/cbmem_id.h +++ b/src/commonlib/include/commonlib/cbmem_id.h @@ -68,7 +68,7 @@ #define CBMEM_ID_TCPA_TCG_LOG 0x54445041 #define CBMEM_ID_TIMESTAMP 0x54494d45 #define CBMEM_ID_TPM2_TCG_LOG 0x54504d32 -#define CBMEM_ID_VBOOT_HANDOFF 0x780074f0 +#define CBMEM_ID_VBOOT_HANDOFF 0x780074f0 /* deprecated */ #define CBMEM_ID_VBOOT_SEL_REG 0x780074f1 /* deprecated */ #define CBMEM_ID_VBOOT_WORKBUF 0x78007343 #define CBMEM_ID_VPD 0x56504420 diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h index 1ae5421..0fe9703 100644 --- a/src/commonlib/include/commonlib/coreboot_tables.h +++ b/src/commonlib/include/commonlib/coreboot_tables.h @@ -68,7 +68,7 @@ LB_TAG_CBMEM_CONSOLE = 0x0017, LB_TAG_MRC_CACHE = 0x0018, LB_TAG_VBNV = 0x0019, - LB_TAG_VBOOT_HANDOFF = 0x0020, + LB_TAG_VBOOT_HANDOFF = 0x0020, /* deprecated */ LB_TAG_X86_ROM_MTRR = 0x0021, LB_TAG_DMA = 0x0022, LB_TAG_RAM_OOPS = 0x0023, diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index df75698..95c2ae6 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -209,22 +209,6 @@ } #endif /* CONFIG_CHROMEOS */
-static void lb_vboot_handoff(struct lb_header *header) -{ - void *addr; - uint32_t size; - struct lb_range *vbho; - - if (vboot_get_handoff_info(&addr, &size)) - return; - - vbho = (struct lb_range *)lb_new_record(header); - vbho->tag = LB_TAG_VBOOT_HANDOFF; - vbho->size = sizeof(*vbho); - vbho->range_start = (intptr_t)addr; - vbho->range_size = size; -} - static void lb_vboot_workbuf(struct lb_header *header) { struct lb_range *vbwb; @@ -563,9 +547,6 @@ #endif
if (CONFIG(VBOOT)) { - /* pass along the vboot_handoff address. */ - lb_vboot_handoff(head); - /* pass along the vboot workbuf address. */ lb_vboot_workbuf(head); } diff --git a/src/security/vboot/vboot_common.c b/src/security/vboot/vboot_common.c index 8456dcf..cbd7a2e 100644 --- a/src/security/vboot/vboot_common.c +++ b/src/security/vboot/vboot_common.c @@ -51,30 +51,6 @@ return 0; }
-/* ========================== VBOOT HANDOFF APIs =========================== */ -int vboot_get_handoff_info(void **addr, uint32_t *size) -{ - /* - * vboot_handoff is present only after cbmem comes online. If we are in - * pre-ram stage, then bail out early. - */ - if (ENV_BOOTBLOCK || - (ENV_VERSTAGE && CONFIG(VBOOT_STARTS_IN_BOOTBLOCK))) - return -1; - - struct vboot_handoff *vboot_handoff; - vboot_handoff = cbmem_find(CBMEM_ID_VBOOT_HANDOFF); - - if (vboot_handoff == NULL) - return -1; - - *addr = vboot_handoff; - - if (size) - *size = sizeof(*vboot_handoff); - return 0; -} - /* ============================ VBOOT REBOOT ============================== */ void __weak vboot_platform_prepare_reboot(void) { diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h index 241dc90..8aadf9e 100644 --- a/src/security/vboot/vboot_common.h +++ b/src/security/vboot/vboot_common.h @@ -32,27 +32,6 @@ */ int vboot_check_recovery_request(void);
-/* ========================== VBOOT HANDOFF APIs =========================== */ -/* - * The vboot_handoff structure contains the data to be consumed by downstream - * firmware after firmware selection has been completed. Namely it provides - * vboot shared data as well as the flags from VbInit. - */ -struct vboot_handoff { - uint32_t reserved0; /* originally from VbInitParams */ - uint32_t out_flags; - uint32_t selected_firmware; - char shared_data[VB_SHARED_DATA_MIN_SIZE]; -} __packed; - -/* - * vboot_get_handoff_info returns pointer to the vboot_handoff structure if - * available. vboot_handoff is available only after CBMEM comes online. If size - * is not NULL, size of the vboot_handoff structure is returned in it. - * Returns 0 on success and -1 on error. - */ -int vboot_get_handoff_info(void **addr, uint32_t *size); - /* ============================ VBOOT REBOOT ============================== */ /* * vboot_reboot handles the reboot requests made by vboot_reference library. It