2 The EFI generic memory test protocol interface.
3 For more information please look at EfiMemoryTest.doc
5 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __GENERIC_MEMORY_TEST_H__
17 #define __GENERIC_MEMORY_TEST_H__
19 #define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \
20 { 0x309de7f1, 0x7f5e, 0x4ace, {0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef} }
22 typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL
;
30 } EXTENDMEM_COVERAGE_LEVEL
;
34 Initialize the generic memory test.
36 @param This Protocol instance pointer.
37 @param Level The coverage level of the memory test.
38 @param RequireSoftECCInit Indicate if the memory need software ECC init.
40 @retval EFI_SUCCESS The generic memory test initialized correctly.
41 @retval EFI_NO_MEDIA There is not any non-tested memory found, in this
42 function if not any non-tesed memory found means
43 that the memory test driver have not detect any
44 non-tested extended memory of current system.
49 (EFIAPI
*EFI_MEMORY_TEST_INIT
) (
50 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
51 IN EXTENDMEM_COVERAGE_LEVEL Level
,
52 OUT BOOLEAN
*RequireSoftECCInit
58 Perform the memory test.
60 @param This Protocol instance pointer.
61 @param TestedMemorySize Return the tested extended memory size.
62 @param TotalMemorySize Return the whole system physical memory size, this
63 value may be changed if in some case some error
65 @param ErrorOut Any time the memory error occurs, this will be
67 @param IfTestAbort Indicate if the user press "ESC" to skip the memory
70 @retval EFI_SUCCESS One block of memory test ok, the block size is hide
72 @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have
78 (EFIAPI
*EFI_PERFORM_MEMORY_TEST
) (
79 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
80 OUT UINT64
*TestedMemorySize
,
81 OUT UINT64
*TotalMemorySize
,
82 OUT BOOLEAN
*ErrorOut
,
83 IN BOOLEAN IfTestAbort
89 The memory test finished.
91 @param This Protocol instance pointer.
93 @retval EFI_SUCCESS Successful free all the generic memory test driver
94 allocated resource and notify to platform memory
95 test driver that memory test finished.
100 (EFIAPI
*EFI_MEMORY_TEST_FINISHED
) (
101 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
106 Provide capability to test compatible range which used by some sepcial
107 driver required using memory range before BDS perform memory test.
109 @param This Protocol instance pointer.
110 @param StartAddress The start address of the memory range.
111 @param Length The memory range's length.
113 @retval EFI_SUCCESS The compatible memory range pass the memory test.
114 @retval EFI_DEVICE_ERROR The compatible memory range test find memory error
115 and also return return the error address.
120 (EFIAPI
*EFI_MEMORY_TEST_COMPATIBLE_RANGE
) (
121 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL
*This
,
122 IN EFI_PHYSICAL_ADDRESS StartAddress
,
127 struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL
{
128 EFI_MEMORY_TEST_INIT MemoryTestInit
;
129 EFI_PERFORM_MEMORY_TEST PerformMemoryTest
;
130 EFI_MEMORY_TEST_FINISHED Finished
;
131 EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest
;
134 extern EFI_GUID gEfiGenericMemTestProtocolGuid
;