]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.h
Add EBC, FTW, Crc32SectionExtract, NullMemoryTest modules.
[mirror_edk2.git] / MdeModulePkg / Universal / GenericMemoryTest / Dxe / NullMemoryTest.h
diff --git a/MdeModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.h b/MdeModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.h
new file mode 100644 (file)
index 0000000..4b04381
--- /dev/null
@@ -0,0 +1,124 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+  \r
+    NullMemoryTest.h\r
+  \r
+Abstract:\r
+  The generic memory test driver definition\r
+\r
+--*/\r
+\r
+#ifndef _NULL_MEMORY_TEST_H\r
+#define _NULL_MEMORY_TEST_H\r
+\r
+//\r
+// The package level header files this module uses\r
+//\r
+#include <PiDxe.h>\r
+\r
+//\r
+// The protocols, PPI and GUID defintions for this module\r
+//\r
+#include <Protocol/GenericMemoryTest.h>\r
+//\r
+// The Library classes this module consumes\r
+//\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/DxeServicesTableLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+\r
+//\r
+// attributes for reserved memory before it is promoted to system memory\r
+//\r
+#define EFI_MEMORY_PRESENT      0x0100000000000000ULL\r
+#define EFI_MEMORY_INITIALIZED  0x0200000000000000ULL\r
+#define EFI_MEMORY_TESTED       0x0400000000000000ULL\r
+\r
+\r
+//\r
+// Some global define\r
+//\r
+#define GENERIC_CACHELINE_SIZE  0x40\r
+\r
+//\r
+// The SPARSE_SPAN_SIZE size can not small then the MonoTestSize\r
+//\r
+#define TEST_BLOCK_SIZE   0x2000000\r
+#define QUICK_SPAN_SIZE   (TEST_BLOCK_SIZE >> 2)\r
+#define SPARSE_SPAN_SIZE  (TEST_BLOCK_SIZE >> 4)\r
+\r
+//\r
+// This structure records every nontested memory range parsed through GCD\r
+// service.\r
+//\r
+#define EFI_NONTESTED_MEMORY_RANGE_SIGNATURE  EFI_SIGNATURE_32 ('N', 'T', 'M', 'E')\r
+typedef struct {\r
+  UINTN                 Signature;\r
+  LIST_ENTRY            Link;\r
+  EFI_PHYSICAL_ADDRESS  StartAddress;\r
+  UINT64                Length;\r
+  UINT64                Capabilities;\r
+  BOOLEAN               Above4G;\r
+  BOOLEAN               AlreadyMapped;\r
+} NONTESTED_MEMORY_RANGE;\r
+\r
+#define NONTESTED_MEMORY_RANGE_FROM_LINK(link) \\r
+        CR(link, NONTESTED_MEMORY_RANGE, Link, EFI_NONTESTED_MEMORY_RANGE_SIGNATURE)\r
+\r
+//\r
+// This is the memory test driver's structure definition\r
+//\r
+#define EFI_GENERIC_MEMORY_TEST_PRIVATE_SIGNATURE EFI_SIGNATURE_32 ('G', 'E', 'M', 'T')\r
+\r
+//\r
+// Function Prototypes\r
+//\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeMemoryTest (\r
+  IN EFI_GENERIC_MEMORY_TEST_PROTOCOL          *This,\r
+  IN  EXTENDMEM_COVERAGE_LEVEL                 Level,\r
+  OUT BOOLEAN                                  *RequireSoftECCInit\r
+  )\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GenPerformMemoryTest (\r
+  IN EFI_GENERIC_MEMORY_TEST_PROTOCOL          *This,\r
+  IN OUT UINT64                                *TestedMemorySize,\r
+  OUT UINT64                                   *TotalMemorySize,\r
+  OUT BOOLEAN                                  *ErrorOut,\r
+  IN BOOLEAN                                   TestAbort\r
+  )\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GenMemoryTestFinished (\r
+  IN EFI_GENERIC_MEMORY_TEST_PROTOCOL *This\r
+  )\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+GenCompatibleRangeTest (\r
+  IN EFI_GENERIC_MEMORY_TEST_PROTOCOL          *This,\r
+  IN  EFI_PHYSICAL_ADDRESS                     StartAddress,\r
+  IN  UINT64                                   Length\r
+  )\r
+;\r
+\r
+#endif\r