]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/MemoryTestLib.h
Update HiiGetBrowserData API
[mirror_edk2.git] / MdeModulePkg / Include / Library / MemoryTestLib.h
CommitLineData
ad801d01 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
40571bfb 20 Perform a quick system memory range test.\r
ad801d01 21\r
40571bfb 22 This function performs a quick system memory range test. It leads to quick performance\r
23 but least reliability.\r
ad801d01 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
b6ee92ec 30 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
ad801d01 31\r
32**/\r
33RETURN_STATUS\r
34EFIAPI\r
b6ee92ec 35QuickMemoryTest (\r
ad801d01 36 IN VOID *StartAddress,\r
37 IN UINT64 Length,\r
38 OUT VOID **ErrorAddress\r
39 );\r
40\r
41/**\r
40571bfb 42 Test a system memory range with sparsely sampled memory units.\r
ad801d01 43\r
44 This function tests a system memory range, whose memory units\r
40571bfb 45 are sampled sparsely. It leads to relatively good performance\r
46 and partial reliability.\r
ad801d01 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
b6ee92ec 53 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
ad801d01 54\r
55**/\r
56RETURN_STATUS\r
57EFIAPI\r
b6ee92ec 58SparseMemoryTest (\r
ad801d01 59 IN VOID *StartAddress,\r
60 IN UINT64 Length,\r
61 OUT VOID **ErrorAddress\r
62 );\r
63\r
64/**\r
b6ee92ec 65 Test a system memory range with extensively sampled memory units.\r
ad801d01 66\r
67 This function tests a system memory range, whose memory units\r
b6ee92ec 68 are sampled extensively. Compared with SparseMemoryTest, it achieves\r
69 more reliability and less performance.\r
ad801d01 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
b6ee92ec 76 @retval RETURN_DEVICE_ERROR The memory range does not pass test.\r
ad801d01 77\r
78**/\r
79RETURN_STATUS\r
80EFIAPI\r
b6ee92ec 81ExtensiveMemoryTest (\r
ad801d01 82 IN VOID *StartAddress,\r
83 IN UINT64 Length,\r
84 OUT VOID **ErrorAddress\r
85 );\r
86\r
b6ee92ec 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
ad801d01 100#endif\r