3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 The EFI generic memory test protocol
19 For more information please look at EfiMemoryTest.doc
23 #ifndef __GENERIC_MEMORY_TEST_H__
24 #define __GENERIC_MEMORY_TEST_H__
26 #define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \
27 { 0x309de7f1, 0x7f5e, 0x4ace, 0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef}
29 EFI_FORWARD_DECLARATION (EFI_GENERIC_MEMORY_TEST_PROTOCOL
);
37 } EXTENDMEM_COVERAGE_LEVEL
;
41 (EFIAPI
*EFI_MEMORY_TEST_INIT
) (
42 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
43 IN EXTENDMEM_COVERAGE_LEVEL Level
,
44 OUT BOOLEAN
*RequireSoftECCInit
49 Initialize the generic memory test.
52 This - Protocol instance pointer.
53 Level - The coverage level of the memory test.
54 RequireSoftECCInit - Indicate if the memory need software ECC init.
57 EFI_SUCCESS - The generic memory test initialized correctly.
58 EFI_NO_MEDIA - There is not any non-tested memory found, in this
59 function if not any non-tesed memory found means
60 that the memory test driver have not detect any
61 non-tested extended memory of current system.
68 (EFIAPI
*EFI_PERFORM_MEMORY_TEST
) (
69 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
70 OUT UINT64
*TestedMemorySize
,
71 OUT UINT64
*TotalMemorySize
,
72 OUT BOOLEAN
*ErrorOut
,
73 IN BOOLEAN IfTestAbort
78 Perform the memory test.
81 This - Protocol instance pointer.
82 TestedMemorySize - Return the tested extended memory size.
83 TotalMemorySize - Return the whole system physical memory size, this
84 value may be changed if in some case some error
86 ErrorOut - Any time the memory error occurs, this will be TRUE.
87 IfTestAbort - Indicate if the user press "ESC" to skip the memory
91 EFI_SUCCESS - One block of memory test ok, the block size is hide
93 EFI_NOT_FOUND - Indicate all the non-tested memory blocks have
101 (EFIAPI
*EFI_MEMORY_TEST_FINISHED
) (
102 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
107 The memory test finished.
110 This - Protocol instance pointer.
113 EFI_SUCCESS - Successful free all the generic memory test driver
114 allocated resource and notify to platform memory
115 test driver that memory test finished.
122 (EFIAPI
*EFI_MEMORY_TEST_COMPATIBLE_RANGE
) (
123 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
124 IN EFI_PHYSICAL_ADDRESS StartAddress
,
130 Provide capability to test compatible range which used by some sepcial
131 driver required using memory range before BDS perform memory test.
134 This - Protocol instance pointer.
135 StartAddress - The start address of the memory range.
136 Length - The memory range's length.
139 EFI_SUCCESS - The compatible memory range pass the memory test.
140 EFI_DEVICE_ERROR - The compatible memory range test find memory error
141 and also return return the error address.
146 typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL
{
147 EFI_MEMORY_TEST_INIT MemoryTestInit
;
148 EFI_PERFORM_MEMORY_TEST PerformMemoryTest
;
149 EFI_MEMORY_TEST_FINISHED Finished
;
150 EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest
;
151 } EFI_GENERIC_MEMORY_TEST_PROTOCOL
;
153 extern EFI_GUID gEfiGenericMemTestProtocolGuid
;