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>
Implement TPM2 Startup related command.\r
\r
Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
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
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
ResponseCode = SwapBytes32(Res.Header.responseCode);\r
switch (ResponseCode) {\r
case TPM_RC_SUCCESS:\r
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
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
return EFI_SUCCESS;\r
default:\r
DEBUG ((EFI_D_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", ResponseCode));\r