Add DEBUG messages for TPM12Startup to distinguish between TPM_SUCCESS
and
TPM_INVALID_POSTINIT. This helps debugging some hardware problems.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Implement TPM1.2 Startup related command.\r
\r
Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
Implement TPM1.2 Startup related command.\r
\r
Copyright (c) 2013, 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
#include <Library/BaseMemoryLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/Tpm12DeviceLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/Tpm12DeviceLib.h>\r
+#include <Library/DebugLib.h>\r
}\r
switch (SwapBytes32(Response.returnCode)) {\r
case TPM_SUCCESS:\r
}\r
switch (SwapBytes32(Response.returnCode)) {\r
case TPM_SUCCESS:\r
+ DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_SUCCESS\n"));\r
+ return EFI_SUCCESS;\r
case TPM_INVALID_POSTINIT:\r
// In warm reset, TPM may response TPM_INVALID_POSTINIT\r
case TPM_INVALID_POSTINIT:\r
// In warm reset, TPM may response TPM_INVALID_POSTINIT\r
+ DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_INVALID_POSTINIT\n"));\r
return EFI_SUCCESS;\r
default:\r
return EFI_DEVICE_ERROR;\r
return EFI_SUCCESS;\r
default:\r
return EFI_DEVICE_ERROR;\r