summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c
diff options
context:
space:
mode:
Diffstat (limited to 'SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c')
-rw-r--r--SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c b/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c
index 9d12695a62..3c8cf4fa11 100644
--- a/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c
+++ b/SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.c
@@ -31,17 +31,17 @@ EFI_TCG2_PROTOCOL *mTcg2Protocol = NULL;
EFI_STATUS
EFIAPI
Tpm2SubmitCommand (
- IN UINT32 InputParameterBlockSize,
- IN UINT8 *InputParameterBlock,
- IN OUT UINT32 *OutputParameterBlockSize,
- IN UINT8 *OutputParameterBlock
+ IN UINT32 InputParameterBlockSize,
+ IN UINT8 *InputParameterBlock,
+ IN OUT UINT32 *OutputParameterBlockSize,
+ IN UINT8 *OutputParameterBlock
)
{
- EFI_STATUS Status;
- TPM2_RESPONSE_HEADER *Header;
+ EFI_STATUS Status;
+ TPM2_RESPONSE_HEADER *Header;
if (mTcg2Protocol == NULL) {
- Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **) &mTcg2Protocol);
+ Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **)&mTcg2Protocol);
if (EFI_ERROR (Status)) {
//
// Tcg2 protocol is not installed. So, TPM2 is not present.
@@ -50,6 +50,7 @@ Tpm2SubmitCommand (
return EFI_NOT_FOUND;
}
}
+
//
// Assume when Tcg2 Protocol is ready, RequestUseTpm already done.
//
@@ -63,7 +64,8 @@ Tpm2SubmitCommand (
if (EFI_ERROR (Status)) {
return Status;
}
- Header = (TPM2_RESPONSE_HEADER *)OutputParameterBlock;
+
+ Header = (TPM2_RESPONSE_HEADER *)OutputParameterBlock;
*OutputParameterBlockSize = SwapBytes32 (Header->paramSize);
return EFI_SUCCESS;
@@ -82,10 +84,10 @@ Tpm2RequestUseTpm (
VOID
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
if (mTcg2Protocol == NULL) {
- Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **) &mTcg2Protocol);
+ Status = gBS->LocateProtocol (&gEfiTcg2ProtocolGuid, NULL, (VOID **)&mTcg2Protocol);
if (EFI_ERROR (Status)) {
//
// Tcg2 protocol is not installed. So, TPM2 is not present.
@@ -94,6 +96,7 @@ Tpm2RequestUseTpm (
return EFI_NOT_FOUND;
}
}
+
//
// Assume when Tcg2 Protocol is ready, RequestUseTpm already done.
//
@@ -112,7 +115,7 @@ Tpm2RequestUseTpm (
EFI_STATUS
EFIAPI
Tpm2RegisterTpm2DeviceLib (
- IN TPM2_DEVICE_INTERFACE *Tpm2Device
+ IN TPM2_DEVICE_INTERFACE *Tpm2Device
)
{
return EFI_UNSUPPORTED;