diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-01-24 14:30:10 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-02-17 02:21:36 +0000 |
commit | 78b7d8b9c8cc03d54cbe7c57207ead7f2f895f3d (patch) | |
tree | 51709d80d0a271c3b3c8352c56ea3005fb206c5f | |
parent | e0d8e708bf74b69ac0c6d8b15fa4debbeb47a90a (diff) | |
download | vboot-78b7d8b9c8cc03d54cbe7c57207ead7f2f895f3d.tar.gz |
Clear OPROM_NEEDED on EC update before reboot
This patch makes ec_sync_all clear OPROM_NEEDED flag when
ec_sync_phase2 updates EC and requests reboot.
Without this change OPROM_NEEDED flag will stay forever because after
reboot need_wait_screen won't be set (thus line 90 won't be reached).
BUG=b:72387533
BRANCH=none
TEST=Verify firmware screens are displayed on type-c monitor:
developer warning screen, critical update screen, recovery screen.
Change-Id: I9cc072efbf937ac438b55f3812f677612f79eaf9
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/916635
Reviewed-by: Julius Werner <jwerner@chromium.org>
(cherry picked from commit cc441a0ea8b0e1a7a1802070dc6ca606d80c9148)
Reviewed-on: https://chromium-review.googlesource.com/884566
-rw-r--r-- | firmware/lib/ec_sync.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/lib/ec_sync.c b/firmware/lib/ec_sync.c index 83ad8025..afa6f1e7 100644 --- a/firmware/lib/ec_sync.c +++ b/firmware/lib/ec_sync.c @@ -255,6 +255,9 @@ static VbError_t sync_one_ec(struct vb2_context *ctx, int devidx) * TODO: Switch slot and proceed if EC is still in RO. */ if (is_rw_ab) { VB2_DEBUG("Rebooting to jump to new EC-RW\n"); + /* Since we're rebooting, ec_sync_all won't be given a + * chance to clear the flag. Need to clear it here. */ + vb2_nv_set(ctx, VB2_NV_OPROM_NEEDED, 0); return VBERROR_EC_REBOOT_TO_SWITCH_RW; } } |