]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/MemoryInitPei/MemoryInit.c
ArmPlatformPkg: Code cleaning
[mirror_edk2.git] / ArmPlatformPkg / MemoryInitPei / MemoryInit.c
index e616c075e1804d331e2f0e00628da4e2a2d6d714..4b31de96b1fafcd09d8ad07b27a3bfe36d0f2263 100644 (file)
@@ -16,6 +16,7 @@
 // The package level header files this module uses\r
 //\r
 #include <PiPei.h>\r
+\r
 //\r
 // The protocols, PPI and GUID defintions for this module\r
 //\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/ArmPlatformLib.h>\r
 \r
-//\r
-// Module globals\r
-//\r
-\r
 VOID\r
 InitMmu (\r
   VOID\r
   )\r
 {\r
-    ARM_MEMORY_REGION_DESCRIPTOR  *MemoryTable;\r
-    VOID                          *TranslationTableBase;\r
-    UINTN                         TranslationTableSize;\r
+  ARM_MEMORY_REGION_DESCRIPTOR  *MemoryTable;\r
+  VOID                          *TranslationTableBase;\r
+  UINTN                         TranslationTableSize;\r
 \r
-    // Get Virtual Memory Map from the Platform Library\r
-    ArmPlatformGetVirtualMemoryMap(&MemoryTable);\r
+  // Get Virtual Memory Map from the Platform Library\r
+  ArmPlatformGetVirtualMemoryMap(&MemoryTable);\r
 \r
-    //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in\r
-    //      DRAM (even at the top of DRAM as it is the first permanent memory allocation)\r
-    ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
+  //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in\r
+  //      DRAM (even at the top of DRAM as it is the first permanent memory allocation)\r
+  ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
 }\r
 \r
-// May want to put this into a library so you only need the PCD setings if you are using the feature?\r
+// May want to put this into a library so you only need the PCD settings if you are using the feature?\r
 VOID\r
 BuildMemoryTypeInformationHob (\r
   VOID\r
@@ -87,10 +84,8 @@ BuildMemoryTypeInformationHob (
   Info[9].Type          = EfiMaxMemoryType;\r
   Info[9].NumberOfPages = 0;\r
 \r
-\r
   BuildGuidDataHob (&gEfiMemoryTypeInformationGuid, &Info, sizeof (Info));\r
 }\r
-\r
 /*++\r
 \r
 Routine Description:\r
@@ -234,7 +229,7 @@ InitializeMemory (
   InitMmu ();\r
 \r
   if (FeaturePcdGet (PcdPrePiProduceMemoryTypeInformationHob)) {\r
-    // Optional feature that helps prevent EFI memory map fragmentation. \r
+    // Optional feature that helps prevent EFI memory map fragmentation.\r
     BuildMemoryTypeInformationHob ();\r
   }\r
 \r