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

Unified Diff: firmware/lib/rollback_index.c

Issue 6688004: Perform a full self test before one-time initialization. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git@master
Patch Set: remove references to disasters 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 | no next file » | no next file with comments »
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 94693856a3e03913a2596c2a8f3b4f1560f9a3c6..9442b7792c3004483475d9465f8ae01a4a4a264a 100644
--- a/firmware/lib/rollback_index.c
+++ b/firmware/lib/rollback_index.c
@@ -103,6 +103,15 @@ static uint32_t OneTimeInitializeTPM(RollbackSpaceFirmware* rsf,
VBDEBUG(("TPM: One-time initialization\n"));
+ /* Do a full test. This only happens the first time the device is turned on
+ * in the factory, so performance is not an issue. This is almost certainly
+ * not necessary, but it gives us more confidence about some code paths below
+ * that are difficult to test---specifically the ones that set lifetime
+ * flags, and are only executed once per physical TPM. */
+ result = TlclSelfTestFull();
+ if (result != TPM_SUCCESS)
+ return result;
+
result = TlclGetPermanentFlags(&pflags);
if (result != TPM_SUCCESS)
return result;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698