]>
Commit | Line | Data |
---|---|---|
1e354c03 | 1 | /** @file\r |
346cf9ac | 2 | This file defines Pei memory test PPI used to perform memory test in PEI phase.\r |
88f20127 | 3 | \r |
1e354c03 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r |
88f20127 | 5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. 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 | |
1e354c03 | 13 | **/\r |
88f20127 | 14 | \r |
15 | #ifndef __BASE_MEMORY_TEST_H__\r | |
16 | #define __BASE_MEMORY_TEST_H__\r | |
17 | \r | |
18 | #define PEI_BASE_MEMORY_TEST_GUID \\r | |
19 | { 0xb6ec423c, 0x21d2, 0x490d, {0x85, 0xc6, 0xdd, 0x58, 0x64, 0xea, 0xa6, 0x74 } }\r | |
20 | \r | |
21 | typedef struct _PEI_BASE_MEMORY_TEST_PPI PEI_BASE_MEMORY_TEST_PPI;\r | |
22 | \r | |
346cf9ac LG |
23 | ///\r |
24 | /// Pei Memory test operations\r | |
25 | /// Ignore op not test memory, Quick and Sparse op test memory quickly, Extensive op test memory detailedly.\r | |
26 | ///\r | |
88f20127 | 27 | typedef enum {\r |
28 | Ignore,\r | |
29 | Quick,\r | |
30 | Sparse,\r | |
31 | Extensive\r | |
32 | } PEI_MEMORY_TEST_OP;\r | |
33 | \r | |
5f597758 | 34 | /**\r |
346cf9ac LG |
35 | Test a range memory space that is ready to read and write.\r |
36 | If the memory is not ready, the error memory address will be returned.\r | |
5f597758 LG |
37 | \r |
38 | @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r | |
39 | @param This Pointer to Pei memory test PPI instance.\r | |
40 | @param BeginAddress Beginning of the memory address to be checked.\r | |
41 | @param MemoryLength Bytes of memory range to be checked.\r | |
42 | @param Operation Type of memory check operation to be performed.\r | |
346cf9ac | 43 | @param ErrorAddress Address of memory where the error is checked.\r |
5f597758 LG |
44 | \r |
45 | @retval EFI_SUCCESS Memory range pass basic read and write test.\r | |
46 | @retval EFI_DEVICE_ERROR Memory is not ready to access.\r | |
47 | **/\r | |
88f20127 | 48 | typedef\r |
49 | EFI_STATUS\r | |
7d839888 | 50 | (EFIAPI *PEI_BASE_MEMORY_TEST)(\r |
88f20127 | 51 | IN EFI_PEI_SERVICES **PeiServices,\r |
52 | IN PEI_BASE_MEMORY_TEST_PPI * This,\r | |
53 | IN EFI_PHYSICAL_ADDRESS BeginAddress,\r | |
54 | IN UINT64 MemoryLength,\r | |
55 | IN PEI_MEMORY_TEST_OP Operation,\r | |
56 | OUT EFI_PHYSICAL_ADDRESS * ErrorAddress\r | |
57 | );\r | |
58 | \r | |
59 | struct _PEI_BASE_MEMORY_TEST_PPI {\r | |
60 | PEI_BASE_MEMORY_TEST BaseMemoryTest;\r | |
61 | };\r | |
62 | \r | |
63 | extern EFI_GUID gPeiBaseMemoryTestPpiGuid;\r | |
64 | \r | |
65 | #endif\r |