summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_firmware.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/vboot_firmware.c')
-rw-r--r--firmware/lib/vboot_firmware.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/lib/vboot_firmware.c b/firmware/lib/vboot_firmware.c
index 8d165f2a..d909e9fc 100644
--- a/firmware/lib/vboot_firmware.c
+++ b/firmware/lib/vboot_firmware.c
@@ -346,6 +346,13 @@ int LoadFirmware(VbCommonParams *cparams, VbSelectFirmwareParams *fparams,
/* Store recovery request, if any */
VbNvSet(vnc, VBNV_RECOVERY_REQUEST, VBERROR_SUCCESS != retval ?
recovery : VBNV_RECOVERY_NOT_REQUESTED);
+ /* If the system does not support RO_NORMAL and LoadFirmware()
+ * encountered an error, update the shared recovery reason if
+ * recovery was not previously requested. */
+ if (!(shared->flags & VBSD_BOOT_RO_NORMAL_SUPPORT) &&
+ VBNV_RECOVERY_NOT_REQUESTED == shared->recovery_reason &&
+ VBERROR_SUCCESS != retval)
+ shared->recovery_reason = recovery;
return retval;
}