]>
Commit | Line | Data |
---|---|---|
ad801d01 | 1 | /** @file\r |
2 | Library class to provide APIs for system memory test.\r | |
3 | \r | |
4 | Copyright (c) 2009, Intel Corporation.<BR>\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT 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 | |
33 | RETURN_STATUS\r | |
34 | EFIAPI\r | |
b6ee92ec | 35 | QuickMemoryTest (\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 | |
56 | RETURN_STATUS\r | |
57 | EFIAPI\r | |
b6ee92ec | 58 | SparseMemoryTest (\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 | |
79 | RETURN_STATUS\r | |
80 | EFIAPI\r | |
b6ee92ec | 81 | ExtensiveMemoryTest (\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 | |
94 | BOOLEAN\r | |
95 | EFIAPI\r | |
96 | IsSoftEccInitRequired (\r | |
97 | VOID\r | |
98 | );\r | |
99 | \r | |
ad801d01 | 100 | #endif\r |