mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
vboot: add flag to indicate that the EC is slow to program
Some EC's are slow to program their firmware. This could happen at any boot as part of software sync. This adds the VB_INIT_FLAG_EC_SLOW_UPDATE input flag to VbInit(), so that vboot knows to display the EC-is-being-programmed screen when that flag is set. BUG=chrome-os-partner:12255 TEST=none This isn't activated yet by anything, so there's nothing to test. Change-Id: Id4d12e463fcdee017b7c52b53a2facefc33b745f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29370 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -437,7 +437,8 @@ static VbError_t EcProtectRW(void) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
VbError_t VbEcSoftwareSync(VbSharedDataHeader *shared) {
|
||||
VbError_t VbEcSoftwareSync(VbCommonParams* cparams) {
|
||||
VbSharedDataHeader* shared = (VbSharedDataHeader*)cparams->shared_data_blob;
|
||||
int in_rw = 0;
|
||||
int rv;
|
||||
const uint8_t *ec_hash;
|
||||
@@ -455,7 +456,7 @@ VbError_t VbEcSoftwareSync(VbSharedDataHeader *shared) {
|
||||
/* Recovery mode; just verify the EC is in RO code */
|
||||
if (rv == VBERROR_SUCCESS && in_rw == 1) {
|
||||
/* EC is definitely in RW firmware. We want it in read-only code, so
|
||||
* preseve the current recovery reason and reboot.
|
||||
* preserve the current recovery reason and reboot.
|
||||
*
|
||||
* We don't reboot on error or unknown EC code, because we could end
|
||||
* up in an endless reboot loop. If we had some way to track that we'd
|
||||
@@ -569,10 +570,11 @@ VbError_t VbEcSoftwareSync(VbSharedDataHeader *shared) {
|
||||
if (need_update) {
|
||||
VBDEBUG(("VbEcSoftwareSync() updating EC-RW...\n"));
|
||||
|
||||
/*
|
||||
* TODO: need flag passed into VbInit that EC update is slow; if it is,
|
||||
* display an "updating" screen while the update happens.
|
||||
*/
|
||||
if (shared->flags & VBSD_EC_SLOW_UPDATE) {
|
||||
VBDEBUG(("VbEcSoftwareSync() - EC is slow. Show WAIT screen.\n"));
|
||||
/* FIXME(crosbug.com/p/12257): Ensure the VGA Option ROM is loaded! */
|
||||
VbDisplayScreen(cparams, VB_SCREEN_WAIT, 0, &vnc);
|
||||
}
|
||||
|
||||
rv = VbExEcUpdateRW(expected, expected_size);
|
||||
if (rv == VBERROR_EC_REBOOT_TO_RO_REQUIRED) {
|
||||
@@ -642,7 +644,7 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams* cparams,
|
||||
|
||||
/* Do EC software sync if necessary */
|
||||
if (shared->flags & VBSD_EC_SOFTWARE_SYNC) {
|
||||
retval = VbEcSoftwareSync(shared);
|
||||
retval = VbEcSoftwareSync(cparams);
|
||||
if (retval != VBERROR_SUCCESS)
|
||||
goto VbSelectAndLoadKernel_exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user