[coreboot-gerrit] Change in coreboot[master]: drivers/pc80/tpm: Fix missing tis_close() function

Martin Roth (Code Review) gerrit at coreboot.org
Fri May 5 23:33:10 CEST 2017


Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/19535 )

Change subject: drivers/pc80/tpm: Fix missing tis_close() function
......................................................................


drivers/pc80/tpm: Fix missing tis_close() function

tis_close() must be called after tis_open() otherwise the locked
locality isn't released and the sessions hangs.

Tested=PC Engines APU2

Change-Id: I1a06f6a29015708e4bc1de6e6678827c28b84e98
Signed-off-by: Philipp Deppenwiese <zaolin at das-labor.org>
Reviewed-on: https://review.coreboot.org/19535
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Patrick Rudolph <siro at das-labor.org>
---
M src/drivers/pc80/tpm/romstage.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Patrick Rudolph: Looks good to me, approved
  build bot (Jenkins): Verified



diff --git a/src/drivers/pc80/tpm/romstage.c b/src/drivers/pc80/tpm/romstage.c
index a257ba1..5531458 100644
--- a/src/drivers/pc80/tpm/romstage.c
+++ b/src/drivers/pc80/tpm/romstage.c
@@ -215,7 +215,6 @@
 	if (tis_open())
 		return;
 
-
 	if (s3resume) {
 		/* S3 Resume */
 		printk(BIOS_SPEW, "TPM: Resume\n");
@@ -226,6 +225,7 @@
 			 * in S3, so it's already initialized.
 			 */
 			printk(BIOS_DEBUG, "TPM: Already initialized.\n");
+			tis_close();
 			return;
 		}
 	} else {
@@ -234,6 +234,8 @@
 					response, sizeof(response));
 	}
 
+	tis_close();
+
 	if (result == TPM_SUCCESS) {
 		printk(BIOS_SPEW, "TPM: OK.\n");
 		return;

-- 
To view, visit https://review.coreboot.org/19535
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a06f6a29015708e4bc1de6e6678827c28b84e98
Gerrit-PatchSet: 11
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: Bill XIE <persmule at gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: Tobias Diedrich <ranma+coreboot at tdiedrich.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>



More information about the coreboot-gerrit mailing list