[coreboot-gerrit] Change in coreboot[master]: tpm2/tlcl_send_startup: correct TPM2_Startup error logic
Philipp Deppenwiese (Code Review)
gerrit at coreboot.org
Fri Oct 5 05:47:25 CEST 2018
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/28749 )
Change subject: tpm2/tlcl_send_startup: correct TPM2_Startup error logic
......................................................................
tpm2/tlcl_send_startup: correct TPM2_Startup error logic
BUG=b:114018226
TEST=compile coreboot
Change-Id: Iffad582d5c19252dde1c9dc97fc7fd145944a3b3
Signed-off-by: Joel Kitching <kitching at google.com>
Reviewed-on: https://review.coreboot.org/28749
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Reviewed-by: Furquan Shaikh <furquan at google.com>
---
M src/security/tpm/tss/tcg-2.0/tss.c
1 file changed, 6 insertions(+), 7 deletions(-)
Approvals:
build bot (Jenkins): Verified
Aaron Durbin: Looks good to me, approved
Furquan Shaikh: Looks good to me, approved
diff --git a/src/security/tpm/tss/tcg-2.0/tss.c b/src/security/tpm/tss/tcg-2.0/tss.c
index 7db746f..e6ec57c 100644
--- a/src/security/tpm/tss/tcg-2.0/tss.c
+++ b/src/security/tpm/tss/tcg-2.0/tss.c
@@ -61,14 +61,13 @@
startup.startup_type = type;
response = tpm_process_command(TPM2_Startup, &startup);
- if (response && response->hdr.tpm_code &&
- (response->hdr.tpm_code != TPM_RC_INITIALIZE)) {
- printk(BIOS_INFO, "%s: Startup return code is %x\n",
- __func__, response->hdr.tpm_code);
- return TPM_E_IOERROR;
+ if (response && (response->hdr.tpm_code == 0 ||
+ response->hdr.tpm_code == TPM_RC_INITIALIZE)) {
+ return TPM_SUCCESS;
}
- return TPM_SUCCESS;
-
+ printk(BIOS_INFO, "%s: Startup return code is %x\n",
+ __func__, response->hdr.tpm_code);
+ return TPM_E_IOERROR;
}
uint32_t tlcl_resume(void)
--
To view, visit https://review.coreboot.org/28749
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iffad582d5c19252dde1c9dc97fc7fd145944a3b3
Gerrit-Change-Number: 28749
Gerrit-PatchSet: 5
Gerrit-Owner: Joel Kitching <kitching at google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Andrey Pronin <apronin at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Joel Kitching <kitching at google.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181005/1051f15c/attachment.html>
More information about the coreboot-gerrit
mailing list