From: mdkinney Date: Tue, 3 Aug 2010 05:20:15 +0000 (+0000) Subject: Update DXE Core so its own PE/COFF image is passed to the PeCoffExtraActionLib X-Git-Tag: edk2-stable201903~15628 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=b43619d0cdf17c649dde0373f2402a4b551138d8 Update DXE Core so its own PE/COFF image is passed to the PeCoffExtraActionLib git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10769 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 4ebce1de12..56b91b0c11 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -74,6 +74,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include +#include #include #include #include diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index 1db57d5a25..52a47f9f8c 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -82,6 +82,8 @@ DebugLib DxeCoreEntryPoint PeCoffLib + PeCoffGetEntryPointLib + PeCoffExtraActionLib ExtractGuidedSectionLib MemoryAllocationLib UefiBootServicesTableLib diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 1bf799ea2d..eadcae488c 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -97,6 +97,8 @@ CoreInitializeImageServices ( UINT64 DxeCoreImageLength; VOID *DxeCoreEntryPoint; EFI_PEI_HOB_POINTERS DxeCoreHob; + PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; + // // Searching for image hob // @@ -116,6 +118,14 @@ CoreInitializeImageServices ( DxeCoreImageLength = DxeCoreHob.MemoryAllocationModule->MemoryAllocationHeader.MemoryLength; DxeCoreEntryPoint = (VOID *) (UINTN) DxeCoreHob.MemoryAllocationModule->EntryPoint; gDxeCoreFileName = &DxeCoreHob.MemoryAllocationModule->ModuleName; + + // + // Report DXE Core image information to the PE/COFF Extra Action Library + // + ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)DxeCoreImageBaseAddress; + ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageContext.ImageAddress); + PeCoffLoaderRelocateImageExtraAction (&ImageContext); + // // Initialize the fields for an internal driver //