mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
Call software sync a second time for PD, if necessary
If a device has both an EC and a separate PD chip, call software sync
for each chip.
BUG=chrome-os-partner:30079
BRANCH=none
TEST=Flash image.bin with new AP+EC+PD firmware, reboot.
See EC and PD both update and jump to RW.
On next cold boot, they jump to RW without again updating.
CQ-DEPEND=CL:210520
Change-Id: Ie445336ade46f0009c040afc14b3f40452caf27b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/210536
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
af23ef7ef1
commit
6014c04813
4
Makefile
4
Makefile
@@ -149,6 +149,10 @@ ifneq (${FORCE_LOGGING_ON},)
|
|||||||
CFLAGS += -DFORCE_LOGGING_ON=${FORCE_LOGGING_ON}
|
CFLAGS += -DFORCE_LOGGING_ON=${FORCE_LOGGING_ON}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (${PD_SYNC},)
|
||||||
|
CFLAGS += -DPD_SYNC
|
||||||
|
endif
|
||||||
|
|
||||||
# Create / use dependency files
|
# Create / use dependency files
|
||||||
CFLAGS += -MMD -MF $@.d
|
CFLAGS += -MMD -MF $@.d
|
||||||
|
|
||||||
|
|||||||
@@ -625,6 +625,8 @@ VbError_t VbEcSoftwareSync(int devidx, VbCommonParams *cparams)
|
|||||||
int need_update = 0;
|
int need_update = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
VBDEBUG(("VbEcSoftwareSync(devidx=%d)\n", devidx));
|
||||||
|
|
||||||
/* Determine whether the EC is in RO or RW */
|
/* Determine whether the EC is in RO or RW */
|
||||||
rv = VbExEcRunningRW(devidx, &in_rw);
|
rv = VbExEcRunningRW(devidx, &in_rw);
|
||||||
|
|
||||||
@@ -861,7 +863,6 @@ VbError_t VbEcSoftwareSync(int devidx, VbCommonParams *cparams)
|
|||||||
/* Tell EC to jump to its RW image */
|
/* Tell EC to jump to its RW image */
|
||||||
VBDEBUG(("VbEcSoftwareSync() jumping to EC-RW\n"));
|
VBDEBUG(("VbEcSoftwareSync() jumping to EC-RW\n"));
|
||||||
rv = VbExEcJumpToRW(devidx);
|
rv = VbExEcJumpToRW(devidx);
|
||||||
|
|
||||||
if (rv != VBERROR_SUCCESS) {
|
if (rv != VBERROR_SUCCESS) {
|
||||||
VBDEBUG(("VbEcSoftwareSync() - "
|
VBDEBUG(("VbEcSoftwareSync() - "
|
||||||
"VbExEcJumpToRW() returned %d\n", rv));
|
"VbExEcJumpToRW() returned %d\n", rv));
|
||||||
@@ -941,6 +942,13 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
|||||||
retval = VbEcSoftwareSync(0, cparams);
|
retval = VbEcSoftwareSync(0, cparams);
|
||||||
if (retval != VBERROR_SUCCESS)
|
if (retval != VBERROR_SUCCESS)
|
||||||
goto VbSelectAndLoadKernel_exit;
|
goto VbSelectAndLoadKernel_exit;
|
||||||
|
|
||||||
|
#ifdef PD_SYNC
|
||||||
|
retval = VbEcSoftwareSync(1, cparams);
|
||||||
|
if (retval != VBERROR_SUCCESS)
|
||||||
|
goto VbSelectAndLoadKernel_exit;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read kernel version from the TPM. Ignore errors in recovery mode. */
|
/* Read kernel version from the TPM. Ignore errors in recovery mode. */
|
||||||
|
|||||||
Reference in New Issue
Block a user