summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2019-11-26 13:31:32 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-12-02 13:00:45 +0000
commit63b9700b2ca0f2414ff242881bae9bfd77fdb138 (patch)
treea770abe4c7d45b7d6caded011886c987c61a4b55 /src/lib
parenta2962daf6fd1e184b7444feabe3f963a9ba614d7 (diff)
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 <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37234 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Joel Kitching <kitching@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/coreboot_table.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 8b18dfb18e..af9f6599c5 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -218,23 +218,6 @@ static void lb_vbnv(struct lb_header *header)
}
#endif /* CONFIG_CHROMEOS */
-static void lb_vboot_workbuf(struct lb_header *header)
-{
- struct lb_range *vbwb;
- void *wb = vboot_get_workbuf();
-
- vbwb = (struct lb_range *)lb_new_record(header);
- vbwb->tag = LB_TAG_VBOOT_WORKBUF;
- vbwb->size = sizeof(*vbwb);
- vbwb->range_start = (uintptr_t)wb;
- /*
- * TODO(chromium:1021452): Since cbmem size of vboot workbuf is now
- * always a known value, we hardcode the value of range_size here.
- * Ultimately we'll want to move this to add_cbmem_pointers() below.
- */
- vbwb->range_size = VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE;
-}
-
__weak uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; }
__weak uint32_t ram_code(void) { return UNDEFINED_STRAPPING_ID; }
__weak uint32_t sku_id(void) { return UNDEFINED_STRAPPING_ID; }
@@ -349,6 +332,7 @@ static void add_cbmem_pointers(struct lb_header *header)
{CBMEM_ID_WIFI_CALIBRATION, LB_TAG_WIFI_CALIBRATION},
{CBMEM_ID_TCPA_LOG, LB_TAG_TCPA_LOG},
{CBMEM_ID_FMAP, LB_TAG_FMAP},
+ {CBMEM_ID_VBOOT_WORKBUF, LB_TAG_VBOOT_WORKBUF},
};
int i;
@@ -558,11 +542,6 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
lb_vbnv(head);
#endif
- if (CONFIG(VBOOT)) {
- /* pass along the vboot workbuf address. */
- lb_vboot_workbuf(head);
- }
-
/* Add strapping IDs if available */
lb_board_id(head);
lb_ram_code(head);