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
This commit is contained in:
lgao4 2007-11-06 10:08:57 +00:00
parent 2b993c56f7
commit 6b978d166b
1 changed files with 2 additions and 19 deletions

View File

@ -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,7 +457,7 @@ 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,
@ -465,14 +465,6 @@ PeiLoadFile (
&Pe32Data
);
if (EFI_ERROR (Status)) {
Status = PeiServicesFfsFindSectionData (
EFI_SECTION_TE,
FileHandle,
&Pe32Data
);
}
if (EFI_ERROR (Status)) {
//
// NO image types we support so exit.
@ -496,15 +488,6 @@ PeiLoadFile (
ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize));
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
//