///\r
/// Set by PeCoffLoaderGetImageInfo() to the ImageBase in the PE/COFF header.\r
///\r
- PHYSICAL_ADDRESS ImageAddress;\r
+ PHYSICAL_ADDRESS ImageAddress;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to the SizeOfImage in the PE/COFF header.\r
/// Image size includes the size of Debug Entry if it is present.\r
///\r
- UINT64 ImageSize;\r
+ UINT64 ImageSize;\r
///\r
/// Is set to zero by PeCoffLoaderGetImageInfo(). If DestinationAddress is non-zero,\r
/// PeCoffLoaderRelocateImage() will relocate the image using this base address.\r
/// If the DestinationAddress is zero, the ImageAddress will be used as the base\r
/// address of relocation.\r
///\r
- PHYSICAL_ADDRESS DestinationAddress;\r
+ PHYSICAL_ADDRESS DestinationAddress;\r
///\r
/// PeCoffLoaderLoadImage() sets EntryPoint to to the entry point of the PE/COFF image.\r
///\r
- PHYSICAL_ADDRESS EntryPoint;\r
+ PHYSICAL_ADDRESS EntryPoint;\r
///\r
/// Passed in by the caller to PeCoffLoaderGetImageInfo() and PeCoffLoaderLoadImage()\r
/// to abstract accessing the image from the library.\r
///\r
- PE_COFF_LOADER_READ_FILE ImageRead;\r
+ PE_COFF_LOADER_READ_FILE ImageRead;\r
///\r
/// Used as the FileHandle passed into the ImageRead function when it's called.\r
///\r
- VOID *Handle;\r
+ VOID *Handle;\r
///\r
/// Caller allocated buffer of size FixupDataSize that can be optionally allocated\r
/// prior to calling PeCoffLoaderRelocateImage().\r
/// This buffer is filled with the information used to fix up the image.\r
/// The fixups have been applied to the image and this entry is just for information.\r
///\r
- VOID *FixupData;\r
+ VOID *FixupData;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header.\r
/// If the image is a TE image, then this field is set to 0.\r
///\r
- UINT32 SectionAlignment;\r
+ UINT32 SectionAlignment;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to offset to the PE/COFF header.\r
/// If the PE/COFF image does not start with a DOS header, this value is zero.\r
/// Otherwise, it's the offset to the PE/COFF header.\r
///\r
- UINT32 PeCoffHeaderOffset;\r
+ UINT32 PeCoffHeaderOffset;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to the Relative Virtual Address of the debug directory,\r
/// if it exists in the image\r
///\r
- UINT32 DebugDirectoryEntryRva;\r
+ UINT32 DebugDirectoryEntryRva;\r
///\r
/// Set by PeCoffLoaderLoadImage() to CodeView area of the PE/COFF Debug directory.\r
///\r
- VOID *CodeView;\r
+ VOID *CodeView;\r
///\r
/// Set by PeCoffLoaderLoadImage() to point to the PDB entry contained in the CodeView area.\r
/// The PdbPointer points to the filename of the PDB file used for source-level debug of\r
/// the image by a debugger.\r
///\r
- CHAR8 *PdbPointer;\r
+ CHAR8 *PdbPointer;\r
///\r
/// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header.\r
///\r
- UINTN SizeOfHeaders;\r
+ UINTN SizeOfHeaders;\r
///\r
/// Not used by this library class. Other library classes that layer on top of this library\r
/// class fill in this value as part of their GetImageInfo call.\r
/// This allows the caller of the library to know what type of memory needs to be allocated\r
/// to load and relocate the image.\r
///\r
- UINT32 ImageCodeMemoryType;\r
+ UINT32 ImageCodeMemoryType;\r
///\r
/// Not used by this library class. Other library classes that layer on top of this library\r
/// class fill in this value as part of their GetImageInfo call.\r
/// This allows the caller of the library to know what type of memory needs to be allocated\r
/// to load and relocate the image.\r
///\r
- UINT32 ImageDataMemoryType;\r
+ UINT32 ImageDataMemoryType;\r
///\r
/// Set by any of the library functions if they encounter an error.\r
///\r
- UINT32 ImageError;\r
+ UINT32 ImageError;\r
///\r
/// Set by PeCoffLoaderLoadImage() to indicate the size of FixupData that the caller must\r
/// allocate before calling PeCoffLoaderRelocateImage().\r
///\r
- UINTN FixupDataSize;\r
+ UINTN FixupDataSize;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to the machine type stored in the PE/COFF header.\r
///\r
- UINT16 Machine;\r
+ UINT16 Machine;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to the subsystem type stored in the PE/COFF header.\r
///\r
- UINT16 ImageType;\r
+ UINT16 ImageType;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to TRUE if the PE/COFF image does not contain\r
/// relocation information.\r
///\r
- BOOLEAN RelocationsStripped;\r
+ BOOLEAN RelocationsStripped;\r
///\r
/// Set by PeCoffLoaderGetImageInfo() to TRUE if the image is a TE image.\r
/// For a definition of the TE Image format, see the Platform Initialization Pre-EFI\r
/// Initialization Core Interface Specification.\r
///\r
- BOOLEAN IsTeImage;\r
+ BOOLEAN IsTeImage;\r
///\r
/// Set by PeCoffLoaderLoadImage() to the HII resource offset\r
/// if the image contains a custom PE/COFF resource with the type 'HII'.\r
/// Otherwise, the entry remains to be 0.\r
///\r
- PHYSICAL_ADDRESS HiiResourceData;\r
+ PHYSICAL_ADDRESS HiiResourceData;\r
///\r
/// Private storage for implementation specific data.\r
///\r
- UINT64 Context;\r
+ UINT64 Context;\r
} PE_COFF_LOADER_IMAGE_CONTEXT;\r
\r
/**\r
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
);\r
\r
-\r
/**\r
Reads contents of a PE/COFF image from a buffer in system memory.\r
\r
RETURN_STATUS\r
EFIAPI\r
PeCoffLoaderImageReadFromMemory (\r
- IN VOID *FileHandle,\r
- IN UINTN FileOffset,\r
- IN OUT UINTN *ReadSize,\r
- OUT VOID *Buffer\r
+ IN VOID *FileHandle,\r
+ IN UINTN FileOffset,\r
+ IN OUT UINTN *ReadSize,\r
+ OUT VOID *Buffer\r
);\r
\r
-\r
/**\r
Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at EFI\r
runtime.\r
VOID\r
EFIAPI\r
PeCoffLoaderRelocateImageForRuntime (\r
- IN PHYSICAL_ADDRESS ImageBase,\r
- IN PHYSICAL_ADDRESS VirtImageBase,\r
- IN UINTN ImageSize,\r
- IN VOID *RelocationData\r
+ IN PHYSICAL_ADDRESS ImageBase,\r
+ IN PHYSICAL_ADDRESS VirtImageBase,\r
+ IN UINTN ImageSize,\r
+ IN VOID *RelocationData\r
);\r
\r
/**\r
PeCoffLoaderUnloadImage (\r
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
);\r
+\r
#endif\r