]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h
Update prototype of DxeLoadCore().
[mirror_edk2.git] / MdeModulePkg / Universal / MemoryTest / NullMemoryTestDxe / NullMemoryTest.h
1 /** @file
2 The generic memory test driver definition
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 _NULL_MEMORY_TEST_H
16 #define _NULL_MEMORY_TEST_H
17
18
19 #include <Uefi.h>
20
21
22 #include <Protocol/GenericMemoryTest.h>
23
24 #include <Library/DebugLib.h>
25 #include <Library/UefiDriverEntryPoint.h>
26 #include <Library/DxeServicesTableLib.h>
27 #include <Library/UefiBootServicesTableLib.h>
28 #include <Library/MemoryAllocationLib.h>
29
30 //
31 // attributes for reserved memory before it is promoted to system memory
32 //
33 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
34 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
35 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
36
37
38 //
39 // Some global define
40 //
41 #define GENERIC_CACHELINE_SIZE 0x40
42
43 //
44 // The SPARSE_SPAN_SIZE size can not small then the MonoTestSize
45 //
46 #define TEST_BLOCK_SIZE 0x2000000
47 #define QUICK_SPAN_SIZE (TEST_BLOCK_SIZE >> 2)
48 #define SPARSE_SPAN_SIZE (TEST_BLOCK_SIZE >> 4)
49
50 //
51 // This structure records every nontested memory range parsed through GCD
52 // service.
53 //
54 #define EFI_NONTESTED_MEMORY_RANGE_SIGNATURE EFI_SIGNATURE_32 ('N', 'T', 'M', 'E')
55 typedef struct {
56 UINTN Signature;
57 LIST_ENTRY Link;
58 EFI_PHYSICAL_ADDRESS StartAddress;
59 UINT64 Length;
60 UINT64 Capabilities;
61 BOOLEAN Above4G;
62 BOOLEAN AlreadyMapped;
63 } NONTESTED_MEMORY_RANGE;
64
65 #define NONTESTED_MEMORY_RANGE_FROM_LINK(link) \
66 CR(link, NONTESTED_MEMORY_RANGE, Link, EFI_NONTESTED_MEMORY_RANGE_SIGNATURE)
67
68 //
69 // This is the memory test driver's structure definition
70 //
71 #define EFI_GENERIC_MEMORY_TEST_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('G', 'E', 'M', 'T')
72
73 //
74 // Function Prototypes
75 //
76 EFI_STATUS
77 EFIAPI
78 InitializeMemoryTest (
79 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
80 IN EXTENDMEM_COVERAGE_LEVEL Level,
81 OUT BOOLEAN *RequireSoftECCInit
82 )
83 ;
84
85 EFI_STATUS
86 EFIAPI
87 GenPerformMemoryTest (
88 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
89 IN OUT UINT64 *TestedMemorySize,
90 OUT UINT64 *TotalMemorySize,
91 OUT BOOLEAN *ErrorOut,
92 IN BOOLEAN TestAbort
93 )
94 ;
95
96 EFI_STATUS
97 EFIAPI
98 GenMemoryTestFinished (
99 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This
100 )
101 ;
102
103 EFI_STATUS
104 EFIAPI
105 GenCompatibleRangeTest (
106 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
107 IN EFI_PHYSICAL_ADDRESS StartAddress,
108 IN UINT64 Length
109 )
110 ;
111
112 #endif