vboot: Set VBSD_EC_SOFTWARE_SYNC flag in vboot

With CL:1988245, vb2_context flag VB2_CONTEXT_EC_SYNC_SUPPORTED is set
in depthcharge. Set VBSD_EC_SOFTWARE_SYNC in shared data based on the
presence of VB2_CONTEXT_EC_SYNC_SUPPORTED.

BRANCH=none
BUG=chromium:1038259, chromium:1042135
TEST=FEATURES=test emerge-nami vboot_reference

Cq-Depend: chromium:1988245
Change-Id: Ia1dd57858234bbc43f25517f416b7506c1b7919a
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1988246
Reviewed-by: Joel Kitching <kitching@chromium.org>
This commit is contained in:
Yu-Ping Wu 2020-01-06 15:57:44 +08:00 committed by Commit Bot
parent 8d76529492
commit 431878c401
2 changed files with 6 additions and 6 deletions

View File

@ -243,8 +243,8 @@ static vb2_error_t vb2_kernel_setup(struct vb2_context *ctx,
* instead of flags. That would save on firmware image size because
* features that won't be used in an image could be compiled out.
*/
if (shared->flags & VBSD_EC_SOFTWARE_SYNC)
ctx->flags |= VB2_CONTEXT_EC_SYNC_SUPPORTED;
if (ctx->flags & VB2_CONTEXT_EC_SYNC_SUPPORTED)
shared->flags |= VBSD_EC_SOFTWARE_SYNC;
if (shared->flags & VBSD_NVDATA_V2)
ctx->flags |= VB2_CONTEXT_NVDATA_V2;

View File

@ -210,15 +210,15 @@ static void VbSlkTest(void)
TEST_EQ(kernel_version, 0x10002, " version");
/*
* If shared->flags doesn't ask for software sync, we won't notice
* that error.
* If ctx->flags doesn't ask for software sync, we won't notice that
* error.
*/
ResetMocks();
test_slk(0, 0, "EC sync not done");
/* Same if shared->flags asks for sync, but it's overridden by GBB */
/* Same if ctx->flags asks for sync, but it's overridden by GBB */
ResetMocks();
shared->flags |= VBSD_EC_SOFTWARE_SYNC;
ctx->flags |= VB2_CONTEXT_EC_SYNC_SUPPORTED;
gbb.flags |= VB2_GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC;
test_slk(0, 0, "EC sync disabled by GBB");