]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg: Fix comments and improve E820 debug output
authorRebecca Cran via Groups.Io <rebecca=bluestop.org@groups.io>
Thu, 4 Apr 2019 17:56:16 +0000 (01:56 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 11 Apr 2019 00:29:10 +0000 (08:29 +0800)
Fix a few typos in LegacyBiosBuildE820, and improve the debug output of
the E820 table to pad with zeros instead of spaces, remove extra hyphens
and display the memory type in decimal.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Rebecca Cran <rebecca@bluestop.org>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c

index 8e54bf7e71f2717e79a55ae38a36d4b2c7d0ff4e..211750c0123b936a38b9895efaa0a156118b0838 100644 (file)
@@ -1704,9 +1704,9 @@ LegacyBiosBuildE820 (
 \r
   do {\r
     //\r
-    // Use size returned back plus 1 descriptor for the AllocatePool.\r
+    // Use size returned for the AllocatePool.\r
     // We don't just multiply by 2 since the "for" loop below terminates on\r
-    // EfiMemoryMapEnd which is dependent upon EfiMemoryMapSize. Otherwize\r
+    // EfiMemoryMapEnd which is dependent upon EfiMemoryMapSize. Otherwise\r
     // we process bogus entries and create bogus E820 entries.\r
     //\r
     EfiMemoryMap = (EFI_MEMORY_DESCRIPTOR *) AllocatePool (EfiMemoryMapSize);\r
@@ -1794,7 +1794,7 @@ LegacyBiosBuildE820 (
     MemoryBlockLength = (UINT64) (LShiftU64 (EfiEntry->NumberOfPages, 12));\r
     if ((EfiEntry->PhysicalStart + MemoryBlockLength) < 0x100000) {\r
       //\r
-      // Skip the memory block is under 1MB\r
+      // Skip the memory block if under 1MB\r
       //\r
     } else {\r
       if (EfiEntry->PhysicalStart < 0x100000) {\r
@@ -1919,7 +1919,7 @@ LegacyBiosBuildE820 (
   *Size = (UINTN) (Index * sizeof (EFI_E820_ENTRY64));\r
 \r
   //\r
-  // Determine OS usable memory above 1Mb\r
+  // Determine OS usable memory above 1MB\r
   //\r
   Private->IntThunk->EfiToLegacy16BootTable.OsMemoryAbove1Mb = 0x0000;\r
   for (TempIndex = Above1MIndex; TempIndex < Index; TempIndex++) {\r
@@ -1941,7 +1941,7 @@ LegacyBiosBuildE820 (
   // Print DEBUG information\r
   //\r
   for (TempIndex = 0; TempIndex < Index; TempIndex++) {\r
-    DEBUG((EFI_D_INFO, "E820[%2d]: 0x%16lx ---- 0x%16lx, Type = 0x%x \n",\r
+    DEBUG((EFI_D_INFO, "E820[%2d]: 0x%016lx - 0x%016lx, Type = %d\n",\r
       TempIndex,\r
       E820Table[TempIndex].BaseAddr,\r
       (E820Table[TempIndex].BaseAddr + E820Table[TempIndex].Length),\r