From d156c2a8a20eb17383cfd7db557db78e48c67791 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Mon, 13 Aug 2007 03:10:28 +0000 Subject: [PATCH] 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 --- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 -- 2.39.2