]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/BaseMemoryTestLib.h
Check in library class of BaseMemoryTestLib.
[mirror_edk2.git] / MdeModulePkg / Include / Library / BaseMemoryTestLib.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 Test a system memory range with sparsely sampled memory units.
21
22 This function tests a system memory range, whose memory units
23 are sampled sparsely. It leads to quick performance but less
24 reliability.
25
26 @param StartAddress Start address of the memory range to test.
27 @param Length Length of the memory range to test.
28 @param ErrorAddress Address of the memory where error is encountered.
29
30 @retval RETURN_SUCCESS The memory range passes test.
31 @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.
32
33 **/
34 RETURN_STATUS
35 EFIAPI
36 SparseMemoryTest (
37 IN VOID *StartAddress,
38 IN UINT64 Length,
39 OUT VOID **ErrorAddress
40 );
41
42 /**
43 Test a system memory range with extensively sampled memory units.
44
45 This function tests a system memory range, whose memory units
46 are sampled extensively. Compared with SparseMemoryTest, it achieves
47 more reliability and less performance.
48
49 @param StartAddress Start address of the memory range to test.
50 @param Length Length of the memory range to test.
51 @param ErrorAddress Address of the memory where error is encountered.
52
53 @retval RETURN_SUCCESS The memory range passes test.
54 @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.
55
56 **/
57 RETURN_STATUS
58 EFIAPI
59 ExtensiveMemoryTest (
60 IN VOID *StartAddress,
61 IN UINT64 Length,
62 OUT VOID **ErrorAddress
63 );
64
65 /**
66 Test a system memory range with every memory unit checked.
67
68 This function tests a system memory range, whose memory units
69 are fully checked. It leads to complete reliability with the
70 cost of performance.
71
72 @param StartAddress Start address of the memory range to test.
73 @param Length Length of the memory range to test.
74 @param ErrorAddress Address of the memory where error is encountered.
75
76 @retval RETURN_SUCCESS The memory range passes test.
77 @retval RETURNEFI_DEVICE_ERROR The memory range does not pass test.
78
79 **/
80 RETURN_STATUS
81 EFIAPI
82 FullMemoryTest (
83 IN VOID *StartAddress,
84 IN UINT64 Length,
85 OUT VOID **ErrorAddress
86 );
87
88 #endif