]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h
remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Universal / MemoryTest / NullMemoryTestDxe / NullMemoryTest.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 NullMemoryTest.h
15
16 Abstract:
17 The generic memory test driver definition
18
19 --*/
20
21 #ifndef _NULL_MEMORY_TEST_H
22 #define _NULL_MEMORY_TEST_H
23
24
25 #include <PiDxe.h>
26
27
28 #include <Protocol/GenericMemoryTest.h>
29
30 #include <Library/DebugLib.h>
31 #include <Library/UefiDriverEntryPoint.h>
32 #include <Library/DxeServicesTableLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/MemoryAllocationLib.h>
35
36 //
37 // attributes for reserved memory before it is promoted to system memory
38 //
39 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
40 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
41 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
42
43
44 //
45 // Some global define
46 //
47 #define GENERIC_CACHELINE_SIZE 0x40
48
49 //
50 // The SPARSE_SPAN_SIZE size can not small then the MonoTestSize
51 //
52 #define TEST_BLOCK_SIZE 0x2000000
53 #define QUICK_SPAN_SIZE (TEST_BLOCK_SIZE >> 2)
54 #define SPARSE_SPAN_SIZE (TEST_BLOCK_SIZE >> 4)
55
56 //
57 // This structure records every nontested memory range parsed through GCD
58 // service.
59 //
60 #define EFI_NONTESTED_MEMORY_RANGE_SIGNATURE EFI_SIGNATURE_32 ('N', 'T', 'M', 'E')
61 typedef struct {
62 UINTN Signature;
63 LIST_ENTRY Link;
64 EFI_PHYSICAL_ADDRESS StartAddress;
65 UINT64 Length;
66 UINT64 Capabilities;
67 BOOLEAN Above4G;
68 BOOLEAN AlreadyMapped;
69 } NONTESTED_MEMORY_RANGE;
70
71 #define NONTESTED_MEMORY_RANGE_FROM_LINK(link) \
72 CR(link, NONTESTED_MEMORY_RANGE, Link, EFI_NONTESTED_MEMORY_RANGE_SIGNATURE)
73
74 //
75 // This is the memory test driver's structure definition
76 //
77 #define EFI_GENERIC_MEMORY_TEST_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('G', 'E', 'M', 'T')
78
79 //
80 // Function Prototypes
81 //
82 EFI_STATUS
83 EFIAPI
84 InitializeMemoryTest (
85 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
86 IN EXTENDMEM_COVERAGE_LEVEL Level,
87 OUT BOOLEAN *RequireSoftECCInit
88 )
89 ;
90
91 EFI_STATUS
92 EFIAPI
93 GenPerformMemoryTest (
94 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
95 IN OUT UINT64 *TestedMemorySize,
96 OUT UINT64 *TotalMemorySize,
97 OUT BOOLEAN *ErrorOut,
98 IN BOOLEAN TestAbort
99 )
100 ;
101
102 EFI_STATUS
103 EFIAPI
104 GenMemoryTestFinished (
105 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This
106 )
107 ;
108
109 EFI_STATUS
110 EFIAPI
111 GenCompatibleRangeTest (
112 IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This,
113 IN EFI_PHYSICAL_ADDRESS StartAddress,
114 IN UINT64 Length
115 )
116 ;
117
118 #endif