]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Include/Protocol/GenericMemoryTest.h
clean up the un-suitable ';' location when declaring the functions.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / GenericMemoryTest.h
... / ...
CommitLineData
1/** @file\r
2 This protocol defines the EFI generic memory test interfaces in Dxe phase.\r
3\r
4Copyright (c) 2006 - 2008, 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 __GENERIC_MEMORY_TEST_H__\r
16#define __GENERIC_MEMORY_TEST_H__\r
17\r
18#define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \\r
19 { 0x309de7f1, 0x7f5e, 0x4ace, {0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef} }\r
20\r
21typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL;\r
22\r
23typedef enum {\r
24 IGNORE,\r
25 QUICK,\r
26 SPARSE,\r
27 EXTENSIVE,\r
28 MAXLEVEL\r
29} EXTENDMEM_COVERAGE_LEVEL;\r
30\r
31\r
32/**\r
33 Initialize the generic memory test.\r
34\r
35 @param This Protocol instance pointer. \r
36 @param Level The coverage level of the memory test. \r
37 @param RequireSoftECCInit Indicate if the memory need software ECC init. \r
38\r
39 @retval EFI_SUCCESS The generic memory test initialized correctly. \r
40 @retval EFI_NO_MEDIA There is not any non-tested memory found, in this \r
41 function if not any non-tesed memory found means \r
42 that the memory test driver have not detect any \r
43 non-tested extended memory of current system. \r
44\r
45**/\r
46typedef\r
47EFI_STATUS\r
48(EFIAPI *EFI_MEMORY_TEST_INIT)(\r
49 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
50 IN EXTENDMEM_COVERAGE_LEVEL Level,\r
51 OUT BOOLEAN *RequireSoftECCInit\r
52 );\r
53\r
54\r
55/**\r
56 Perform the memory test.\r
57\r
58 @param This Protocol instance pointer. \r
59 @param TestedMemorySize Return the tested extended memory size. \r
60 @param TotalMemorySize Return the whole system physical memory size, this \r
61 value may be changed if in some case some error \r
62 DIMMs be disabled. \r
63 @param ErrorOut Any time the memory error occurs, this will be \r
64 TRUE. \r
65 @param IfTestAbort Indicate if the user press "ESC" to skip the memory \r
66 test. \r
67\r
68 @retval EFI_SUCCESS One block of memory test ok, the block size is hide \r
69 internally. \r
70 @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have \r
71 already go through. \r
72 @retval EFI_DEVICE_ERROR Mis-compare error, and no agent can handle it\r
73\r
74**/\r
75typedef\r
76EFI_STATUS\r
77(EFIAPI *EFI_PERFORM_MEMORY_TEST)(\r
78 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
79 OUT UINT64 *TestedMemorySize,\r
80 OUT UINT64 *TotalMemorySize,\r
81 OUT BOOLEAN *ErrorOut,\r
82 IN BOOLEAN IfTestAbort\r
83 );\r
84\r
85\r
86/**\r
87 The memory test finished.\r
88\r
89 @param This Protocol instance pointer. \r
90\r
91 @retval EFI_SUCCESS Successful free all the generic memory test driver \r
92 allocated resource and notify to platform memory \r
93 test driver that memory test finished. \r
94\r
95**/\r
96typedef\r
97EFI_STATUS\r
98(EFIAPI *EFI_MEMORY_TEST_FINISHED)(\r
99 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This\r
100 );\r
101\r
102/**\r
103 Provide capability to test compatible range which used by some sepcial\r
104 driver required using memory range before BDS perform memory test.\r
105\r
106 @param This Protocol instance pointer. \r
107 @param StartAddress The start address of the memory range. \r
108 @param Length The memory range's length. \r
109 \r
110 @retval EFI_SUCCESS The compatible memory range pass the memory test. \r
111 @retval EFI_INVALID_PARAMETER The compatible memory range must be below 16M.\r
112\r
113**/\r
114typedef\r
115EFI_STATUS\r
116(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE)(\r
117 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
118 IN EFI_PHYSICAL_ADDRESS StartAddress,\r
119 IN UINT64 Length\r
120 );\r
121\r
122struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {\r
123 EFI_MEMORY_TEST_INIT MemoryTestInit;\r
124 EFI_PERFORM_MEMORY_TEST PerformMemoryTest;\r
125 EFI_MEMORY_TEST_FINISHED Finished;\r
126 EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;\r
127};\r
128\r
129extern EFI_GUID gEfiGenericMemTestProtocolGuid;\r
130\r
131#endif\r
132\r