]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/Common/PeCoffLoaderImageContext.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Common / PeCoffLoaderImageContext.h
diff --git a/OldMdePkg/Include/Common/PeCoffLoaderImageContext.h b/OldMdePkg/Include/Common/PeCoffLoaderImageContext.h
new file mode 100644 (file)
index 0000000..b2519ea
--- /dev/null
@@ -0,0 +1,57 @@
+/** @file\r
+  Important data type defined used for Memory Only PE COFF loader. \r
+\r
+  Copyright (c) 2007, 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
+**/\r
+\r
+#ifndef __PECOFFLOADER_IMAGE_CONTEXT_H\r
+#define __PECOFFLOADER_IMAGE_CONTEXT_H\r
+\r
+//\r
+// PE/COFF Loader Read Function passed in by caller\r
+//\r
+typedef\r
+RETURN_STATUS\r
+(EFIAPI *PE_COFF_LOADER_READ_FILE) (\r
+  IN     VOID   *FileHandle,\r
+  IN     UINTN  FileOffset,\r
+  IN OUT UINTN  *ReadSize,\r
+  OUT    VOID   *Buffer\r
+  );\r
+\r
+//\r
+// Context structure used while PE/COFF image is being loaded and relocated\r
+//\r
+typedef struct {\r
+  PHYSICAL_ADDRESS                  ImageAddress;\r
+  UINT64                            ImageSize;\r
+  PHYSICAL_ADDRESS                  DestinationAddress;\r
+  PHYSICAL_ADDRESS                  EntryPoint;\r
+  PE_COFF_LOADER_READ_FILE          ImageRead;\r
+  VOID                              *Handle;\r
+  VOID                              *FixupData;\r
+  UINT32                            SectionAlignment;\r
+  UINT32                            PeCoffHeaderOffset;\r
+  UINT32                            DebugDirectoryEntryRva;\r
+  VOID                              *CodeView;\r
+  CHAR8                             *PdbPointer;\r
+  UINTN                             SizeOfHeaders;\r
+  UINT32                            ImageCodeMemoryType;\r
+  UINT32                            ImageDataMemoryType;\r
+  UINT32                            ImageError;\r
+  UINTN                             FixupDataSize;\r
+  UINT16                            Machine;\r
+  UINT16                            ImageType;\r
+  BOOLEAN                           RelocationsStripped;\r
+  BOOLEAN                           IsTeImage;\r
+} PE_COFF_LOADER_IMAGE_CONTEXT;\r
+\r
+#endif\r