diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-12-14 15:43:17 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-05 21:14:11 -0800 |
commit | 5142132f44bbee683c830fdb837bbedb00bad8ba (patch) | |
tree | 699df9f59656ff30f12bfacc4331d69afb9af1e1 /tests/vboot_api_devmode_tests.c | |
parent | 4e0939b377f65048dfc1ec8ceda6fd7c444fc8b8 (diff) | |
download | vboot-5142132f44bbee683c830fdb837bbedb00bad8ba.tar.gz |
firmware: use sd->gbb_flags
Vboot1 code directly referenced the GBB from cparams even though now
it has access to the GBB flags via the vb2 context. Refactor all
existing code to use the vb2 context, since that takes us one step
closer to getting rid of the old vboot1 cparams.
No change in functionality.
BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it
Change-Id: Ic4a5bf215b723a2eacbf0a4cf0eba8b1338155a2
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/847310
Reviewed-by: Shelley Chen <shchen@chromium.org>
Diffstat (limited to 'tests/vboot_api_devmode_tests.c')
-rw-r--r-- | tests/vboot_api_devmode_tests.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vboot_api_devmode_tests.c b/tests/vboot_api_devmode_tests.c index a65fc269..5b495163 100644 --- a/tests/vboot_api_devmode_tests.c +++ b/tests/vboot_api_devmode_tests.c @@ -12,6 +12,7 @@ #include "2sysincludes.h" #include "2api.h" +#include "2misc.h" #include "2nvstorage.h" #include "crc32.h" #include "gbb_header.h" @@ -134,6 +135,7 @@ test_case_t test[] = { /* Mock data */ static VbCommonParams cparams; +static uint8_t workbuf[VB2_KERNEL_WORKBUF_RECOMMENDED_SIZE]; static struct vb2_context ctx; static uint8_t shared_data[VB_SHARED_DATA_MIN_SIZE]; static VbSharedDataHeader* shared = (VbSharedDataHeader*)shared_data; @@ -160,6 +162,9 @@ static void ResetMocks(void) { cparams.gbb = &gbb; memset(&ctx, 0, sizeof(ctx)); + ctx.workbuf = workbuf; + ctx.workbuf_size = sizeof(workbuf); + vb2_init_context(&ctx); vb2_nv_init(&ctx); memset(&shared_data, 0, sizeof(shared_data)); |