Store physical address as well in the image context
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2022-12-04 22:46:33 +01:00
parent b89121fded
commit 6b2f34f287
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,7 @@ typedef struct _PECOFF_IMAGE_CONTEXT
UINT ImagePages; UINT ImagePages;
UINT ImageSize; UINT ImageSize;
LOADER_MEMORY_TYPE MemoryType; LOADER_MEMORY_TYPE MemoryType;
PVOID PhysicalAddress;
PVOID VirtualAddress; PVOID VirtualAddress;
} PECOFF_IMAGE_CONTEXT, *PPECOFF_IMAGE_CONTEXT; } PECOFF_IMAGE_CONTEXT, *PPECOFF_IMAGE_CONTEXT;

View File

@ -226,6 +226,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
/* Store image data and virtual address */ /* Store image data and virtual address */
ImageData->Data = (PUINT8)(UINT_PTR)Address; ImageData->Data = (PUINT8)(UINT_PTR)Address;
ImageData->PhysicalAddress = (PVOID)(UINT_PTR)Address;
if(VirtualAddress) if(VirtualAddress)
{ {
/* Virtual address passed to this routine */ /* Virtual address passed to this routine */