]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePeiCore/PrePeiCore.c
ArmPlatformPkg: Code cleaning
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / PrePeiCore.c
index f76a1b191fe5c53a756c0d123d4429d3465af2c0..56186471fa2f31a5822acf89090260bb6abc34a1 100644 (file)
 *\r
 **/\r
 \r
-#include <PiPei.h>\r
-#include <Ppi/TemporaryRamSupport.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/IoLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
+#include <Library/PrintLib.h>\r
 #include <Library/ArmLib.h>\r
+#include <Library/SerialPortLib.h>\r
 #include <Chipset/ArmV7.h>\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-SecTemporaryRamSupport (\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
-VOID\r
-SecSwitchStack (\r
-  INTN    StackDelta\r
-  );\r
+#include "PrePeiCore.h"\r
 \r
 EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI   mSecTemporaryRamSupportPpi = {SecTemporaryRamSupport};\r
 \r
@@ -47,10 +35,6 @@ EFI_PEI_PPI_DESCRIPTOR      gSecPpiTable[] = {
   }\r
 };\r
 \r
-// Vector Table for Pei Phase\r
-VOID  PeiVectorTable (VOID);\r
-\r
-\r
 VOID\r
 CEntryPoint (\r
   IN  UINTN                     CoreId,\r
@@ -64,8 +48,8 @@ CEntryPoint (
   ArmInvalidateInstructionCache();\r
 \r
   // Enable Instruction & Data caches\r
-  ArmEnableDataCache();\r
-  ArmEnableInstructionCache();\r
+  ArmEnableDataCache ();\r
+  ArmEnableInstructionCache ();\r
 \r
   //\r
   // Note: Doesn't have to Enable CPU interface in non-secure world,\r
@@ -81,9 +65,9 @@ CEntryPoint (
   //If not primary Jump to Secondary Main\r
   if(0 == CoreId) {\r
     //Goto primary Main.\r
-    primary_main(PeiCoreEntryPoint);\r
+    PrimaryMain (PeiCoreEntryPoint);\r
   } else {\r
-    secondary_main(CoreId);\r
+    SecondaryMain (CoreId);\r
   }\r
 \r
   // PEI Core should always load and never return\r
@@ -101,7 +85,7 @@ SecTemporaryRamSupport (
 {\r
   //\r
   // Migrate the whole temporary memory to permenent memory.\r
-  // \r
+  //\r
   CopyMem (\r
     (VOID*)(UINTN)PermanentMemoryBase, \r
     (VOID*)(UINTN)TemporaryMemoryBase, \r