summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-03-13 18:10:52 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-19 21:43:02 +0000
commit8d0f59935d340287b15e21f19e2f2c28fcb45cce (patch)
tree617df5d4ab793c37f93476916d1836add4a00f3a /src/security
parent55fb6b4d0d6ab4d8d5e04a1822e1889810b42ce7 (diff)
vboot: make vboot workbuf available to payload
Create a new cbtable entry called VBOOT_WORKBUF for storing a pointer to the vboot workbuf within the vboot_working_data structure. BUG=b:124141368, b:124192753 TEST=Build and deploy to eve TEST=util/lint/checkpatch.pl -g origin/master..HEAD TEST=util/abuild/abuild -B -e -y -c 50 -p none -x BRANCH=none Change-Id: Id68f43c282939d9e1b419e927a14fe8baa290d91 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31887 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/common.c20
-rw-r--r--src/security/vboot/misc.h19
2 files changed, 20 insertions, 19 deletions
diff --git a/src/security/vboot/common.c b/src/security/vboot/common.c
index 47e1aa4f56..2348d31088 100644
--- a/src/security/vboot/common.c
+++ b/src/security/vboot/common.c
@@ -25,24 +25,6 @@
#include <security/vboot/symbols.h>
#include <security/vboot/vboot_common.h>
-struct selected_region {
- uint32_t offset;
- uint32_t size;
-};
-
-/*
- * 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.
- */
-struct vboot_working_data {
- struct selected_region selected_region;
- /* offset of the buffer from the start of this struct */
- uint32_t buffer_offset;
- uint32_t buffer_size;
-};
-
/* TODO(kitching): Use VB2_FIRMWARE_WORKBUF_RECOMMENDED_SIZE instead. */
static size_t vboot_working_data_size(void)
{
@@ -56,7 +38,7 @@ static size_t vboot_working_data_size(void)
die("impossible!");
}
-static struct vboot_working_data * const vboot_get_working_data(void)
+struct vboot_working_data * const vboot_get_working_data(void)
{
struct vboot_working_data *wd = NULL;
diff --git a/src/security/vboot/misc.h b/src/security/vboot/misc.h
index 24e349d804..27317ad32d 100644
--- a/src/security/vboot/misc.h
+++ b/src/security/vboot/misc.h
@@ -21,9 +21,28 @@
struct vb2_context;
struct vb2_shared_data;
+struct selected_region {
+ uint32_t offset;
+ uint32_t size;
+};
+
+/*
+ * 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.
+ */
+struct vboot_working_data {
+ struct selected_region selected_region;
+ /* offset of the buffer from the start of this struct */
+ uint32_t buffer_offset;
+ uint32_t buffer_size;
+};
+
/*
* Source: security/vboot/common.c
*/
+struct vboot_working_data * const 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);