summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--firmware/lib/vboot_api_kernel.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4a481036..fffcfb7b 100644
--- a/Makefile
+++ b/Makefile
@@ -149,6 +149,10 @@ ifneq (${FORCE_LOGGING_ON},)
CFLAGS += -DFORCE_LOGGING_ON=${FORCE_LOGGING_ON}
endif
+ifneq (${PD_SYNC},)
+CFLAGS += -DPD_SYNC
+endif
+
# Create / use dependency files
CFLAGS += -MMD -MF $@.d
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 2f54d672..448e6963 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -625,6 +625,8 @@ VbError_t VbEcSoftwareSync(int devidx, VbCommonParams *cparams)
int need_update = 0;
int i;
+ VBDEBUG(("VbEcSoftwareSync(devidx=%d)\n", devidx));
+
/* Determine whether the EC is in RO or 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 */
VBDEBUG(("VbEcSoftwareSync() jumping to EC-RW\n"));
rv = VbExEcJumpToRW(devidx);
-
if (rv != VBERROR_SUCCESS) {
VBDEBUG(("VbEcSoftwareSync() - "
"VbExEcJumpToRW() returned %d\n", rv));
@@ -941,6 +942,13 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
retval = VbEcSoftwareSync(0, cparams);
if (retval != VBERROR_SUCCESS)
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. */