diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2019-11-27 16:46:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-04 21:41:54 +0000 |
commit | ef064921cd3e4d631d53c8d9e5ca6cfbd0b81b1b (patch) | |
tree | 5fc8ca54004d5e46df57ad86653d341feee694f9 /firmware | |
parent | fa6298dfd85fda32617a5f54434085563027bd01 (diff) | |
download | vboot-ef064921cd3e4d631d53c8d9e5ca6cfbd0b81b1b.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/+/1941037
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/2lib/2ec_sync.c | 9 |
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); |