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