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
This commit is contained in:
@ -74,6 +74,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Library/CacheMaintenanceLib.h>
|
#include <Library/CacheMaintenanceLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/PeCoffLib.h>
|
#include <Library/PeCoffLib.h>
|
||||||
|
#include <Library/PeCoffGetEntryPointLib.h>
|
||||||
|
#include <Library/PeCoffExtraActionLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
|
@ -82,6 +82,8 @@
|
|||||||
DebugLib
|
DebugLib
|
||||||
DxeCoreEntryPoint
|
DxeCoreEntryPoint
|
||||||
PeCoffLib
|
PeCoffLib
|
||||||
|
PeCoffGetEntryPointLib
|
||||||
|
PeCoffExtraActionLib
|
||||||
ExtractGuidedSectionLib
|
ExtractGuidedSectionLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
|
@ -97,6 +97,8 @@ 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
|
||||||
//
|
//
|
||||||
@ -116,6 +118,14 @@ CoreInitializeImageServices (
|
|||||||
DxeCoreImageLength = DxeCoreHob.MemoryAllocationModule->MemoryAllocationHeader.MemoryLength;
|
DxeCoreImageLength = DxeCoreHob.MemoryAllocationModule->MemoryAllocationHeader.MemoryLength;
|
||||||
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
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user