]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c
SecurityPkg: Apply uncrustify changes
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Config / Tcg2ConfigPeim.c
index 8abc33efd4b0fc16794c939ce98e362acc77ae36..21a01f07e1455d065fd889b69b8489922361617a 100644 (file)
@@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 **/\r
 \r
-\r
 #include <PiPei.h>\r
 \r
 #include <Guid/TpmInstance.h>\r
@@ -27,7 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 TPM_INSTANCE_ID  mTpmInstanceId[] = TPM_INSTANCE_ID_LIST;\r
 \r
-CONST EFI_PEI_PPI_DESCRIPTOR gTpmSelectedPpi = {\r
+CONST EFI_PEI_PPI_DESCRIPTOR  gTpmSelectedPpi = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiTpmDeviceSelectedGuid,\r
   NULL\r
@@ -48,7 +47,7 @@ EFI_PEI_PPI_DESCRIPTOR  mTpmInitializationDonePpiList = {
 **/\r
 UINT8\r
 DetectTpmDevice (\r
-  IN UINT8 SetupTpmDevice\r
+  IN UINT8  SetupTpmDevice\r
   );\r
 \r
 /**\r
@@ -67,18 +66,18 @@ Tcg2ConfigPeimEntryPoint (
   IN CONST EFI_PEI_SERVICES     **PeiServices\r
   )\r
 {\r
-  UINTN                           Size;\r
-  EFI_STATUS                      Status;\r
-  EFI_STATUS                      Status2;\r
-  EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariablePpi;\r
-  TCG2_CONFIGURATION              Tcg2Configuration;\r
-  UINTN                           Index;\r
-  UINT8                           TpmDevice;\r
-\r
-  Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **) &VariablePpi);\r
+  UINTN                            Size;\r
+  EFI_STATUS                       Status;\r
+  EFI_STATUS                       Status2;\r
+  EFI_PEI_READ_ONLY_VARIABLE2_PPI  *VariablePpi;\r
+  TCG2_CONFIGURATION               Tcg2Configuration;\r
+  UINTN                            Index;\r
+  UINT8                            TpmDevice;\r
+\r
+  Status = PeiServicesLocatePpi (&gEfiPeiReadOnlyVariable2PpiGuid, 0, NULL, (VOID **)&VariablePpi);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
-  Size = sizeof(Tcg2Configuration);\r
+  Size   = sizeof (Tcg2Configuration);\r
   Status = VariablePpi->GetVariable (\r
                           VariablePpi,\r
                           TCG2_STORAGE_NAME,\r
@@ -91,7 +90,7 @@ Tcg2ConfigPeimEntryPoint (
     //\r
     // Variable not ready, set default value\r
     //\r
-    Tcg2Configuration.TpmDevice           = TPM_DEVICE_DEFAULT;\r
+    Tcg2Configuration.TpmDevice = TPM_DEVICE_DEFAULT;\r
   }\r
 \r
   //\r
@@ -124,9 +123,9 @@ Tcg2ConfigPeimEntryPoint (
   // NOTE: Tcg2Configuration variable contains the desired TpmDevice type,\r
   // while PcdTpmInstanceGuid PCD contains the real detected TpmDevice type\r
   //\r
-  for (Index = 0; Index < sizeof(mTpmInstanceId)/sizeof(mTpmInstanceId[0]); Index++) {\r
+  for (Index = 0; Index < sizeof (mTpmInstanceId)/sizeof (mTpmInstanceId[0]); Index++) {\r
     if (TpmDevice == mTpmInstanceId[Index].TpmDevice) {\r
-      Size = sizeof(mTpmInstanceId[Index].TpmInstanceGuid);\r
+      Size   = sizeof (mTpmInstanceId[Index].TpmInstanceGuid);\r
       Status = PcdSetPtrS (PcdTpmInstanceGuid, &Size, &mTpmInstanceId[Index].TpmInstanceGuid);\r
       ASSERT_EFI_ERROR (Status);\r
       DEBUG ((DEBUG_INFO, "TpmDevice PCD: %g\n", &mTpmInstanceId[Index].TpmInstanceGuid));\r
@@ -145,7 +144,7 @@ Tcg2ConfigPeimEntryPoint (
   // Because TcgPei or Tcg2Pei will not run, but we still need a way to notify other driver.\r
   // Other driver can know TPM initialization state by TpmInitializedPpi.\r
   //\r
-  if (CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid)) {\r
+  if (CompareGuid (PcdGetPtr (PcdTpmInstanceGuid), &gEfiTpmDeviceInstanceNoneGuid)) {\r
     Status2 = PeiServicesInstallPpi (&mTpmInitializationDonePpiList);\r
     ASSERT_EFI_ERROR (Status2);\r
   }\r