This library is TPM2 TCG2 protocol lib.\r
\r
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
EFI_STATUS\r
EFIAPI\r
Tpm2SubmitCommand (\r
- IN UINT32 InputParameterBlockSize,\r
- IN UINT8 *InputParameterBlock,\r
- IN OUT UINT32 *OutputParameterBlockSize,\r
- IN UINT8 *OutputParameterBlock\r
+ IN UINT32 InputParameterBlockSize,\r
+ IN UINT8 *InputParameterBlock,\r
+ IN OUT UINT32 *OutputParameterBlockSize,\r
+ IN UINT8 *OutputParameterBlock\r
)\r
{\r
- EFI_STATUS Status;\r
- TPM2_RESPONSE_HEADER *Header;\r
+ EFI_STATUS Status;\r
+ TPM2_RESPONSE_HEADER *Header;\r
\r
if (mTcg2Protocol == NULL) {\r
- Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **) &mTcg2Protocol);\r
+ Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **)&mTcg2Protocol);\r
if (EFI_ERROR (Status)) {\r
//\r
// Tcg2 protocol is not installed. So, TPM2 is not present.\r
//\r
- DEBUG ((EFI_D_ERROR, "Tpm2SubmitCommand - Tcg2 - %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Tpm2SubmitCommand - Tcg2 - %r\n", Status));\r
return EFI_NOT_FOUND;\r
}\r
}\r
+\r
//\r
// Assume when Tcg2 Protocol is ready, RequestUseTpm already done.\r
//\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- Header = (TPM2_RESPONSE_HEADER *)OutputParameterBlock;\r
+\r
+ Header = (TPM2_RESPONSE_HEADER *)OutputParameterBlock;\r
*OutputParameterBlockSize = SwapBytes32 (Header->paramSize);\r
\r
return EFI_SUCCESS;\r
VOID\r
)\r
{\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
\r
if (mTcg2Protocol == NULL) {\r
- Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **) &mTcg2Protocol);\r
+ Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **)&mTcg2Protocol);\r
if (EFI_ERROR (Status)) {\r
//\r
// Tcg2 protocol is not installed. So, TPM2 is not present.\r
//\r
- DEBUG ((EFI_D_ERROR, "Tpm2RequestUseTpm - Tcg2 - %r\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "Tpm2RequestUseTpm - Tcg2 - %r\n", Status));\r
return EFI_NOT_FOUND;\r
}\r
}\r
+\r
//\r
// Assume when Tcg2 Protocol is ready, RequestUseTpm already done.\r
//\r
EFI_STATUS\r
EFIAPI\r
Tpm2RegisterTpm2DeviceLib (\r
- IN TPM2_DEVICE_INTERFACE *Tpm2Device\r
+ IN TPM2_DEVICE_INTERFACE *Tpm2Device\r
)\r
{\r
return EFI_UNSUPPORTED;\r