summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library/Tpm2CommandLib
diff options
context:
space:
mode:
authorSamer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>2016-04-29 04:04:20 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2016-05-03 10:03:41 +0800
commit148bd4e362de37a12b0c90357647bdcf2594d5f7 (patch)
tree9cd218be74cc5bf3d7c136b3760e53b3e5b3630d /SecurityPkg/Library/Tpm2CommandLib
parent81a23a0fee462de44f8e15fc6939a4b729d3e102 (diff)
downloadedk2-148bd4e362de37a12b0c90357647bdcf2594d5f7.tar.gz
edk2-148bd4e362de37a12b0c90357647bdcf2594d5f7.tar.bz2
edk2-148bd4e362de37a12b0c90357647bdcf2594d5f7.zip
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 <elhaj@hpe.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg/Library/Tpm2CommandLib')
-rw-r--r--SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c4
1 files changed, 4 insertions, 0 deletions
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. <BR>
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
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));