aboutsummaryrefslogtreecommitdiff
path: root/src/security/vboot/misc.h
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-10-23 15:01:37 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-11-15 10:37:13 +0000
commit2332c7459ebb81c4dd4c3cc8b19beca820e93968 (patch)
tree78bc571ecc06ec9e5022dfd21670b832f59c20bd /src/security/vboot/misc.h
parentd3c58fdc6436b2c4455b07fe764fcae471a65433 (diff)
vboot: use vboot persistent context
vb2_context object is now stored on the workbuf as part of vb2_shared_data. Use vboot's new API functions vb2api_init and vb2api_relocate to create and move the workbuf. BUG=b:124141368, chromium:994060 TEST=Build locally BRANCH=none Change-Id: I051be1e47bf79b15a1689d49a5d4c031e9363dfa Signed-off-by: Joel Kitching <kitching@google.com> Also-Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/1902339 Reviewed-on: https://review.coreboot.org/c/coreboot/+/36300 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Diffstat (limited to 'src/security/vboot/misc.h')
-rw-r--r--src/security/vboot/misc.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/security/vboot/misc.h b/src/security/vboot/misc.h
index 1458354ffc..b45fc9c60d 100644
--- a/src/security/vboot/misc.h
+++ b/src/security/vboot/misc.h
@@ -29,10 +29,11 @@ struct selected_region {
};
/*
- * this is placed at the start of the vboot work buffer. selected_region is used
- * for the verstage to return the location of the selected slot. buffer is used
- * by the vboot2 core. Keep the struct CPU architecture agnostic as it crosses
- * stage boundaries.
+ * Stores vboot-related information. selected_region is used by verstage to
+ * store the location of the selected slot. buffer is used by vboot to store
+ * its work buffer. vb2_context is contained within this work buffer, and is
+ * accessible via vboot_init_context() and vboot_get_context() (see below).
+ * Keep the struct CPU architecture agnostic as it crosses stage boundaries.
*/
struct vboot_working_data {
struct selected_region selected_region;
@@ -54,9 +55,7 @@ struct vboot_working_data {
* Source: security/vboot/common.c
*/
struct vboot_working_data *vboot_get_working_data(void);
-void vboot_init_work_context(struct vb2_context *ctx);
-void vboot_finalize_work_context(struct vb2_context *ctx);
-struct vb2_shared_data *vboot_get_shared_data(void);
+struct vb2_context *vboot_get_context(void);
/* Returns 0 on success. < 0 on failure. */
int vboot_get_selected_region(struct region *region);