diff options
author | Luigi Semenzato <semenzato@google.com> | 2011-03-17 10:33:41 -0700 |
---|---|---|
committer | Luigi Semenzato <semenzato@google.com> | 2011-03-17 10:33:41 -0700 |
commit | 83c3714ed39459e69d30d22ee087f1119fbb69a4 (patch) | |
tree | 6728c47e34af29825f8a21e0beef2b8cf9c844ab | |
parent | ad6824ba4fc18c4eba4e98ba2b2e476dfcedbbae (diff) | |
download | vboot-83c3714ed39459e69d30d22ee087f1119fbb69a4.tar.gz |
Perform a full self test before one-time initialization.
Change-Id: I2f5232d5133c0725ec21f885a4632e980062be8f
BUG=chrome-os-partner: 1826
TEST=none
Review URL: http://codereview.chromium.org/6688004
-rw-r--r-- | firmware/lib/rollback_index.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c index 94693856..9442b779 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; |