]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Ppi/BaseMemoryTest.h
1e0fbb4af79d4d989f4bdcd16588819deff009aa
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / BaseMemoryTest.h
1 /** @file
2 This file defines Pei memory test PPI used to perform memory test in PEI phase.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __BASE_MEMORY_TEST_H__
16 #define __BASE_MEMORY_TEST_H__
17
18 #define PEI_BASE_MEMORY_TEST_GUID \
19 { 0xb6ec423c, 0x21d2, 0x490d, {0x85, 0xc6, 0xdd, 0x58, 0x64, 0xea, 0xa6, 0x74 } }
20
21 typedef struct _PEI_BASE_MEMORY_TEST_PPI PEI_BASE_MEMORY_TEST_PPI;
22
23 ///
24 /// Pei Memory test operations
25 /// Ignore op not test memory, Quick and Sparse op test memory quickly, Extensive op test memory detailedly.
26 ///
27 typedef enum {
28 Ignore,
29 Quick,
30 Sparse,
31 Extensive
32 } PEI_MEMORY_TEST_OP;
33
34 /**
35 Test a range memory space that is ready to read and write.
36 If the memory is not ready, the error memory address will be returned.
37
38 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
39 @param This Pointer to Pei memory test PPI instance.
40 @param BeginAddress Beginning of the memory address to be checked.
41 @param MemoryLength Bytes of memory range to be checked.
42 @param Operation Type of memory check operation to be performed.
43 @param ErrorAddress Address of memory where the error is checked.
44
45 @retval EFI_SUCCESS Memory range pass basic read and write test.
46 @retval EFI_DEVICE_ERROR Memory is not ready to access.
47 **/
48 typedef
49 EFI_STATUS
50 (EFIAPI *PEI_BASE_MEMORY_TEST)(
51 IN EFI_PEI_SERVICES **PeiServices,
52 IN PEI_BASE_MEMORY_TEST_PPI * This,
53 IN EFI_PHYSICAL_ADDRESS BeginAddress,
54 IN UINT64 MemoryLength,
55 IN PEI_MEMORY_TEST_OP Operation,
56 OUT EFI_PHYSICAL_ADDRESS * ErrorAddress
57 );
58
59 struct _PEI_BASE_MEMORY_TEST_PPI {
60 PEI_BASE_MEMORY_TEST BaseMemoryTest;
61 };
62
63 extern EFI_GUID gPeiBaseMemoryTestPpiGuid;
64
65 #endif