summaryrefslogtreecommitdiffstats
path: root/src/lib/coreboot_table.c
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2019-11-26 10:47:35 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-12-02 13:00:36 +0000
commita2962daf6fd1e184b7444feabe3f963a9ba614d7 (patch)
tree1cccbb5e2ec7393d0af72dec741c9b410f686e67 /src/lib/coreboot_table.c
parent2317b4f1140821051d8688a95fcfd7e0eedaa773 (diff)
downloadcoreboot-a2962daf6fd1e184b7444feabe3f963a9ba614d7.tar.gz
coreboot-a2962daf6fd1e184b7444feabe3f963a9ba614d7.tar.bz2
coreboot-a2962daf6fd1e184b7444feabe3f963a9ba614d7.zip
security/vboot: Remove struct vboot_working_data
After CB:36808, CB:36844 and CB:36845, all fields except buffer_offset were removed from struct vboot_working_data. Since buffer_offset is used to record the offset of the workbuf relative to the whole structure, it is no longer needed. This patch removes the structure, and renames vboot_get_working_data() to vboot_get_workbuf(). BRANCH=none BUG=chromium:1021452 TEST=emerge-nami coreboot Change-Id: I304a5e4236f13b1aecd64b88ca5c8fbc1526e592 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37231 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Joel Kitching <kitching@google.com>
Diffstat (limited to 'src/lib/coreboot_table.c')
-rw-r--r--src/lib/coreboot_table.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 7245a6389374..8b18dfb18e09 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -221,20 +221,18 @@ static void lb_vbnv(struct lb_header *header)
static void lb_vboot_workbuf(struct lb_header *header)
{
struct lb_range *vbwb;
- struct vboot_working_data *wd = vboot_get_working_data();
+ 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)wd + wd->buffer_offset;
+ 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,
- * but we'll have to get rid of the vboot_working_data struct first.
+ * Ultimately we'll want to move this to add_cbmem_pointers() below.
*/
- vbwb->range_size = VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE -
- wd->buffer_offset;
+ vbwb->range_size = VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE;
}
__weak uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; }