Chromium Code Reviews| 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 |