]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This protocol defines the generic memory test interfaces in Dxe phase.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials are licensed and made available under \r | |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT 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 | |
21 | typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL;\r | |
22 | \r | |
23 | ///\r | |
24 | /// Memory test coverage level.\r | |
25 | /// Ignore chooses not to test memory. Quick and Sparse test some memory, and Extensive performs a detailed memory test.\r | |
26 | ///\r | |
27 | typedef enum {\r | |
28 | IGNORE,\r | |
29 | QUICK,\r | |
30 | SPARSE,\r | |
31 | EXTENSIVE,\r | |
32 | MAXLEVEL\r | |
33 | } EXTENDMEM_COVERAGE_LEVEL;\r | |
34 | \r | |
35 | \r | |
36 | /**\r | |
37 | Initialize the generic memory test.\r | |
38 | \r | |
39 | @param This The protocol instance pointer. \r | |
40 | @param Level The coverage level of the memory test. \r | |
41 | @param RequireSoftECCInit Indicate if the memory need software ECC init. \r | |
42 | \r | |
43 | @retval EFI_SUCCESS The generic memory test is initialized correctly. \r | |
44 | @retval EFI_NO_MEDIA The system had no memory to be tested. \r | |
45 | \r | |
46 | **/\r | |
47 | typedef\r | |
48 | EFI_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 | |
54 | \r | |
55 | \r | |
56 | /**\r | |
57 | Perform the memory test.\r | |
58 | \r | |
59 | @param This The protocol instance pointer. \r | |
60 | @param TestedMemorySize Return the tested extended memory size. \r | |
61 | @param TotalMemorySize Return the whole system physical memory size. \r | |
62 | The total memory size does not include memory in a slot with a disabled DIMM. \r | |
63 | @param ErrorOut TRUE if the memory error occured.\r | |
64 | @param IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. \r | |
65 | \r | |
66 | @retval EFI_SUCCESS One block of memory passed the test.\r | |
67 | @retval EFI_NOT_FOUND All memory blocks have already been tested.\r | |
68 | @retval EFI_DEVICE_ERROR Memory device error occured, and no agent can handle it.\r | |
69 | \r | |
70 | **/\r | |
71 | typedef\r | |
72 | EFI_STATUS\r | |
73 | (EFIAPI *EFI_PERFORM_MEMORY_TEST)(\r | |
74 | IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r | |
75 | OUT UINT64 *TestedMemorySize,\r | |
76 | OUT UINT64 *TotalMemorySize,\r | |
77 | OUT BOOLEAN *ErrorOut,\r | |
78 | IN BOOLEAN IfTestAbort\r | |
79 | );\r | |
80 | \r | |
81 | \r | |
82 | /**\r | |
83 | Finish the memory test.\r | |
84 | \r | |
85 | @param This The protocol instance pointer. \r | |
86 | \r | |
87 | @retval EFI_SUCCESS Success. All resources used in the memory test are freed.\r | |
88 | \r | |
89 | **/\r | |
90 | typedef\r | |
91 | EFI_STATUS\r | |
92 | (EFIAPI *EFI_MEMORY_TEST_FINISHED)(\r | |
93 | IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This\r | |
94 | );\r | |
95 | \r | |
96 | /**\r | |
97 | Provides the capability to test the compatible range used by some special drivers.\r | |
98 | \r | |
99 | @param This The protocol instance pointer. \r | |
100 | @param StartAddress The start address of the compatible memory range that\r | |
101 | must be below 16M.\r | |
102 | @param Length The compatible memory range's length. \r | |
103 | \r | |
104 | @retval EFI_SUCCESS The compatible memory range pass the memory test. \r | |
105 | @retval EFI_INVALID_PARAMETER The compatible memory range are not below Low 16M.\r | |
106 | \r | |
107 | **/\r | |
108 | typedef\r | |
109 | EFI_STATUS\r | |
110 | (EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE)(\r | |
111 | IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r | |
112 | IN EFI_PHYSICAL_ADDRESS StartAddress,\r | |
113 | IN UINT64 Length\r | |
114 | );\r | |
115 | \r | |
116 | struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {\r | |
117 | EFI_MEMORY_TEST_INIT MemoryTestInit;\r | |
118 | EFI_PERFORM_MEMORY_TEST PerformMemoryTest;\r | |
119 | EFI_MEMORY_TEST_FINISHED Finished;\r | |
120 | EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;\r | |
121 | };\r | |
122 | \r | |
123 | extern EFI_GUID gEfiGenericMemTestProtocolGuid;\r | |
124 | \r | |
125 | #endif\r | |
126 | \r |