summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-06 23:09:49 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-06 23:09:49 +0000
commitd0d41b52e06296fc148470f18eb6aaddfef36bdc (patch)
treef66ad933c056eeb369de018dbad9ff40e0908373
parent775455633400aaba9161b5bb97b48f0df059bd88 (diff)
downloadedk2-platforms-d0d41b52e06296fc148470f18eb6aaddfef36bdc.tar.xz
Move registration of DXE Core with PeCoffExtraActionLib after the lib constructors have been executed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10778 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c14
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c18
2 files changed, 16 insertions, 16 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index b18f92d408..3dfabd87e5 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -237,9 +237,10 @@ DxeMain (
IN VOID *HobStart
)
{
- EFI_STATUS Status;
- EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
- UINT64 MemoryLength;
+ EFI_STATUS Status;
+ EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
+ UINT64 MemoryLength;
+ PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
//
// Initialize Debug Agent to support source level debug in DXE phase
@@ -277,6 +278,13 @@ DxeMain (
PERF_START (NULL,"DXE", NULL, 0) ;
//
+ // Report DXE Core image information to the PE/COFF Extra Action Library
+ //
+ ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)gDxeCoreLoadedImage->ImageBase;
+ ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*) (UINTN) ImageContext.ImageAddress);
+ PeCoffLoaderRelocateImageExtraAction (&ImageContext);
+
+ //
// Initialize the Global Coherency Domain Services
//
Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index eadcae488c..2ffd6af9b6 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -97,7 +97,6 @@ CoreInitializeImageServices (
UINT64 DxeCoreImageLength;
VOID *DxeCoreEntryPoint;
EFI_PEI_HOB_POINTERS DxeCoreHob;
- PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
//
// Searching for image hob
@@ -120,13 +119,6 @@ CoreInitializeImageServices (
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
//
Image = &mCorePrivateImage;
@@ -163,11 +155,11 @@ CoreInitializeImageServices (
// Export DXE Core PE Loader functionality for backward compatibility.
//
Status = CoreInstallProtocolInterface (
- &mLoadPe32PrivateData.Handle,
- &gEfiLoadPeImageProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &mLoadPe32PrivateData.Pe32Image
- );
+ &mLoadPe32PrivateData.Handle,
+ &gEfiLoadPeImageProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ &mLoadPe32PrivateData.Pe32Image
+ );
}
return Status;