]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/GenericMemoryTest.h
Update prototype of DxeLoadCore().
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / GenericMemoryTest.h
CommitLineData
1e354c03 1/** @file\r
5f597758 2 This protocol defines the EFI generic memory test interfaces in Dxe phase.\r
88f20127 3\r
1e354c03 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
88f20127 9\r
1e354c03 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
88f20127 12\r
1e354c03 13**/\r
88f20127 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
1e354c03 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
88f20127 46typedef\r
47EFI_STATUS\r
7d839888 48(EFIAPI *EFI_MEMORY_TEST_INIT)(\r
5f597758 49 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
88f20127 50 IN EXTENDMEM_COVERAGE_LEVEL Level,\r
51 OUT BOOLEAN *RequireSoftECCInit\r
52 )\r
1e354c03 53;\r
88f20127 54\r
88f20127 55\r
1e354c03 56/**\r
57 Perform the memory test.\r
88f20127 58\r
1e354c03 59 @param This Protocol instance pointer. \r
60 @param TestedMemorySize Return the tested extended memory size. \r
61 @param TotalMemorySize Return the whole system physical memory size, this \r
62 value may be changed if in some case some error \r
63 DIMMs be disabled. \r
64 @param ErrorOut Any time the memory error occurs, this will be \r
65 TRUE. \r
66 @param IfTestAbort Indicate if the user press "ESC" to skip the memory \r
67 test. \r
88f20127 68\r
1e354c03 69 @retval EFI_SUCCESS One block of memory test ok, the block size is hide \r
70 internally. \r
71 @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have \r
72 already go through. \r
5f597758 73 @retval EFI_DEVICE_ERROR Mis-compare error, and no agent can handle it\r
88f20127 74\r
1e354c03 75**/\r
88f20127 76typedef\r
77EFI_STATUS\r
7d839888 78(EFIAPI *EFI_PERFORM_MEMORY_TEST)(\r
88f20127 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
7d839888 100(EFIAPI *EFI_MEMORY_TEST_FINISHED)(\r
88f20127 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
5f597758
LG
113 @retval EFI_SUCCESS The compatible memory range pass the memory test. \r
114 @retval EFI_INVALID_PARAMETER The compatible memory range must be below 16M.\r
1e354c03 115\r
116**/\r
88f20127 117typedef\r
118EFI_STATUS\r
7d839888 119(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE)(\r
5f597758 120 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
88f20127 121 IN EFI_PHYSICAL_ADDRESS StartAddress,\r
122 IN UINT64 Length\r
123 )\r
88f20127 124;\r
125\r
126struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {\r
127 EFI_MEMORY_TEST_INIT MemoryTestInit;\r
128 EFI_PERFORM_MEMORY_TEST PerformMemoryTest;\r
129 EFI_MEMORY_TEST_FINISHED Finished;\r
130 EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;\r
131};\r
132\r
133extern EFI_GUID gEfiGenericMemTestProtocolGuid;\r
134\r
135#endif\r
136\r