From 6b978d166b08cc915eac4f5e93360aba2233cf30 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 6 Nov 2007 10:08:57 +0000 Subject: To find DxeCore by PE32 section is enough, DxeCore can't be wrapped TE section. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4274 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 73d03a4..28c9ece 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -207,7 +207,7 @@ DxeLoadCore ( CopyMem(&DxeCoreFileName, &(((EFI_FFS_FILE_HEADER*)FileHandle)->Name), sizeof (EFI_GUID)); // - // Load the DXE Core from a Firmware Volume + // Load the DXE Core from a Firmware Volume, may use LoadFile ppi to do this for save code size. // Status = PeiLoadFile ( FileHandle, @@ -457,21 +457,13 @@ PeiLoadFile ( PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; VOID *Pe32Data; // - // First try to find the required section in this ffs file. + // First try to find the PE32 section in this ffs file. // Status = PeiServicesFfsFindSectionData ( EFI_SECTION_PE32, FileHandle, &Pe32Data ); - - if (EFI_ERROR (Status)) { - Status = PeiServicesFfsFindSectionData ( - EFI_SECTION_TE, - FileHandle, - &Pe32Data - ); - } if (EFI_ERROR (Status)) { // @@ -497,15 +489,6 @@ PeiLoadFile ( ASSERT (ImageContext.ImageAddress != 0); // - // Skip the reserved space for the stripped PeHeader when load TeImage into memory. - // - if (ImageContext.IsTeImage) { - ImageContext.ImageAddress = ImageContext.ImageAddress + - ((EFI_TE_IMAGE_HEADER *) Pe32Data)->StrippedSize - - sizeof (EFI_TE_IMAGE_HEADER); - } - - // // Load the image to our new buffer // Status = PeCoffLoaderLoadImage (&ImageContext); -- cgit v1.1