From: Samer El-Haj-Mahmoud Date: Thu, 28 Apr 2016 20:32:55 +0000 (+0800) Subject: SecurityPkg: Add DEBUG messages for TPM12Startup X-Git-Tag: edk2-stable201903~7195 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f060d160ea35243ff3389909fb2fa2a4867c2f7e SecurityPkg: Add DEBUG messages for TPM12Startup 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 Signed-off-by: Derek Lin Reviewed-by: Chao Zhang Reviewed-by: Yao Jiewen --- diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c index bc10e4586a..098dd28dc1 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c @@ -2,6 +2,7 @@ Implement TPM1.2 Startup related command. Copyright (c) 2013, 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 @@ -16,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #pragma pack(1) @@ -59,8 +61,11 @@ Tpm12Startup ( } switch (SwapBytes32(Response.returnCode)) { case TPM_SUCCESS: + DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_SUCCESS\n")); + return EFI_SUCCESS; case TPM_INVALID_POSTINIT: // In warm reset, TPM may response TPM_INVALID_POSTINIT + DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_INVALID_POSTINIT\n")); return EFI_SUCCESS; default: return EFI_DEVICE_ERROR;