summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_api_kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r--firmware/lib/vboot_api_kernel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index 1a99ecbe..359c6366 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -422,8 +422,12 @@ VbError_t VbEcSoftwareSync(VbSharedDataHeader *shared) {
}
VBDEBUG(("VbEcSoftwareSync() - hash len = %d\n", ec_hash_size));
- /* Get expected EC-RW code */
- rv = VbExEcGetExpectedRW(shared->firmware_index, &expected, &expected_size);
+ /* Get expected EC-RW code. Note that we've already checked for RO_NORMAL,
+ * so we know that the BIOS must be RW-A or RW-B, and therefore the EC must
+ * match. */
+ rv = VbExEcGetExpectedRW(
+ shared->firmware_index ? VB_SELECT_FIRMWARE_B : VB_SELECT_FIRMWARE_A,
+ &expected, &expected_size);
if (rv) {
VBDEBUG(("VbEcSoftwareSync() - VbExEcGetExpectedRW() returned %d\n", rv));
VbSetRecoveryRequest(VBNV_RECOVERY_EC_SOFTWARE_SYNC);