]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Add DEBUG messages for TPM2Startup
authorSamer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Thu, 28 Apr 2016 20:04:20 +0000 (04:04 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Tue, 3 May 2016 02:03:41 +0000 (10:03 +0800)
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>
SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c

index f67043b84b9d6e4df49427bd3f92dfcf9ca6b56f..dc2c5628f9201caac3259a3a286b7beb8c912a1d 100644 (file)
@@ -2,6 +2,7 @@
   Implement TPM2 Startup related command.\r
 \r
 Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -75,8 +76,11 @@ Tpm2Startup (
   ResponseCode = SwapBytes32(Res.Header.responseCode);\r
   switch (ResponseCode)  {\r
   case TPM_RC_SUCCESS:\r
+    DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_SUCCESS\n"));\r
+    return EFI_SUCCESS;\r
   case TPM_RC_INITIALIZE:\r
     // TPM_RC_INITIALIZE can be returned if Tpm2Startup is not required.\r
+    DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_INITIALIZE\n"));\r
     return EFI_SUCCESS;\r
   default:\r
     DEBUG ((EFI_D_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", ResponseCode));\r