diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-08-15 18:05:22 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-08 20:04:33 -0700 |
commit | f78d505e04051153d16df2a0adb9927a47d81bcd (patch) | |
tree | f1aca878acc9a31e59d8b4ea892316b2de182c04 /firmware/lib/ec_sync_all.c | |
parent | 35da86f58928bf3063b496d329e1903bdca09ecd (diff) | |
download | vboot-f78d505e04051153d16df2a0adb9927a47d81bcd.tar.gz |
Support EC early firmware selection
Chromebox ECs perform EFS: verifying firmware before the AP boots.
This patch adds support for EC EFS.
EC EFS uses two slots: one is active slot and one is used for update.
AP is agnostic about which slot is active and which slot is for
update. Instead, AP recognizes one slot as 'active' and the other
as 'update' (or non active) slot.
After update is successful, AP issues a cold reboot command to
activate the new slot.
BUG=b:65028930,b:65264494
BRANCH=none
CQ-DEPEND=CL:616248
TEST=buildall. On Fizz, verify:
1. RW_B is old and updated by soft sync. RW_B is activated and
executed after reboot. System continues to boot to OS.
2. RW_A is old and updated by soft sync. RW_A is activated and
executed after reboot. System continues to boot to OS.
Change-Id: I6ca7686eb28b0b548785cf2c02eca1b67018f469
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616346
Diffstat (limited to 'firmware/lib/ec_sync_all.c')
-rw-r--r-- | firmware/lib/ec_sync_all.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/firmware/lib/ec_sync_all.c b/firmware/lib/ec_sync_all.c index aeec6079..1d9c7f71 100644 --- a/firmware/lib/ec_sync_all.c +++ b/firmware/lib/ec_sync_all.c @@ -28,7 +28,7 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams) if (rv) return rv; - /* Do EC sync phase 1; this determines if we need an update */ + /* Phase 1; this determines if we need an update */ VbError_t phase1_rv = ec_sync_phase1(ctx, cparams); int need_wait_screen = ec_will_update_slowly(ctx, cparams) || (fw_update == VB_AUX_FW_SLOW_UPDATE); @@ -60,16 +60,13 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams) VbDisplayScreen(ctx, cparams, VB_SCREEN_WAIT, 0); } - /* - * Do EC sync phase 2; this applies the update and/or jumps to the - * correct EC image. - */ + /* Phase 2; Applies update and/or jumps to the correct EC image */ rv = ec_sync_phase2(ctx, cparams); if (rv) return rv; /* - * Do software sync for devices tunneled throught the EC. + * Do software sync for devices tunneled through the EC. */ rv = VbExUpdateAuxFw(); if (rv) @@ -91,7 +88,7 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams) return VBERROR_VGA_OPROM_MISMATCH; } - /* Do EC sync phase 3; this completes sync and handles battery cutoff */ + /* Phase 3; Completes sync and handles battery cutoff */ rv = ec_sync_phase3(ctx, cparams); if (rv) return rv; |