]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/PrePi/PrePi.c
SourceLevelDebugPkg DebugCommUsb3: Refine some formats/comments
[mirror_edk2.git] / ArmVirtPkg / PrePi / PrePi.c
index c69cff249e80e4f3cfae16aec65c623f7eebc023..f6abe2f2016bd654726f36d0b4a1ae9c22b89f5e 100755 (executable)
 **/\r
 \r
 #include <PiPei.h>\r
+#include <Pi/PiBootMode.h>\r
 \r
 #include <Library/PrePiLib.h>\r
 #include <Library/PrintLib.h>\r
-#include <Library/PeCoffGetEntryPointLib.h>\r
 #include <Library/PrePiHobListPointerLib.h>\r
 #include <Library/TimerLib.h>\r
 #include <Library/PerformanceLib.h>\r
 \r
 #include <Ppi/GuidedSectionExtraction.h>\r
 #include <Ppi/ArmMpCoreInfo.h>\r
-#include <Guid/LzmaDecompress.h>\r
 \r
 #include "PrePi.h"\r
-#include "LzmaDecompress.h"\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-ExtractGuidedSectionLibConstructor (\r
-  VOID\r
-  );\r
-\r
-EFI_STATUS\r
+VOID\r
 EFIAPI\r
-LzmaDecompressLibConstructor (\r
+ProcessLibraryConstructorList (\r
   VOID\r
   );\r
 \r
-EFI_STATUS\r
-GetPlatformPpi (\r
-  IN  EFI_GUID  *PpiGuid,\r
-  OUT VOID      **Ppi\r
-  )\r
-{\r
-  UINTN                   PpiListSize;\r
-  UINTN                   PpiListCount;\r
-  EFI_PEI_PPI_DESCRIPTOR  *PpiList;\r
-  UINTN                   Index;\r
-\r
-  PpiListSize = 0;\r
-  ArmPlatformGetPlatformPpiList (&PpiListSize, &PpiList);\r
-  PpiListCount = PpiListSize / sizeof(EFI_PEI_PPI_DESCRIPTOR);\r
-  for (Index = 0; Index < PpiListCount; Index++, PpiList++) {\r
-    if (CompareGuid (PpiList->Guid, PpiGuid) == TRUE) {\r
-      *Ppi = PpiList->Ppi;\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
-\r
-  return EFI_NOT_FOUND;\r
-}\r
-\r
 VOID\r
 PrePiMain (\r
   IN  UINTN                     UefiMemoryBase,\r
@@ -115,7 +83,7 @@ PrePiMain (
   BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));\r
 \r
   // Set the Boot Mode\r
-  SetBootMode (ArmPlatformGetBootMode ());\r
+  SetBootMode (BOOT_WITH_FULL_CONFIGURATION);\r
 \r
   // Initialize Platform HOBs (CpuHob and FvHob)\r
   Status = PlatformPeim ();\r
@@ -125,16 +93,7 @@ PrePiMain (
   PERF_START (NULL, "PEI", NULL, StartTimeStamp);\r
 \r
   // SEC phase needs to run library constructors by hand.\r
-  ExtractGuidedSectionLibConstructor ();\r
-  LzmaDecompressLibConstructor ();\r
-\r
-  // Build HOBs to pass up our version of stuff the DXE Core needs to save space\r
-  BuildPeCoffLoaderHob ();\r
-  BuildExtractSectionHob (\r
-    &gLzmaCustomDecompressGuid,\r
-    LzmaGuidedSectionGetInfo,\r
-    LzmaGuidedSectionExtraction\r
-    );\r
+  ProcessLibraryConstructorList ();\r
 \r
   // Assume the FV that contains the SEC (our code) also contains a compressed FV.\r
   Status = DecompressFirstFv ();\r
@@ -154,9 +113,6 @@ CEntryPoint (
 {\r
   UINT64   StartTimeStamp;\r
 \r
-  // Initialize the platform specific controllers\r
-  ArmPlatformInitialize (MpId);\r
-\r
   if (PerformanceMeasurementEnabled ()) {\r
     // Initialize the Timer Library to setup the Timer HW controller\r
     TimerConstructor ();\r