summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2015-09-17 12:54:51 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-17 17:35:11 -0700
commitc8e48545d5cbf43ebbe9acd008aa6b9985d514d6 (patch)
tree8f1db95bb733ed24c867b3431d25b6549382fead /utility
parent85f646613c7cb194a52608255e18cf827207c91a (diff)
downloadvboot-c8e48545d5cbf43ebbe9acd008aa6b9985d514d6.tar.gz
vboot2: Support reboot requested by secdata
When a TPM goes from the disabled state to the enabled state, it must reboot after being enabled, before it can be initialized. In vboot1, TLCL was part of vboot and this was handled internally. In vboot2, the caller must set a context flag, so that vboot can decide whether to allow the reboot, or whether to go directly to recovery mode. This check is necessary to handle the following cases: 1) The device is booting normally, but the TPM needs a reboot. This should simply reboot, without going to recovery mode. 2) The device is booting in recovery mode, but the TPM needs a reboot. If this is the first time it asked us, allow the reboot. 3) The TPM asked for a reboot last time, so we did. And it's still asking. Don't reboot, because that runs the risk that whatever is wrong won't be fixed next boot either, and we'll get stuck in a reboot loop that will prevent recovery. Boot into recovery mode. Add a new NvStorage bit to track whether the TPM requested a reboot on the previous boot. That's better than what we did in vboot1, where we used a special recovery request. Vboot1 couldn't track getting stuck in a reboot loop in normal mode, only in recovery mode. The new code can catch both. BUG=chrome-os-partner:45462 BRANCH=ryu TEST=make runtests Change-Id: I2ee54af107275ccf64a6cb41132b7a0fc02bb983 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/300572 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r--utility/crossystem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utility/crossystem.c b/utility/crossystem.c
index 606240e5..2c017aff 100644
--- a/utility/crossystem.c
+++ b/utility/crossystem.c
@@ -87,6 +87,7 @@ const Param sys_param_list[] = {
{"tpm_attack", CAN_WRITE, "TPM was interrupted since this flag was cleared"},
{"tpm_fwver", 0, "Firmware version stored in TPM", "0x%08x"},
{"tpm_kernver", 0, "Kernel version stored in TPM", "0x%08x"},
+ {"tpm_rebooted", 0, "TPM requesting repeated reboot (vboot2)"},
{"tried_fwb", 0, "Tried firmware B before A this boot"},
{"vdat_flags", 0, "Flags from VbSharedData", "0x%08x"},
{"vdat_lfdebug", IS_STRING|NO_PRINT_ALL,