From 148bd4e362de37a12b0c90357647bdcf2594d5f7 Mon Sep 17 00:00:00 2001 From: Samer El-Haj-Mahmoud Date: Fri, 29 Apr 2016 04:04:20 +0800 Subject: [PATCH] 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 --- SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c | 4 ++++ 1 file changed, 4 insertions(+) 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)); -- 2.39.2