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
This commit is contained in:
@ -237,9 +237,10 @@ DxeMain (
|
|||||||
IN VOID *HobStart
|
IN VOID *HobStart
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
|
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
|
||||||
UINT64 MemoryLength;
|
UINT64 MemoryLength;
|
||||||
|
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize Debug Agent to support source level debug in DXE phase
|
// Initialize Debug Agent to support source level debug in DXE phase
|
||||||
@ -276,6 +277,13 @@ DxeMain (
|
|||||||
PERF_END (NULL,"PEI", NULL, 0) ;
|
PERF_END (NULL,"PEI", NULL, 0) ;
|
||||||
PERF_START (NULL,"DXE", NULL, 0) ;
|
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
|
// Initialize the Global Coherency Domain Services
|
||||||
//
|
//
|
||||||
|
@ -97,7 +97,6 @@ CoreInitializeImageServices (
|
|||||||
UINT64 DxeCoreImageLength;
|
UINT64 DxeCoreImageLength;
|
||||||
VOID *DxeCoreEntryPoint;
|
VOID *DxeCoreEntryPoint;
|
||||||
EFI_PEI_HOB_POINTERS DxeCoreHob;
|
EFI_PEI_HOB_POINTERS DxeCoreHob;
|
||||||
PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Searching for image hob
|
// Searching for image hob
|
||||||
@ -119,13 +118,6 @@ CoreInitializeImageServices (
|
|||||||
DxeCoreEntryPoint = (VOID *) (UINTN) DxeCoreHob.MemoryAllocationModule->EntryPoint;
|
DxeCoreEntryPoint = (VOID *) (UINTN) DxeCoreHob.MemoryAllocationModule->EntryPoint;
|
||||||
gDxeCoreFileName = &DxeCoreHob.MemoryAllocationModule->ModuleName;
|
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
|
// Initialize the fields for an internal driver
|
||||||
//
|
//
|
||||||
@ -163,11 +155,11 @@ CoreInitializeImageServices (
|
|||||||
// Export DXE Core PE Loader functionality for backward compatibility.
|
// Export DXE Core PE Loader functionality for backward compatibility.
|
||||||
//
|
//
|
||||||
Status = CoreInstallProtocolInterface (
|
Status = CoreInstallProtocolInterface (
|
||||||
&mLoadPe32PrivateData.Handle,
|
&mLoadPe32PrivateData.Handle,
|
||||||
&gEfiLoadPeImageProtocolGuid,
|
&gEfiLoadPeImageProtocolGuid,
|
||||||
EFI_NATIVE_INTERFACE,
|
EFI_NATIVE_INTERFACE,
|
||||||
&mLoadPe32PrivateData.Pe32Image
|
&mLoadPe32PrivateData.Pe32Image
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
Reference in New Issue
Block a user