diff options
author | Randall Spangler <rspangler@chromium.org> | 2018-01-03 13:42:40 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-09 14:14:17 -0800 |
commit | 79c1c6194bc45728a5043443d80506fa1d35c83b (patch) | |
tree | 8584ed93f483ff43171395cbc1e3acab1bc2b6d9 /tests/ec_sync_tests.c | |
parent | 7d92bd8a6ba2640cc6588607af9886c9ecef4127 (diff) | |
download | vboot-79c1c6194bc45728a5043443d80506fa1d35c83b.tar.gz |
firmware: Include vb1 shared data in vb2 struct
Currently, firmware verification uses entirely vb2 structs, including
vb2_shared_data. This goes through an ugly translation to the old vb1
VbSharedData to pass it to depthcharge. The vboot kernel verification
maintains an equally ugly translation back to the vb2 struct
internally.
Eventually, we want to get rid of all that and use vb2 all the way
down to what crossystem picks up from the OS.
But before we can do that, we need to finish translating kernel
verification code to use the new vb2 structs. This is a step on that
path, using vb2_shared_data equivalents where present and hiding the
old vb1 shared data struct as a member of vb2_shared_data so at least
the vboot functions don't need to pass around cparams to get at it.
This will be followed by more CLs which convert more vboot internals
to use vb2 structs directly, and eventually coreboot/depthcharge CLs
which pass the vb2 structs from firmware verification directly to
kernel verification.
No change in functionality.
BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it
Change-Id: I5df8ce81ba3c3ac3f2cb4229db5461757cd89d8d
Reviewed-on: https://chromium-review.googlesource.com/852856
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'tests/ec_sync_tests.c')
-rw-r--r-- | tests/ec_sync_tests.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ec_sync_tests.c b/tests/ec_sync_tests.c index 8a2ecd82..332290ae 100644 --- a/tests/ec_sync_tests.c +++ b/tests/ec_sync_tests.c @@ -83,7 +83,9 @@ static void ResetMocks(void) ctx.flags = VB2_CONTEXT_EC_SYNC_SUPPORTED; vb2_init_context(&ctx); vb2_nv_init(&ctx); + sd = vb2_get_sd(&ctx); + sd->vbsd = shared; memset(&shared_data, 0, sizeof(shared_data)); VbSharedDataInit(shared, sizeof(shared_data)); @@ -235,7 +237,7 @@ VbError_t VbExUpdateAuxFw() static void test_ssync(VbError_t retval, int recovery_reason, const char *desc) { - TEST_EQ(ec_sync_all(&ctx, &cparams), retval, desc); + TEST_EQ(ec_sync_all(&ctx), retval, desc); TEST_EQ(vb2_nv_get(&ctx, VB2_NV_RECOVERY_REQUEST), recovery_reason, " recovery reason"); } |