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