]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/BaseMemoryTestLibNull/BaseMemoryTestLibNull.c
Refine BaseMemoryTestLib and add instance with full functionality.
[mirror_edk2.git] / MdeModulePkg / Library / BaseMemoryTestLibNull / BaseMemoryTestLibNull.c
index 4163e61bb3994a1e37d025f11ed0bb42e0202c3c..e88a22536aeb25fae092e336feb44cf1b9a260c7 100644 (file)
@@ -15,23 +15,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/BaseMemoryTestLib.h>\r
 \r
 /**\r
-  Test a system memory range with sparsely sampled memory units.\r
+  Perform a quick system memory range test.\r
 \r
-  This function tests a system memory range, whose memory units\r
-  are sampled sparsely. It leads to quick performance but less\r
-  reliability.\r
+  This function performs a quick system memory range test. It leads to quick performance\r
+  but least reliability.\r
 \r
   @param  StartAddress           Start address of the memory range to test.\r
   @param  Length                 Length of the memory range to test.\r
   @param  ErrorAddress           Address of the memory where error is encountered.\r
 \r
   @retval RETURN_SUCCESS         The memory range passes test.\r
-  @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.\r
+  @retval RETURN_DEVICE_ERROR    The memory range does not pass test.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
-SparseMemoryTest (\r
+QuickMemoryTest (\r
   IN  VOID      *StartAddress,\r
   IN  UINT64    Length,\r
   OUT VOID      **ErrorAddress\r
@@ -41,23 +40,23 @@ SparseMemoryTest (
 }\r
 \r
 /**\r
-  Test a system memory range with extensively sampled memory units.\r
+  Test a system memory range with sparsely sampled memory units.\r
 \r
   This function tests a system memory range, whose memory units\r
-  are sampled extensively. Compared with SparseMemoryTest, it achieves\r
-  more reliability and less performance.\r
+  are sampled sparsely. It leads to relatively good performance\r
+  and partial reliability.\r
 \r
   @param  StartAddress           Start address of the memory range to test.\r
   @param  Length                 Length of the memory range to test.\r
   @param  ErrorAddress           Address of the memory where error is encountered.\r
 \r
   @retval RETURN_SUCCESS         The memory range passes test.\r
-  @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.\r
+  @retval RETURN_DEVICE_ERROR    The memory range does not pass test.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
-ExtensiveMemoryTest (\r
+SparseMemoryTest (\r
   IN  VOID      *StartAddress,\r
   IN  UINT64    Length,\r
   OUT VOID      **ErrorAddress\r
@@ -67,23 +66,23 @@ ExtensiveMemoryTest (
 }\r
 \r
 /**\r
-  Test a system memory range with every memory unit checked.\r
+  Test a system memory range with extensively sampled memory units.\r
 \r
   This function tests a system memory range, whose memory units\r
-  are fully checked. It leads to complete reliability with the\r
-  cost of performance.\r
+  are sampled extensively. Compared with SparseMemoryTest, it achieves\r
+  more reliability and less performance.\r
 \r
   @param  StartAddress           Start address of the memory range to test.\r
   @param  Length                 Length of the memory range to test.\r
   @param  ErrorAddress           Address of the memory where error is encountered.\r
 \r
   @retval RETURN_SUCCESS         The memory range passes test.\r
-  @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.\r
+  @retval RETURN_DEVICE_ERROR    The memory range does not pass test.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
-FullMemoryTest (\r
+ExtensiveMemoryTest (\r
   IN  VOID      *StartAddress,\r
   IN  UINT64    Length,\r
   OUT VOID      **ErrorAddress\r
@@ -91,3 +90,19 @@ FullMemoryTest (
 {\r
   return RETURN_SUCCESS;\r
 }\r
+\r
+/**\r
+  Check if soft ECC initialzation is needed for system\r
+\r
+  @retval TRUE         Soft ECC initialzation is needed.\r
+  @retval FALSE        Soft ECC initialzation is not needed.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsSoftEccInitRequired (\r
+  VOID\r
+  )\r
+{\r
+  return FALSE;\r
+}\r