From 8c519a565d02419ac325bef58bb63a974bbab1bd Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Tue, 11 Aug 2009 15:45:16 +0000 Subject: [PATCH] 1. Update IA32 PeiCore implementation to support load x64 image for EFI_PEI_LOAD_FILE_PPI. 2. Simplify the implementation of PeiLoadImage() in PeiCore to skip the function call of PeiLoadImageLoadImage() because PeiCore itself produce one instance of EFI_PEI_LOAD_FILE_PPI. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9045 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/Image/Image.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index 0ef19952a0..03e1d86ad7 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -1,7 +1,7 @@ /** @file Pei Core Load Image Support -Copyright (c) 2006 - 2008, Intel Corporation +Copyright (c) 2006 - 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -287,7 +287,9 @@ PeiLoadImageLoadImage ( Machine = PeCoffLoaderGetMachineType (Pe32Data); if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Machine)) { - return EFI_UNSUPPORTED; + if (!EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED (Machine)) { + return EFI_UNSUPPORTED; + } } if (ImageAddressArg != NULL) { @@ -438,19 +440,7 @@ PeiLoadImage ( Index++; } while (!EFI_ERROR (PpiStatus)); - // - // If no instances reports EFI_SUCCESS, then build-in support for - // the PE32+/TE XIP image format is used. - // - Status = PeiLoadImageLoadImage ( - PeiServices, - FileHandle, - NULL, - NULL, - EntryPoint, - AuthenticationState - ); - return Status; + return PpiStatus; }