]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/NullMemoryTest: Change prototype of ConvertToTestedMemory
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 6 Mar 2018 03:04:27 +0000 (11:04 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 7 Mar 2018 04:36:13 +0000 (12:36 +0800)
The patch should not impact the functionality.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.c

index 11af8ea77fd00f155eb7252acb0b3d652701d206..c66f3fd2080ac6af8b04218fe9d33a18ab87bae9 100644 (file)
@@ -59,37 +59,40 @@ GenericMemoryTestEntryPoint (
 }\r
 \r
 /**\r
-  Convert the memory descriptor to tested.\r
+  Convert the memory range to tested.\r
 \r
-  @param Descriptor  Pointer to EFI_GCD_MEMORY_SPACE_DESCRIPTOR\r
+  @param BaseAddress  Base address of the memory range.\r
+  @param Length       Length of the memory range.\r
+  @param Capabilities Capabilities of the memory range.\r
 \r
-  @retval EFI_SUCCESS The memory descriptor is converted to tested.\r
+  @retval EFI_SUCCESS The memory range is converted to tested.\r
   @retval others      Error happens.\r
 **/\r
 EFI_STATUS\r
 ConvertToTestedMemory (\r
-  IN CONST EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r
+  IN UINT64           BaseAddress,\r
+  IN UINT64           Length,\r
+  IN UINT64           Capabilities\r
   )\r
 {\r
   EFI_STATUS Status;\r
   Status = gDS->RemoveMemorySpace (\r
-                  Descriptor->BaseAddress,\r
-                  Descriptor->Length\r
+                  BaseAddress,\r
+                  Length\r
                   );\r
   if (!EFI_ERROR (Status)) {\r
     Status = gDS->AddMemorySpace (\r
-                    ((Descriptor->Capabilities & EFI_MEMORY_MORE_RELIABLE) == EFI_MEMORY_MORE_RELIABLE) ?\r
+                    ((Capabilities & EFI_MEMORY_MORE_RELIABLE) == EFI_MEMORY_MORE_RELIABLE) ?\r
                     EfiGcdMemoryTypeMoreReliable : EfiGcdMemoryTypeSystemMemory,\r
-                    Descriptor->BaseAddress,\r
-                    Descriptor->Length,\r
-                    Descriptor->Capabilities &~\r
+                    BaseAddress,\r
+                    Length,\r
+                    Capabilities &~\r
                     (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED | EFI_MEMORY_RUNTIME)\r
                     );\r
   }\r
   return Status;\r
 }\r
 \r
-\r
 /**\r
   Initialize the generic memory test.\r
 \r
@@ -129,7 +132,11 @@ InitializeMemoryTest (
       //\r
       // For those reserved memory that have not been tested, simply promote to system memory.\r
       //\r
-      Status = ConvertToTestedMemory (&MemorySpaceMap[Index]);\r
+      Status = ConvertToTestedMemory (\r
+                 MemorySpaceMap[Index].BaseAddress,\r
+                 MemorySpaceMap[Index].Length,\r
+                 MemorySpaceMap[Index].Capabilities\r
+                 );\r
       ASSERT_EFI_ERROR (Status);\r
       mTestedSystemMemory += MemorySpaceMap[Index].Length;\r
       mTotalSystemMemory += MemorySpaceMap[Index].Length;\r
@@ -236,7 +243,11 @@ GenCompatibleRangeTest (
 \r
   Status = gDS->GetMemorySpaceDescriptor (StartAddress, &Descriptor);\r
   if (!EFI_ERROR (Status)) {\r
-    Status = ConvertToTestedMemory (&Descriptor);\r
+    Status = ConvertToTestedMemory (\r
+               Descriptor.BaseAddress,\r
+               Descriptor.Length,\r
+               Descriptor.Capabilities\r
+               );\r
   }\r
   return Status;\r
 }\r