From: Samer El-Haj-Mahmoud Date: Thu, 28 Apr 2016 20:04:20 +0000 (+0800) Subject: SecurityPkg: Add DEBUG messages for TPM2Startup X-Git-Tag: edk2-stable201903~7196 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=148bd4e362de37a12b0c90357647bdcf2594d5f7 SecurityPkg: Add DEBUG messages for TPM2Startup Add DEBUG messages for TPM2Startup to distinguish between TPM_RC_SUCCESS and TPM_RC_INITIALIZE. This helps debugging some hardware problems. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud Reviewed-by: Chao Zhang Reviewed-by: Yao Jiewen --- diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c index f67043b84b..dc2c5628f9 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c @@ -2,6 +2,7 @@ Implement TPM2 Startup related command. Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -75,8 +76,11 @@ Tpm2Startup ( ResponseCode = SwapBytes32(Res.Header.responseCode); switch (ResponseCode) { case TPM_RC_SUCCESS: + DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_SUCCESS\n")); + return EFI_SUCCESS; case TPM_RC_INITIALIZE: // TPM_RC_INITIALIZE can be returned if Tpm2Startup is not required. + DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_INITIALIZE\n")); return EFI_SUCCESS; default: DEBUG ((EFI_D_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", ResponseCode));