summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2019-11-27 16:46:44 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-28 00:07:26 +0000
commitf479e44e0be7b4108c08c3d6fe1187fff90a0247 (patch)
tree48f0fa9d9c987b32c8cf03d73aadff9c2ea2b222
parent31125dec3c9db8e8bb576425ccb4b01748df1077 (diff)
downloadvboot-f479e44e0be7b4108c08c3d6fe1187fff90a0247.tar.gz
Recovery mode: Skip EC software sync
EC software sync should not be performed in recovery mode, as it breaks the vboot model. BUG=b:145310842 BRANCH=firmware-hatch-12672.B TEST=Verify that EC sync is skipped in recovery mode (coreboot & depthcharge) Change-Id: I771b970b044ed2b13a1cd79f5649af92b0177ac7 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1941038 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--firmware/2lib/2ec_sync.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/2lib/2ec_sync.c b/firmware/2lib/2ec_sync.c
index b884cb85..d2c663d1 100644
--- a/firmware/2lib/2ec_sync.c
+++ b/firmware/2lib/2ec_sync.c
@@ -462,6 +462,15 @@ vb2_error_t vb2api_ec_sync(struct vb2_context *ctx)
return VB2_SUCCESS;
}
+ /*
+ * If the device is in recovery mode, then EC sync should
+ * not be performed.
+ */
+ if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) {
+ VB2_DEBUG("In recovery mode, skipping EC sync\n");
+ return VB2_SUCCESS;
+ }
+
/* Phase 1; this determines if we need an update */
vb2_error_t phase1_rv = ec_sync_phase1(ctx);
int need_wait_screen = ec_will_update_slowly(ctx);