diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-01-24 14:30:10 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-16 07:46:17 -0800 |
commit | cc441a0ea8b0e1a7a1802070dc6ca606d80c9148 (patch) | |
tree | a9c8a7b52af3f3355cba82c9cb81b8780d530b6c /firmware/lib/ec_sync.c | |
parent | dff3a8544b09d54cce487b215a8713d4594c834b (diff) | |
download | vboot-cc441a0ea8b0e1a7a1802070dc6ca606d80c9148.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>
Diffstat (limited to 'firmware/lib/ec_sync.c')
-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; } } |