mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
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 <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>
This commit is contained in:
parent
148bd4e362
commit
f060d160ea
@ -2,6 +2,7 @@
|
|||||||
Implement TPM1.2 Startup related command.
|
Implement TPM1.2 Startup related command.
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>
|
||||||
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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 <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/Tpm12DeviceLib.h>
|
#include <Library/Tpm12DeviceLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
@ -59,8 +61,11 @@ Tpm12Startup (
|
|||||||
}
|
}
|
||||||
switch (SwapBytes32(Response.returnCode)) {
|
switch (SwapBytes32(Response.returnCode)) {
|
||||||
case TPM_SUCCESS:
|
case TPM_SUCCESS:
|
||||||
|
DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_SUCCESS\n"));
|
||||||
|
return EFI_SUCCESS;
|
||||||
case TPM_INVALID_POSTINIT:
|
case TPM_INVALID_POSTINIT:
|
||||||
// In warm reset, TPM may response TPM_INVALID_POSTINIT
|
// In warm reset, TPM may response TPM_INVALID_POSTINIT
|
||||||
|
DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_INVALID_POSTINIT\n"));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
default:
|
default:
|
||||||
return EFI_DEVICE_ERROR;
|
return EFI_DEVICE_ERROR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user