Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: firmware/lib/rollback_index.c

Issue 6667051: Move ContinueSelfTest to a later point to save time. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: WIP Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | firmware/lib/tpm_lite/tlcl.c » ('j') | firmware/lib/tpm_lite/tlcl.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/rollback_index.c
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c
index 954dfeaf003fd626a47c755c9ad31184e60b0937..a8414c96f1b6f63b4f62e1c7526b4f4c03169406 100644
--- a/firmware/lib/rollback_index.c
+++ b/firmware/lib/rollback_index.c
@@ -182,12 +182,17 @@ uint32_t SetupTPM(int recovery_mode, int developer_mode,
RETURN_ON_FAILURE(TlclLibInit());
RETURN_ON_FAILURE(TlclStartup());
- /* Use ContinueSelfTest rather than SelfTestFull(). It enables
- * access to the subset of TPM commands we need in the firmware, and
- * allows the full self test to run in paralle with firmware
- * startup. By the time we get to the OS, self test will have
- * completed. */
+ /* Some TPMs start the self test automatically at power on. In that case we
+ * don't need to call ContinueSelfTest. On some (other) TPMs,
+ * ContinueSelfTest may block. In that case, we don't want to call it here.
+ * For TPMs in the intersection of these two sets, we're screwed.
Randall Spangler 2011/03/16 19:23:06 "we're screwed" --> "TPMs that require manually st
Luigi Semenzato 2011/03/16 20:51:59 OK, but I thought mine was more concise and to the
+ */
+#ifdef TPM_MANUAL_SELFTEST
+#ifdef TPM_BLOCKING_CONTINUESELFTEST
+#warning "lousy TPM!"
+#endif
RETURN_ON_FAILURE(TlclContinueSelfTest());
+#endif
result = TlclAssertPhysicalPresence();
if (result != 0) {
/* It is possible that the TPM was delivered with the physical presence
« no previous file with comments | « no previous file | firmware/lib/tpm_lite/tlcl.c » ('j') | firmware/lib/tpm_lite/tlcl.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698