+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- GenericMemoryTest.h\r
-\r
-Abstract:\r
-\r
- The EFI generic memory test protocol\r
- For more information please look at EfiMemoryTest.doc\r
-\r
---*/\r
-\r
-#ifndef __GENERIC_MEMORY_TEST_H__\r
-#define __GENERIC_MEMORY_TEST_H__\r
-\r
-#define EFI_GENERIC_MEMORY_TEST_PROTOCOL_GUID \\r
- { 0x309de7f1, 0x7f5e, 0x4ace, {0xb4, 0x9c, 0x53, 0x1b, 0xe5, 0xaa, 0x95, 0xef} }\r
-\r
-typedef struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL EFI_GENERIC_MEMORY_TEST_PROTOCOL;\r
-\r
-typedef enum {\r
- IGNORE,\r
- QUICK,\r
- SPARSE,\r
- EXTENSIVE,\r
- MAXLEVEL\r
-} EXTENDMEM_COVERAGE_LEVEL;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_MEMORY_TEST_INIT) (\r
- IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
- IN EXTENDMEM_COVERAGE_LEVEL Level,\r
- OUT BOOLEAN *RequireSoftECCInit\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Initialize the generic memory test.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- Level - The coverage level of the memory test.\r
- RequireSoftECCInit - Indicate if the memory need software ECC init.\r
-\r
- Returns:\r
- EFI_SUCCESS - The generic memory test initialized correctly.\r
- EFI_NO_MEDIA - There is not any non-tested memory found, in this\r
- function if not any non-tesed memory found means \r
- that the memory test driver have not detect any\r
- non-tested extended memory of current system.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_PERFORM_MEMORY_TEST) (\r
- IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
- OUT UINT64 *TestedMemorySize,\r
- OUT UINT64 *TotalMemorySize,\r
- OUT BOOLEAN *ErrorOut,\r
- IN BOOLEAN IfTestAbort\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Perform the memory test.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- TestedMemorySize - Return the tested extended memory size.\r
- TotalMemorySize - Return the whole system physical memory size, this \r
- value may be changed if in some case some error \r
- DIMMs be disabled.\r
- ErrorOut - Any time the memory error occurs, this will be TRUE.\r
- IfTestAbort - Indicate if the user press "ESC" to skip the memory\r
- test.\r
-\r
- Returns:\r
- EFI_SUCCESS - One block of memory test ok, the block size is hide\r
- internally.\r
- EFI_NOT_FOUND - Indicate all the non-tested memory blocks have \r
- already go through.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_MEMORY_TEST_FINISHED) (\r
- IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- The memory test finished.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
-\r
- Returns:\r
- EFI_SUCCESS - Successful free all the generic memory test driver\r
- allocated resource and notify to platform memory\r
- test driver that memory test finished.\r
-\r
---*/\r
-;\r
- \r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_MEMORY_TEST_COMPATIBLE_RANGE) (\r
- IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,\r
- IN EFI_PHYSICAL_ADDRESS StartAddress,\r
- IN UINT64 Length\r
- )\r
-/*++\r
- \r
- Routine Description:\r
- Provide capability to test compatible range which used by some sepcial\r
- driver required using memory range before BDS perform memory test.\r
- \r
- Arguments:\r
- This - Protocol instance pointer.\r
- StartAddress - The start address of the memory range.\r
- Length - The memory range's length.\r
- \r
- Return:\r
- EFI_SUCCESS - The compatible memory range pass the memory test.\r
- EFI_DEVICE_ERROR - The compatible memory range test find memory error\r
- and also return return the error address.\r
- \r
---*/\r
-;\r
-\r
-struct _EFI_GENERIC_MEMORY_TEST_PROTOCOL {\r
- EFI_MEMORY_TEST_INIT MemoryTestInit;\r
- EFI_PERFORM_MEMORY_TEST PerformMemoryTest;\r
- EFI_MEMORY_TEST_FINISHED Finished;\r
- EFI_MEMORY_TEST_COMPATIBLE_RANGE CompatibleRangeTest;\r
-};\r
-\r
-extern EFI_GUID gEfiGenericMemTestProtocolGuid;\r
-\r
-#endif\r
-\r