From 3d7b0992fccc89cc049de91d02b4869ec81cf9fb Mon Sep 17 00:00:00 2001 From: lgao4 Date: Fri, 28 Sep 2007 08:14:30 +0000 Subject: 1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain. 2. Add three PeCoff library instances for NT32 PeImage load. 3. Update PeCoffGetEntryPointLib to support TeImage. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3965 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 2 -- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 24 +++--------------------- 2 files changed, 3 insertions(+), 23 deletions(-) (limited to 'MdeModulePkg/Core/DxeIplPeim') diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf index 3267a8cba0..8115a4a310 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf @@ -67,7 +67,6 @@ PeiServicesTablePointerLib CustomDecompressLib UefiDecompressLib - PeCoffLoaderLib CacheMaintenanceLib ReportStatusCodeLib PeiServicesLib @@ -90,7 +89,6 @@ gEfiPeiSectionExtractionPpiGuid # PPI SOMETIMES_CONSUMED gEfiEndOfPeiSignalPpiGuid # PPI SOMETIMES_PRODUCED gEfiDxeIplPpiGuid # PPI SOMETIMES_PRODUCED - gEfiPeiPeCoffLoaderGuid gEfiPeiDecompressPpiGuid gEfiPeiFirmwareVolumeInfoPpiGuid diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index a81475484f..cb13a7d4b0 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -174,7 +174,6 @@ DxeLoadCore ( EFI_PHYSICAL_ADDRESS DxeCoreAddress; UINT64 DxeCoreSize; EFI_PHYSICAL_ADDRESS DxeCoreEntryPoint; - EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader; EFI_BOOT_MODE BootMode; EFI_PEI_FV_HANDLE VolumeHandle; EFI_PEI_FILE_HANDLE FileHandle; @@ -200,12 +199,6 @@ DxeLoadCore ( // Now should have a HOB with the DXE core w/ the old HOB destroyed // } - - // - // Install the PEI Protocols that are shared between PEI and DXE - // - PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *) GetPeCoffLoaderProtocol (); - ASSERT (PeiEfiPeiPeCoffLoader != NULL); // // If any FV contains an encapsulated FV extract that FV @@ -244,14 +237,6 @@ DxeLoadCore ( ); // - // Add HOB for the PE/COFF Loader Protocol - // - BuildGuidDataHob ( - &gEfiPeiPeCoffLoaderGuid, - (VOID *)&PeiEfiPeiPeCoffLoader, - sizeof (VOID *) - ); - // // Report Status Code EFI_SW_PEI_PC_HANDOFF_TO_NEXT // REPORT_STATUS_CODE ( @@ -456,9 +441,6 @@ PeiLoadFile ( EFI_STATUS Status; PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; VOID *Pe32Data; - EFI_PEI_PE_COFF_LOADER_PROTOCOL *PeiEfiPeiPeCoffLoader; - - PeiEfiPeiPeCoffLoader = (EFI_PEI_PE_COFF_LOADER_PROTOCOL *)GetPeCoffLoaderProtocol (); // // First try to find the required section in this ffs file. // @@ -489,7 +471,7 @@ PeiLoadFile ( ASSERT_EFI_ERROR (Status); - Status = PeiEfiPeiPeCoffLoader->GetImageInfo (PeiEfiPeiPeCoffLoader, &ImageContext); + Status = PeCoffLoaderGetImageInfo (&ImageContext); if (EFI_ERROR (Status)) { return Status; } @@ -502,14 +484,14 @@ PeiLoadFile ( // // Load the image to our new buffer // - Status = PeiEfiPeiPeCoffLoader->LoadImage (PeiEfiPeiPeCoffLoader, &ImageContext); + Status = PeCoffLoaderLoadImage (&ImageContext); if (EFI_ERROR (Status)) { return Status; } // // Relocate the image in our new buffer // - Status = PeiEfiPeiPeCoffLoader->RelocateImage (PeiEfiPeiPeCoffLoader, &ImageContext); + Status = PeCoffLoaderRelocateImage (&ImageContext); if (EFI_ERROR (Status)) { return Status; } -- cgit v1.2.3