]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Include/Library/MemoryTestLib.h
HII Library Class interface refine.
[mirror_edk2.git] / MdeModulePkg / Include / Library / MemoryTestLib.h
... / ...
CommitLineData
1/** @file\r
2 Library class to provide APIs for system memory test.\r
3 \r
4Copyright (c) 2009, Intel Corporation.<BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _MEMORY_TEST_LIB_H_\r
16#define _MEMORY_TEST_LIB_H_\r
17\r
18\r
19/**\r
20 Perform a quick system memory range test.\r
21\r
22 This function performs a quick system memory range test. It leads to quick performance\r
23 but least reliability.\r
24\r
25 @param StartAddress Start address of the memory range to test.\r
26 @param Length Length of the memory range to test.\r
27 @param ErrorAddress Address of the memory where error is encountered.\r
28\r
29 @retval RETURN_SUCCESS The memory range passes test.\r
30 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
31\r
32**/\r
33RETURN_STATUS\r
34EFIAPI\r
35QuickMemoryTest (\r
36 IN VOID *StartAddress,\r
37 IN UINT64 Length,\r
38 OUT VOID **ErrorAddress\r
39 );\r
40\r
41/**\r
42 Test a system memory range with sparsely sampled memory units.\r
43\r
44 This function tests a system memory range, whose memory units\r
45 are sampled sparsely. It leads to relatively good performance\r
46 and partial reliability.\r
47\r
48 @param StartAddress Start address of the memory range to test.\r
49 @param Length Length of the memory range to test.\r
50 @param ErrorAddress Address of the memory where error is encountered.\r
51\r
52 @retval RETURN_SUCCESS The memory range passes test.\r
53 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
54\r
55**/\r
56RETURN_STATUS\r
57EFIAPI\r
58SparseMemoryTest (\r
59 IN VOID *StartAddress,\r
60 IN UINT64 Length,\r
61 OUT VOID **ErrorAddress\r
62 );\r
63\r
64/**\r
65 Test a system memory range with extensively sampled memory units.\r
66\r
67 This function tests a system memory range, whose memory units\r
68 are sampled extensively. Compared with SparseMemoryTest, it achieves\r
69 more reliability and less performance.\r
70\r
71 @param StartAddress Start address of the memory range to test.\r
72 @param Length Length of the memory range to test.\r
73 @param ErrorAddress Address of the memory where error is encountered.\r
74\r
75 @retval RETURN_SUCCESS The memory range passes test.\r
76 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
77\r
78**/\r
79RETURN_STATUS\r
80EFIAPI\r
81ExtensiveMemoryTest (\r
82 IN VOID *StartAddress,\r
83 IN UINT64 Length,\r
84 OUT VOID **ErrorAddress\r
85 );\r
86\r
87/**\r
88 Check if soft ECC initialzation is needed for system\r
89\r
90 @retval TRUE Soft ECC initialzation is needed.\r
91 @retval FALSE Soft ECC initialzation is not needed.\r
92\r
93**/\r
94BOOLEAN\r
95EFIAPI\r
96IsSoftEccInitRequired (\r
97 VOID\r
98 );\r
99\r
100#endif\r