From: qwang12 Date: Mon, 13 Aug 2007 03:10:28 +0000 (+0000) Subject: Change the behavior of DxeIplLoadFile to load EFI_SECTION_TE first. If failed, LOAD... X-Git-Tag: edk2-stable201903~22343 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d156c2a8a20eb17383cfd7db557db78e48c67791 Change the behavior of DxeIplLoadFile to load EFI_SECTION_TE first. If failed, LOAD EFI_SECTION_PE32. For our implementation, some PEIM who require to shadow itself is in TE format. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3618 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 901b061973..7ec7d52039 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -593,15 +593,23 @@ Returns: // Preprocess the FFS file to get a pointer to the PE32 information // in the enclosed PE32 image. // - Status = PeiProcessFile ( - EFI_SECTION_PE32, + Status = PeiProcessFile ( + EFI_SECTION_TE, FfsHeader, &Pe32Data, NULL ); - if (EFI_ERROR (Status)) { - return Status; + Status = PeiProcessFile ( + EFI_SECTION_PE32, + FfsHeader, + &Pe32Data, + NULL + ); + + if (EFI_ERROR (Status)) { + return Status; + } } // // Load the PE image from the FFS file