summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2016-04-21 09:47:00 +0800
committerStar Zeng <star.zeng@intel.com>2016-04-22 08:53:09 +0800
commit31ffa077fc8b21bfdecf4c75e2e9e2520dea0741 (patch)
tree8f08dc8ea84e09f87f035e4f8f6b1f6a7c0c35b5 /MdeModulePkg/Core
parent2a8b78cfd5f9e0f7f7a8c7111813054fb9040554 (diff)
downloadedk2-31ffa077fc8b21bfdecf4c75e2e9e2520dea0741.zip
edk2-31ffa077fc8b21bfdecf4c75e2e9e2520dea0741.tar.gz
edk2-31ffa077fc8b21bfdecf4c75e2e9e2520dea0741.tar.bz2
MdeModulePkg DxeCore: Call PeCoffExtraActionLib member after Constructor
Originally, the code block for "Report DXE Core image information to the PE/COFF Extra Action Library" was after ProcessLibraryConstructorList(). To fix an issue, ProcessLibraryConstructorList() was moved to be right after CoreInitializeGcdServices() at c5d5379937629f3061d08b8d9a3386a40152ca2c, but the code block was left. As there maybe PeCoffExtraActionLib implementation need Constructor executed first, the patch is to move the code block for "Report DXE Core image information to the PE/COFF Extra Action Library" to be after ProcessLibraryConstructorList. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 20ff02f..a458d6b 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -291,19 +291,6 @@ DxeMain (
ASSERT_EFI_ERROR (Status);
//
- // Report DXE Core image information to the PE/COFF Extra Action Library
- //
- ZeroMem (&ImageContext, sizeof (ImageContext));
- ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)gDxeCoreLoadedImage->ImageBase;
- ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*)(UINTN)ImageContext.ImageAddress);
- ImageContext.SizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID*)(UINTN)ImageContext.ImageAddress);
- Status = PeCoffLoaderGetEntryPoint ((VOID*)(UINTN)ImageContext.ImageAddress, &EntryPoint);
- if (Status == EFI_SUCCESS) {
- ImageContext.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)EntryPoint;
- }
- PeCoffLoaderRelocateImageExtraAction (&ImageContext);
-
- //
// Initialize the Global Coherency Domain Services
//
Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);
@@ -317,6 +304,19 @@ DxeMain (
PERF_START (NULL,"DXE", NULL, 0) ;
//
+ // Report DXE Core image information to the PE/COFF Extra Action Library
+ //
+ ZeroMem (&ImageContext, sizeof (ImageContext));
+ ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)gDxeCoreLoadedImage->ImageBase;
+ ImageContext.PdbPointer = PeCoffLoaderGetPdbPointer ((VOID*)(UINTN)ImageContext.ImageAddress);
+ ImageContext.SizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID*)(UINTN)ImageContext.ImageAddress);
+ Status = PeCoffLoaderGetEntryPoint ((VOID*)(UINTN)ImageContext.ImageAddress, &EntryPoint);
+ if (Status == EFI_SUCCESS) {
+ ImageContext.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)EntryPoint;
+ }
+ PeCoffLoaderRelocateImageExtraAction (&ImageContext);
+
+ //
// Install the DXE Services Table into the EFI System Tables's Configuration Table
//
Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDxeCoreDS);