From 63b9700b2ca0f2414ff242881bae9bfd77fdb138 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Tue, 26 Nov 2019 13:31:32 +0800 Subject: lib/coreboot_table: Add CBMEM_ID_VBOOT_WORKBUF pointer to coreboot table Since struct vb2_shared_data already contains workbuf_size and vboot_workbuf_size is never used in depthcharge, remove it from struct sysinfo_t. In addition, remove lb_vboot_workbuf() and add CBMEM_ID_VBOOT_WORKBUF pointer to coreboot table with add_cbmem_pointers(). Parsing of coreboot table in libpayload is modified accordingly. BRANCH=none BUG=chromium:1021452 TEST=emerge-nami coreboot libpayload depthcharge; Akali booted correctly Change-Id: I890df3ff93fa44ed6d3f9ad05f9c6e49780a8ecb Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/37234 Tested-by: build bot (Jenkins) Reviewed-by: Joel Kitching Reviewed-by: Julius Werner --- payloads/libpayload/include/sysinfo.h | 1 - payloads/libpayload/libc/coreboot.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'payloads/libpayload') diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index c05be7c15933..4b929f1390ea 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -96,7 +96,6 @@ struct sysinfo_t { struct cb_mainboard *mainboard; void *vboot_workbuf; - uint32_t vboot_workbuf_size; #if CONFIG(LP_ARCH_X86) int x86_rom_var_mtrr_index; diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c index 2ff2090c1918..f6e937923e04 100644 --- a/payloads/libpayload/libc/coreboot.c +++ b/payloads/libpayload/libc/coreboot.c @@ -86,10 +86,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info) static void cb_parse_vboot_workbuf(unsigned char *ptr, struct sysinfo_t *info) { - struct lb_range *vbwb = (struct lb_range *)ptr; - - info->vboot_workbuf = (void *)(uintptr_t)vbwb->range_start; - info->vboot_workbuf_size = vbwb->range_size; + info->vboot_workbuf = get_cbmem_ptr(ptr); } static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info) -- cgit v1.2.3