]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/GenericMemoryTest.h
modify coding style to pass ecc tool and provide comments that complied with Doxgen.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / GenericMemoryTest.h
CommitLineData
1e354c03 1/** @file\r
2 The EFI generic memory test protocol interface.\r
3 For more information please look at EfiMemoryTest.doc\r
88f20127 4\r
1e354c03 5Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
88f20127 10\r
1e354c03 11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
88f20127 13\r
1e354c03 14**/\r
88f20127 15\r
16#ifndef __GENERIC_MEMORY_TEST_H__\r
17#define __GENERIC_MEMORY_TEST_H__\r
18\r
19#define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \\r
20 { 0x309de7f1, 0x7f5e, 0x4ace, {0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef} }\r
21\r
22typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL;\r
23\r
24typedef enum {\r
25 IGNORE,\r
26 QUICK,\r
27 SPARSE,\r
28 EXTENSIVE,\r
29 MAXLEVEL\r
30} EXTENDMEM_COVERAGE_LEVEL;\r
31\r
1e354c03 32\r
33/**\r
34 Initialize the generic memory test.\r
35\r
36 @param This Protocol instance pointer. \r
37 @param Level The coverage level of the memory test. \r
38 @param RequireSoftECCInit Indicate if the memory need software ECC init. \r
39\r
40 @retval EFI_SUCCESS The generic memory test initialized correctly. \r
41 @retval EFI_NO_MEDIA There is not any non-tested memory found, in this \r
42 function if not any non-tesed memory found means \r
43 that the memory test driver have not detect any \r
44 non-tested extended memory of current system. \r
45\r
46**/\r
88f20127 47typedef\r
48EFI_STATUS\r
49(EFIAPI *EFI_MEMORY_TEST_INIT) (\r
50 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
51 IN EXTENDMEM_COVERAGE_LEVEL Level,\r
52 OUT BOOLEAN *RequireSoftECCInit\r
53 )\r
1e354c03 54;\r
88f20127 55\r
88f20127 56\r
1e354c03 57/**\r
58 Perform the memory test.\r
88f20127 59\r
1e354c03 60 @param This Protocol instance pointer. \r
61 @param TestedMemorySize Return the tested extended memory size. \r
62 @param TotalMemorySize Return the whole system physical memory size, this \r
63 value may be changed if in some case some error \r
64 DIMMs be disabled. \r
65 @param ErrorOut Any time the memory error occurs, this will be \r
66 TRUE. \r
67 @param IfTestAbort Indicate if the user press "ESC" to skip the memory \r
68 test. \r
88f20127 69\r
1e354c03 70 @retval EFI_SUCCESS One block of memory test ok, the block size is hide \r
71 internally. \r
72 @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have \r
73 already go through. \r
88f20127 74\r
1e354c03 75**/\r
88f20127 76typedef\r
77EFI_STATUS\r
78(EFIAPI *EFI_PERFORM_MEMORY_TEST) (\r
79 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
80 OUT UINT64 *TestedMemorySize,\r
81 OUT UINT64 *TotalMemorySize,\r
82 OUT BOOLEAN *ErrorOut,\r
83 IN BOOLEAN IfTestAbort\r
84 )\r
88f20127 85;\r
86\r
1e354c03 87\r
88/**\r
89 The memory test finished.\r
90\r
91 @param This Protocol instance pointer. \r
92\r
93 @retval EFI_SUCCESS Successful free all the generic memory test driver \r
94 allocated resource and notify to platform memory \r
95 test driver that memory test finished. \r
96\r
97**/\r
88f20127 98typedef\r
99EFI_STATUS\r
100(EFIAPI *EFI_MEMORY_TEST_FINISHED) (\r
101 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This\r
102 )\r
1e354c03 103;\r
88f20127 104\r
1e354c03 105/**\r
106 Provide capability to test compatible range which used by some sepcial\r
107 driver required using memory range before BDS perform memory test.\r
88f20127 108\r
1e354c03 109 @param This Protocol instance pointer. \r
110 @param StartAddress The start address of the memory range. \r
111 @param Length The memory range's length. \r
88f20127 112 \r
1e354c03 113 @retval EFI_SUCCESS The compatible memory range pass the memory test. \r
114 @retval EFI_DEVICE_ERROR The compatible memory range test find memory error \r
115 and also return return the error address. \r
116\r
117**/\r
88f20127 118typedef\r
119EFI_STATUS\r
120(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE) (\r
121 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
122 IN EFI_PHYSICAL_ADDRESS StartAddress,\r
123 IN UINT64 Length\r
124 )\r
88f20127 125;\r
126\r
127struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {\r
128 EFI_MEMORY_TEST_INIT MemoryTestInit;\r
129 EFI_PERFORM_MEMORY_TEST PerformMemoryTest;\r
130 EFI_MEMORY_TEST_FINISHED Finished;\r
131 EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;\r
132};\r
133\r
134extern EFI_GUID gEfiGenericMemTestProtocolGuid;\r
135\r
136#endif\r
137\r