diff options
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 57a827cb..36bac6ed 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -374,23 +374,18 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx, /* Select boot path */ if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) { + vb2_clear_recovery(ctx); + /* - * Clear recovery request and subcode from nvdata, so that we - * don't get stuck in recovery mode after reboot. Should be - * called at some point after we are certain the system does - * not require any reboots for non-vboot-related reasons (e.g. - * FSP initialization), and before triggering a reboot to exit - * transient recovery mode (e.g. memory retraining request). + * Need to commit nvdata changes immediately, since we will be + * entering either manual recovery UI or BROKEN screen shortly. */ - vb2_nv_set(ctx, VB2_NV_RECOVERY_REQUEST, - VB2_RECOVERY_NOT_REQUESTED); - vb2_nv_set(ctx, VB2_NV_RECOVERY_SUBCODE, - VB2_RECOVERY_NOT_REQUESTED); + vb2_commit_data(ctx); /* If we're in recovery mode just to do memory retraining, all we need to do is reboot. */ if (sd->recovery_reason == VB2_RECOVERY_TRAIN_AND_REBOOT) { - VB2_DEBUG("Reboot after retraining in recovery.\n"); + VB2_DEBUG("Reboot after retraining in recovery\n"); rv = VBERROR_REBOOT_REQUIRED; goto VbSelectAndLoadKernel_exit; } |