summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Semenzato <semenzato@chromium.org>2012-10-29 11:19:53 -0700
committerGerrit <chrome-bot@google.com>2012-10-29 14:49:36 -0700
commitd2852eabf6da8bd36ba898c9b375f0480fab02d2 (patch)
treeeda3526d7eac1f7f0cb6270a4a5b9cfb2c7b6a3a
parent8b42ac8e2682ee763a13baffe815b771d2103403 (diff)
downloadvboot-d2852eabf6da8bd36ba898c9b375f0480fab02d2.tar.gz
Add recovery reason for failure to correct TPM error
The TPM on snow devices may boot in an unusable state. The workaround is to detect this early and reboot. The workaround code prevents an infinite reboot loop by counting the number of reboots and entering recovery mode with this reason after a small threshold has been reached. BUG=chromium:156655 TEST=no test! Not even compiled! BRANCH=none Change-Id: Ica2f14f8f7df8c46b7cbe5dbd578ba93c8f3a78c Reviewed-on: https://gerrit.chromium.org/gerrit/36790 Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
-rw-r--r--firmware/include/vboot_nvstorage.h2
-rw-r--r--firmware/lib/vboot_display.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/firmware/include/vboot_nvstorage.h b/firmware/include/vboot_nvstorage.h
index e3504592..34906854 100644
--- a/firmware/include/vboot_nvstorage.h
+++ b/firmware/include/vboot_nvstorage.h
@@ -136,6 +136,8 @@ typedef enum VbNvParam {
#define VBNV_RECOVERY_RW_TEST_LK 0x47
/* No bootable disk found */
#define VBNV_RECOVERY_RW_NO_DISK 0x48
+/* Rebooting did not correct TPM_E_FAIL or TPM_E_FAILEDSELFTEST */
+#define VBNV_RECOVERY_TPM_E_FAIL 0x49
/* Unspecified/unknown error in rewritable firmware */
#define VBNV_RECOVERY_RW_UNSPECIFIED 0x7F
/* DM-verity error */
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index bc623790..99360a4f 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -485,6 +485,8 @@ static const char *RecoveryReasonString(uint8_t code) {
return "Test error from LoadKernel()";
case VBNV_RECOVERY_RW_NO_DISK:
return "No bootable disk found";
+ case VBNV_RECOVERY_TPM_E_FAIL:
+ return "TPM error that was not fixed by reboot";
case VBNV_RECOVERY_RW_UNSPECIFIED:
return "Unspecified/unknown error in RW firmware";
case VBNV_RECOVERY_KE_DM_VERITY: