From cc441a0ea8b0e1a7a1802070dc6ca606d80c9148 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Wed, 24 Jan 2018 14:30:10 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/916635 Reviewed-by: Julius Werner --- firmware/lib/ec_sync.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'firmware/lib/ec_sync.c') 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; } } -- cgit v1.2.1