]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/PrePi/PrePi.c
ArmVirtPkg/PrePi: base GCD memory space size on CPU's PA range
[mirror_edk2.git] / ArmVirtPkg / PrePi / PrePi.c
index c4fa979c43efa3afb08a2d2150f98a16ea7732cc..61de6cfd4ae676ec95b273c85b65b151679d6ae4 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
 VOID\r
 EFIAPI\r
@@ -82,10 +80,10 @@ PrePiMain (
   BuildStackHob (StacksBase, StacksSize);\r
 \r
   //TODO: Call CpuPei as a library\r
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));\r
+  BuildCpuHob (ArmGetPhysicalAddressBits (), 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
@@ -97,14 +95,6 @@ PrePiMain (
   // SEC phase needs to run library constructors by hand.\r
   ProcessLibraryConstructorList ();\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
-\r
   // Assume the FV that contains the SEC (our code) also contains a compressed FV.\r
   Status = DecompressFirstFv ();\r
   ASSERT_EFI_ERROR (Status);\r
@@ -123,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