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

Unified Diff: firmware/lib/rollback_index.c

Issue 3298010: Bail out from S3Resume if TPM was not power-cycled. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: version change Created 10 years, 3 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/version.c » ('j') | 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 931e819edab6fcfae2e5a5a3c8369306150b8930..51174559e219a0789db358d0ff0dc88fbe82faf1 100644
--- a/firmware/lib/rollback_index.c
+++ b/firmware/lib/rollback_index.c
@@ -315,8 +315,18 @@ uint32_t RollbackKernelLock(void) {
#else
uint32_t RollbackS3Resume(void) {
+ uint32_t result;
TlclLibInit();
- RETURN_ON_FAILURE(TlclResume());
+ /* Check for INVALID_POSTINIT error, so we don't have to worry if this ends
+ * up in hardware that keeps the TPM powered on during S3.
+ */
+ result = TlclResume();
+ if (result == TPM_E_INVALID_POSTINIT) {
+ return TPM_SUCCESS;
+ }
+ if (result != TPM_SUCCESS) {
+ return result;
+ }
#ifdef USE_CONTINUE_SELF_TEST
/* TODO: ContinueSelfTest() should be faster than SelfTestFull, but
* may also not work properly in older TPM firmware. For now, do
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698