mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 02:35:22 +00:00
recovery: Add new recovery reason to train memory and reboot
This new recovery reason will instruct the calling firmware in vboot_select_and_load_kernel to reboot the device (under the assumption that training of memory has already been performed by the firmware). On seeing the return code VBERROR_REBOOT_REQUESTED, calling firmware should perform a reboot. BUG=chrome-os-partner:59352 BRANCH=None TEST=make -j runtests successful Change-Id: I110a735e612665cb2378bd71ca01a111edaf58e3 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/407656 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
6e3931d1f6
commit
95b2d6ca2b
@@ -365,7 +365,7 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
|
||||
VB_SCREEN_TO_NORM_CONFIRMED,
|
||||
0, &vnc);
|
||||
VbExSleepMs(5000);
|
||||
return VBERROR_TPM_REBOOT_REQUIRED;
|
||||
return VBERROR_REBOOT_REQUIRED;
|
||||
case -1:
|
||||
VBDEBUG(("%s() - shutdown requested\n", __func__));
|
||||
return VBERROR_SHUTDOWN_REQUESTED;
|
||||
@@ -437,7 +437,7 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
|
||||
VB_SCREEN_TO_NORM_CONFIRMED,
|
||||
0, &vnc);
|
||||
VbExSleepMs(5000);
|
||||
return VBERROR_TPM_REBOOT_REQUIRED;
|
||||
return VBERROR_REBOOT_REQUIRED;
|
||||
case -1:
|
||||
VBDEBUG(("%s() - shutdown requested\n",
|
||||
__func__));
|
||||
@@ -667,7 +667,7 @@ VbError_t VbBootRecovery(VbCommonParams *cparams, LoadKernelParams *p)
|
||||
if (VbExGetSwitches
|
||||
(VB_INIT_FLAG_ALLOW_USB_BOOT))
|
||||
VbAllowUsbBoot();
|
||||
return VBERROR_TPM_REBOOT_REQUIRED;
|
||||
return VBERROR_REBOOT_REQUIRED;
|
||||
case -1:
|
||||
VBDEBUG(("%s() - Shutdown requested\n",
|
||||
__func__));
|
||||
@@ -1218,7 +1218,12 @@ VbError_t VbSelectAndLoadKernel(VbCommonParams *cparams,
|
||||
#endif
|
||||
|
||||
/* Select boot path */
|
||||
if (shared->recovery_reason) {
|
||||
if (shared->recovery_reason == VBNV_RECOVERY_TRAIN_AND_REBOOT) {
|
||||
/* Reboot requested by user recovery code. */
|
||||
VBDEBUG(("Reboot requested by user (recovery_reason=%d).\n",
|
||||
shared->recovery_reason));
|
||||
retval = VBERROR_REBOOT_REQUIRED;
|
||||
} else if (shared->recovery_reason) {
|
||||
/* Recovery boot */
|
||||
p.boot_flags |= BOOT_FLAG_RECOVERY;
|
||||
retval = VbBootRecovery(cparams, &p);
|
||||
|
||||
Reference in New Issue
Block a user