]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/BaseMemoryTest.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / BaseMemoryTest.h
CommitLineData
1e354c03 1/** @file\r
5f597758 2 This file defines Pei memory test PPI used to Perform memory test in PEI phase.\r
88f20127 3\r
1e354c03 4Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
88f20127 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT 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
21typedef struct _PEI_BASE_MEMORY_TEST_PPI PEI_BASE_MEMORY_TEST_PPI;\r
22\r
5f597758
LG
23//\r
24// 4 different 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 27typedef enum {\r
28 Ignore,\r
29 Quick,\r
30 Sparse,\r
31 Extensive\r
32} PEI_MEMORY_TEST_OP;\r
33\r
5f597758
LG
34/**\r
35 Test a range memory space is ready to read and write.\r
36\r
37 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.\r
38 @param This Pointer to Pei memory test PPI instance.\r
39 @param BeginAddress Beginning of the memory address to be checked.\r
40 @param MemoryLength Bytes of memory range to be checked.\r
41 @param Operation Type of memory check operation to be performed.\r
42 @param ErrorAddress Address which has error when checked.\r
43\r
44 @retval EFI_SUCCESS Memory range pass basic read and write test.\r
45 @retval EFI_DEVICE_ERROR Memory is not ready to access.\r
46**/\r
88f20127 47typedef\r
48EFI_STATUS\r
7d839888 49(EFIAPI *PEI_BASE_MEMORY_TEST)(\r
88f20127 50 IN EFI_PEI_SERVICES **PeiServices,\r
51 IN PEI_BASE_MEMORY_TEST_PPI * This,\r
52 IN EFI_PHYSICAL_ADDRESS BeginAddress,\r
53 IN UINT64 MemoryLength,\r
54 IN PEI_MEMORY_TEST_OP Operation,\r
55 OUT EFI_PHYSICAL_ADDRESS * ErrorAddress\r
56 );\r
57\r
58struct _PEI_BASE_MEMORY_TEST_PPI {\r
59 PEI_BASE_MEMORY_TEST BaseMemoryTest;\r
60};\r
61\r
62extern EFI_GUID gPeiBaseMemoryTestPpiGuid;\r
63\r
64#endif\r