]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/SecMigrationPei/SecMigrationPei.c
UefiCpuPkg: Apply uncrustify changes
[mirror_edk2.git] / UefiCpuPkg / SecMigrationPei / SecMigrationPei.c
index 4813a06f13fd213f909e809bf3dff4ce0ecccecd..363d44b8ff4c42d0fe34e8e37a77681f38e4f272 100644 (file)
 #include "SecMigrationPei.h"\r
 \r
 STATIC REPUBLISH_SEC_PPI_PPI  mEdkiiRepublishSecPpiPpi = {\r
-                                RepublishSecPpis\r
-                                };\r
+  RepublishSecPpis\r
+};\r
 \r
 GLOBAL_REMOVE_IF_UNREFERENCED EFI_SEC_PLATFORM_INFORMATION_PPI  mSecPlatformInformationPostMemoryPpi = {\r
-                                                                  SecPlatformInformationPostMemory\r
-                                                                  };\r
+  SecPlatformInformationPostMemory\r
+};\r
 \r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_TEMPORARY_RAM_DONE_PPI  mSecTemporaryRamDonePostMemoryPpi = {\r
+  SecTemporaryRamDonePostMemory\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_TEMPORARY_RAM_DONE_PPI mSecTemporaryRamDonePostMemoryPpi = {\r
-                                                               SecTemporaryRamDonePostMemory\r
-                                                               };\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI  mSecTemporaryRamSupportPostMemoryPpi = {\r
+  SecTemporaryRamSupportPostMemory\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPostMemoryPpi = {\r
-                                                                  SecTemporaryRamSupportPostMemory\r
-                                                                  };\r
+GLOBAL_REMOVE_IF_UNREFERENCED PEI_SEC_PERFORMANCE_PPI  mSecPerformancePpi = {\r
+  GetPerformancePostMemory\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED PEI_SEC_PERFORMANCE_PPI mSecPerformancePpi = {\r
-                                                        GetPerformancePostMemory\r
-                                                        };\r
-\r
-STATIC EFI_PEI_PPI_DESCRIPTOR mEdkiiRepublishSecPpiDescriptor = {\r
+STATIC EFI_PEI_PPI_DESCRIPTOR  mEdkiiRepublishSecPpiDescriptor = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gRepublishSecPpiPpiGuid,\r
   &mEdkiiRepublishSecPpiPpi\r
-  };\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mSecPlatformInformationPostMemoryDescriptor = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mSecPlatformInformationPostMemoryDescriptor = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiSecPlatformInformationPpiGuid,\r
   &mSecPlatformInformationPostMemoryPpi\r
-  };\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mSecTemporaryRamDonePostMemoryDescriptor = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mSecTemporaryRamDonePostMemoryDescriptor = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiTemporaryRamDonePpiGuid,\r
   &mSecTemporaryRamDonePostMemoryPpi\r
-  };\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mSecTemporaryRamSupportPostMemoryDescriptor = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mSecTemporaryRamSupportPostMemoryDescriptor = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gEfiTemporaryRamSupportPpiGuid,\r
   &mSecTemporaryRamSupportPostMemoryPpi\r
-  };\r
+};\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR mSecPerformancePpiDescriptor = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mSecPerformancePpiDescriptor = {\r
   (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
   &gPeiSecPerformancePpiGuid,\r
   &mSecPerformancePpi\r
-  };\r
+};\r
 \r
 /**\r
   Disables the use of Temporary RAM.\r
@@ -110,10 +109,10 @@ SecTemporaryRamDonePostMemory (
 EFI_STATUS\r
 EFIAPI\r
 SecTemporaryRamSupportPostMemory (\r
-  IN CONST EFI_PEI_SERVICES   **PeiServices,\r
-  IN EFI_PHYSICAL_ADDRESS     TemporaryMemoryBase,\r
-  IN EFI_PHYSICAL_ADDRESS     PermanentMemoryBase,\r
-  IN UINTN                    CopySize\r
+  IN CONST EFI_PEI_SERVICES  **PeiServices,\r
+  IN EFI_PHYSICAL_ADDRESS    TemporaryMemoryBase,\r
+  IN EFI_PHYSICAL_ADDRESS    PermanentMemoryBase,\r
+  IN UINTN                   CopySize\r
   )\r
 {\r
   //\r
@@ -151,7 +150,7 @@ GetPerformancePostMemory (
 {\r
   SEC_PLATFORM_INFORMATION_CONTEXT_HOB  *SecPlatformInformationContexHob;\r
 \r
-  if (This == NULL || Performance == NULL) {\r
+  if ((This == NULL) || (Performance == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -182,9 +181,9 @@ GetPerformancePostMemory (
 EFI_STATUS\r
 EFIAPI\r
 SecPlatformInformationPostMemory (\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
   SEC_PLATFORM_INFORMATION_CONTEXT_HOB  *SecPlatformInformationContexHob;\r
@@ -209,9 +208,9 @@ SecPlatformInformationPostMemory (
 \r
   *StructureSize = SecPlatformInformationContexHob->Context.StructureSize;\r
   CopyMem (\r
-    (VOID *) PlatformInformationRecord,\r
-    (VOID *) SecPlatformInformationContexHob->Context.PlatformInformationRecord,\r
-    (UINTN) SecPlatformInformationContexHob->Context.StructureSize\r
+    (VOID *)PlatformInformationRecord,\r
+    (VOID *)SecPlatformInformationContexHob->Context.PlatformInformationRecord,\r
+    (UINTN)SecPlatformInformationContexHob->Context.StructureSize\r
     );\r
 \r
   return EFI_SUCCESS;\r
@@ -241,13 +240,13 @@ RepublishSecPpis (
   UINT64                                SecStructureSize;\r
 \r
   SecPlatformInformationPtr = NULL;\r
-  SecStructureSize = 0;\r
+  SecStructureSize          = 0;\r
 \r
   Status = PeiServicesLocatePpi (\r
              &gEfiTemporaryRamDonePpiGuid,\r
              0,\r
              &PeiPpiDescriptor,\r
-             (VOID **) &PeiPpi\r
+             (VOID **)&PeiPpi\r
              );\r
   if (!EFI_ERROR (Status)) {\r
     Status = PeiServicesReInstallPpi (\r
@@ -261,7 +260,7 @@ RepublishSecPpis (
              &gEfiTemporaryRamSupportPpiGuid,\r
              0,\r
              &PeiPpiDescriptor,\r
-             (VOID **) &PeiPpi\r
+             (VOID **)&PeiPpi\r
              );\r
   if (!EFI_ERROR (Status)) {\r
     Status = PeiServicesReInstallPpi (\r
@@ -274,7 +273,7 @@ RepublishSecPpis (
   Status = PeiServicesCreateHob (\r
              EFI_HOB_TYPE_GUID_EXTENSION,\r
              sizeof (SEC_PLATFORM_INFORMATION_CONTEXT_HOB),\r
-             (VOID **) &SecPlatformInformationContextHob\r
+             (VOID **)&SecPlatformInformationContextHob\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
   if (EFI_ERROR (Status)) {\r
@@ -289,14 +288,14 @@ RepublishSecPpis (
              &gPeiSecPerformancePpiGuid,\r
              0,\r
              &PeiPpiDescriptor,\r
-             (VOID **) &PeiPpi\r
+             (VOID **)&PeiPpi\r
              );\r
   if (!EFI_ERROR (Status)) {\r
-    Status = ((PEI_SEC_PERFORMANCE_PPI *) PeiPpi)->GetPerformance (\r
-                                                     GetPeiServicesTablePointer (),\r
-                                                     (PEI_SEC_PERFORMANCE_PPI *) PeiPpi,\r
-                                                     &SecPlatformInformationContextHob->FirmwareSecPerformance\r
-                                                     );\r
+    Status = ((PEI_SEC_PERFORMANCE_PPI *)PeiPpi)->GetPerformance (\r
+                                                    GetPeiServicesTablePointer (),\r
+                                                    (PEI_SEC_PERFORMANCE_PPI *)PeiPpi,\r
+                                                    &SecPlatformInformationContextHob->FirmwareSecPerformance\r
+                                                    );\r
     ASSERT_EFI_ERROR (Status);\r
     if (!EFI_ERROR (Status)) {\r
       Status = PeiServicesReInstallPpi (\r
@@ -311,32 +310,33 @@ RepublishSecPpis (
              &gEfiSecPlatformInformationPpiGuid,\r
              0,\r
              &PeiPpiDescriptor,\r
-             (VOID **) &PeiPpi\r
+             (VOID **)&PeiPpi\r
              );\r
   if (!EFI_ERROR (Status)) {\r
-    Status = ((EFI_SEC_PLATFORM_INFORMATION_PPI *) PeiPpi)->PlatformInformation (\r
-                                                              GetPeiServicesTablePointer (),\r
-                                                              &SecStructureSize,\r
-                                                              SecPlatformInformationPtr\r
-                                                              );\r
+    Status = ((EFI_SEC_PLATFORM_INFORMATION_PPI *)PeiPpi)->PlatformInformation (\r
+                                                             GetPeiServicesTablePointer (),\r
+                                                             &SecStructureSize,\r
+                                                             SecPlatformInformationPtr\r
+                                                             );\r
     ASSERT (Status == EFI_BUFFER_TOO_SMALL);\r
     if (Status != EFI_BUFFER_TOO_SMALL) {\r
       return EFI_NOT_FOUND;\r
     }\r
 \r
-    ZeroMem ((VOID *) &(SecPlatformInformationContextHob->Context), sizeof (SEC_PLATFORM_INFORMATION_CONTEXT));\r
-    SecPlatformInformationContextHob->Context.PlatformInformationRecord = AllocatePool ((UINTN) SecStructureSize);\r
+    ZeroMem ((VOID *)&(SecPlatformInformationContextHob->Context), sizeof (SEC_PLATFORM_INFORMATION_CONTEXT));\r
+    SecPlatformInformationContextHob->Context.PlatformInformationRecord = AllocatePool ((UINTN)SecStructureSize);\r
     ASSERT (SecPlatformInformationContextHob->Context.PlatformInformationRecord != NULL);\r
     if (SecPlatformInformationContextHob->Context.PlatformInformationRecord == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
+\r
     SecPlatformInformationContextHob->Context.StructureSize = SecStructureSize;\r
 \r
-    Status = ((EFI_SEC_PLATFORM_INFORMATION_PPI *) PeiPpi)->PlatformInformation (\r
-                                                              GetPeiServicesTablePointer (),\r
-                                                              &(SecPlatformInformationContextHob->Context.StructureSize),\r
-                                                              SecPlatformInformationContextHob->Context.PlatformInformationRecord\r
-                                                              );\r
+    Status = ((EFI_SEC_PLATFORM_INFORMATION_PPI *)PeiPpi)->PlatformInformation (\r
+                                                             GetPeiServicesTablePointer (),\r
+                                                             &(SecPlatformInformationContextHob->Context.StructureSize),\r
+                                                             SecPlatformInformationContextHob->Context.PlatformInformationRecord\r
+                                                             );\r
     ASSERT_EFI_ERROR (Status);\r
     if (!EFI_ERROR (Status)) {\r
       Status = PeiServicesReInstallPpi (\r