]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/SecCore/SecBist.c
UefiCpuPkg: Apply uncrustify changes
[mirror_edk2.git] / UefiCpuPkg / SecCore / SecBist.c
index 440140f5654c6c5e2f4969153d7a173ae08d778d..cd2e34017106436a0b00a087805d796e73a49046 100644 (file)
@@ -8,21 +8,21 @@
 \r
 #include "SecMain.h"\r
 \r
-EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformation = {\r
+EFI_SEC_PLATFORM_INFORMATION_PPI  mSecPlatformInformation = {\r
   SecPlatformInformationBist\r
 };\r
 \r
-EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation = {\r
+EFI_PEI_PPI_DESCRIPTOR  mPeiSecPlatformInformation = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiSecPlatformInformationPpiGuid,\r
   &mSecPlatformInformation\r
 };\r
 \r
-EFI_SEC_PLATFORM_INFORMATION2_PPI mSecPlatformInformation2 = {\r
+EFI_SEC_PLATFORM_INFORMATION2_PPI  mSecPlatformInformation2 = {\r
   SecPlatformInformation2Bist\r
 };\r
 \r
-EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation2 = {\r
+EFI_PEI_PPI_DESCRIPTOR  mPeiSecPlatformInformation2 = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiSecPlatformInformation2PpiGuid,\r
   &mSecPlatformInformation2\r
@@ -40,13 +40,13 @@ EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformInformation2 = {
 **/\r
 EFI_STATUS\r
 GetBistFromHob (\r
-  IN OUT UINT64           *StructureSize,\r
-  IN OUT VOID             *StructureBuffer\r
+  IN OUT UINT64  *StructureSize,\r
+  IN OUT VOID    *StructureBuffer\r
   )\r
 {\r
-  EFI_HOB_GUID_TYPE       *GuidHob;\r
-  VOID                    *DataInHob;\r
-  UINTN                   DataSize;\r
+  EFI_HOB_GUID_TYPE  *GuidHob;\r
+  VOID               *DataInHob;\r
+  UINTN              DataSize;\r
 \r
   GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid);\r
   if (GuidHob == NULL) {\r
@@ -60,12 +60,12 @@ GetBistFromHob (
   //\r
   // return the information from BistHob\r
   //\r
-  if ((*StructureSize) < (UINT64) DataSize) {\r
-    *StructureSize = (UINT64) DataSize;\r
+  if ((*StructureSize) < (UINT64)DataSize) {\r
+    *StructureSize = (UINT64)DataSize;\r
     return EFI_BUFFER_TOO_SMALL;\r
   }\r
 \r
-  *StructureSize = (UINT64) DataSize;\r
+  *StructureSize = (UINT64)DataSize;\r
   CopyMem (StructureBuffer, DataInHob, DataSize);\r
   return EFI_SUCCESS;\r
 }\r
@@ -84,9 +84,9 @@ GetBistFromHob (
 EFI_STATUS\r
 EFIAPI\r
 SecPlatformInformationBist (\r
-  IN CONST EFI_PEI_SERVICES                  **PeiServices,\r
-  IN OUT UINT64                              *StructureSize,\r
-     OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
+  IN CONST EFI_PEI_SERVICES                **PeiServices,\r
+  IN OUT UINT64                            *StructureSize,\r
+  OUT EFI_SEC_PLATFORM_INFORMATION_RECORD  *PlatformInformationRecord\r
   )\r
 {\r
   return GetBistFromHob (StructureSize, PlatformInformationRecord);\r
@@ -107,9 +107,9 @@ SecPlatformInformationBist (
 EFI_STATUS\r
 EFIAPI\r
 SecPlatformInformation2Bist (\r
-  IN CONST EFI_PEI_SERVICES                   **PeiServices,\r
-  IN OUT UINT64                               *StructureSize,\r
-     OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2\r
+  IN CONST EFI_PEI_SERVICES                 **PeiServices,\r
+  IN OUT UINT64                             *StructureSize,\r
+  OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2  *PlatformInformationRecord2\r
   )\r
 {\r
   return GetBistFromHob (StructureSize, PlatformInformationRecord2);\r
@@ -133,11 +133,11 @@ SecPlatformInformation2Bist (
 **/\r
 EFI_STATUS\r
 GetBistInfoFromPpi (\r
-  IN CONST EFI_PEI_SERVICES     **PeiServices,\r
-  IN CONST EFI_GUID             *Guid,\r
-     OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
-     OUT VOID                   **BistInformationData,\r
-     OUT UINT64                 *BistInformationSize OPTIONAL\r
+  IN CONST EFI_PEI_SERVICES   **PeiServices,\r
+  IN CONST EFI_GUID           *Guid,\r
+  OUT EFI_PEI_PPI_DESCRIPTOR  **PpiDescriptor,\r
+  OUT VOID                    **BistInformationData,\r
+  OUT UINT64                  *BistInformationSize OPTIONAL\r
   )\r
 {\r
   EFI_STATUS                            Status;\r
@@ -161,15 +161,15 @@ GetBistInfoFromPpi (
     //\r
     InformationSize         = 0;\r
     SecPlatformInformation2 = NULL;\r
-    Status = SecPlatformInformation2Ppi->PlatformInformation2 (\r
-                                           PeiServices,\r
-                                           &InformationSize,\r
-                                           SecPlatformInformation2\r
-                                           );\r
+    Status                  = SecPlatformInformation2Ppi->PlatformInformation2 (\r
+                                                            PeiServices,\r
+                                                            &InformationSize,\r
+                                                            SecPlatformInformation2\r
+                                                            );\r
     if (Status == EFI_BUFFER_TOO_SMALL) {\r
       Status = PeiServicesAllocatePool (\r
-                 (UINTN) InformationSize,\r
-                 (VOID **) &SecPlatformInformation2\r
+                 (UINTN)InformationSize,\r
+                 (VOID **)&SecPlatformInformation2\r
                  );\r
       if (Status == EFI_SUCCESS) {\r
         //\r
@@ -185,6 +185,7 @@ GetBistInfoFromPpi (
           if (BistInformationSize != NULL) {\r
             *BistInformationSize = InformationSize;\r
           }\r
+\r
           return EFI_SUCCESS;\r
         }\r
       }\r
@@ -203,25 +204,25 @@ RepublishSecPlatformInformationPpi (
   VOID\r
   )\r
 {\r
-  EFI_STATUS                            Status;\r
-  CONST EFI_PEI_SERVICES                **PeiServices;\r
-  UINT64                                BistInformationSize;\r
-  VOID                                  *BistInformationData;\r
-  EFI_PEI_PPI_DESCRIPTOR                *SecInformationDescriptor;\r
+  EFI_STATUS              Status;\r
+  CONST EFI_PEI_SERVICES  **PeiServices;\r
+  UINT64                  BistInformationSize;\r
+  VOID                    *BistInformationData;\r
+  EFI_PEI_PPI_DESCRIPTOR  *SecInformationDescriptor;\r
 \r
   PeiServices = GetPeiServicesTablePointer ();\r
-  Status = GetBistInfoFromPpi (\r
-             PeiServices,\r
-             &gEfiSecPlatformInformation2PpiGuid,\r
-             &SecInformationDescriptor,\r
-             &BistInformationData,\r
-             &BistInformationSize\r
-             );\r
+  Status      = GetBistInfoFromPpi (\r
+                  PeiServices,\r
+                  &gEfiSecPlatformInformation2PpiGuid,\r
+                  &SecInformationDescriptor,\r
+                  &BistInformationData,\r
+                  &BistInformationSize\r
+                  );\r
   if (Status == EFI_SUCCESS) {\r
     BuildGuidDataHob (\r
       &gEfiCallerIdGuid,\r
       BistInformationData,\r
-      (UINTN) BistInformationSize\r
+      (UINTN)BistInformationSize\r
       );\r
     //\r
     // The old SecPlatformInformation2 data is on temporary memory.\r
@@ -232,7 +233,9 @@ RepublishSecPlatformInformationPpi (
                SecInformationDescriptor,\r
                &mPeiSecPlatformInformation2\r
                );\r
-  } if (Status == EFI_NOT_FOUND) {\r
+  }\r
+\r
+  if (Status == EFI_NOT_FOUND) {\r
     Status = GetBistInfoFromPpi (\r
                PeiServices,\r
                &gEfiSecPlatformInformationPpiGuid,\r
@@ -244,7 +247,7 @@ RepublishSecPlatformInformationPpi (
       BuildGuidDataHob (\r
         &gEfiCallerIdGuid,\r
         BistInformationData,\r
-        (UINTN) BistInformationSize\r
+        (UINTN)BistInformationSize\r
         );\r
       //\r
       // The old SecPlatformInformation data is on temporary memory.\r
@@ -260,5 +263,5 @@ RepublishSecPlatformInformationPpi (
     }\r
   }\r
 \r
-  ASSERT_EFI_ERROR(Status);\r
+  ASSERT_EFI_ERROR (Status);\r
 }\r