From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: liming.gao@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Wed, 08 May 2019 01:23:06 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 01:23:05 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 08 May 2019 01:23:05 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 8 May 2019 01:23:05 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 8 May 2019 01:23:04 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.136]) with mapi id 14.03.0415.000; Wed, 8 May 2019 16:23:02 +0800 From: "Liming Gao" To: "Bi, Dandan" , "Wu, Hao A" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove PcdFrameworkCompatibilitySupport usage Thread-Topic: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove PcdFrameworkCompatibilitySupport usage Thread-Index: AQHU/jGcu0VI2DFpm0+Qb0j4vw3E56Zc0d+AgAAX9wCAAAHVgIAB2RiAgAIs+IA= Date: Wed, 8 May 2019 08:23:01 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E444D12@SHSMSX104.ccr.corp.intel.com> References: <20190429021607.11304-1-dandan.bi@intel.com> <20190429021607.11304-5-dandan.bi@intel.com> <3C0D5C461C9E904E8F62152F6274C0BB40BCF9F0@SHSMSX104.ccr.corp.intel.com> <3C0D5C461C9E904E8F62152F6274C0BB40BD0372@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB40BD0372@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dandan: I am OK to submit the separate BZ to remove the header definition of EFI= _PE32_IMAGE_PROTOCOL.=20 For this patch, the change is good. Reviewed-by: Liming Gao Thanks Liming >-----Original Message----- >From: Bi, Dandan >Sent: Tuesday, May 07, 2019 3:08 PM >To: Wu, Hao A ; devel@edk2.groups.io >Cc: Gao, Liming ; Bi, Dandan >Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove >PcdFrameworkCompatibilitySupport usage > >Hi Hao and Liming, > >Any comments for this patch itself? >As for whether delete the header definition of EFI_PE32_IMAGE_PROTOCOL , >it is another topic. Liming, do you have any comments on this one? > >Thanks, >Dandan >> -----Original Message----- >> From: Wu, Hao A >> Sent: Monday, May 6, 2019 10:55 AM >> To: Bi, Dandan ; devel@edk2.groups.io >> Cc: Gao, Liming >> Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove >> PcdFrameworkCompatibilitySupport usage >> >> > -----Original Message----- >> > From: Bi, Dandan >> > Sent: Monday, May 06, 2019 10:48 AM >> > To: Wu, Hao A; devel@edk2.groups.io >> > Cc: Gao, Liming; Bi, Dandan >> > Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove >> > PcdFrameworkCompatibilitySupport usage >> > >> > > -----Original Message----- >> > > From: Wu, Hao A >> > > Sent: Monday, May 6, 2019 9:23 AM >> > > To: devel@edk2.groups.io; Bi, Dandan >> > > Cc: Gao, Liming >> > > Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove >> > > PcdFrameworkCompatibilitySupport usage >> > > >> > > > -----Original Message----- >> > > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On >Behalf >> > > > Of Dandan Bi >> > > > Sent: Monday, April 29, 2019 10:16 AM >> > > > To: devel@edk2.groups.io >> > > > Cc: Gao, Liming >> > > > Subject: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove >> > > > PcdFrameworkCompatibilitySupport usage >> > > > >> > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1464 >> > > > >> > > > Currently Framework compatibility is not needed and >> > > > PcdFrameworkCompatibilitySupport will be removed from edk2. >> > > > So remove the usage of this PCD firstly. >> > > > >> > > > Cc: Liming Gao >> > > > Signed-off-by: Dandan Bi >> > > > --- >> > > > MdeModulePkg/Core/Dxe/DxeMain.inf | 6 +- >> > > > MdeModulePkg/Core/Dxe/Image/Image.c | 132 >> > > > +--------------------------- MdeModulePkg/Core/Dxe/Image/Image.h >> > > > +| >> > > > 85 +----------------- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 65 >> > > > ---------- >> > > ---- >> > > > MdeModulePkg/Core/Pei/PeiMain.inf | 1 - >> > > > 5 files changed, 3 insertions(+), 286 deletions(-) >> > > > >> > > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf >> > > > b/MdeModulePkg/Core/Dxe/DxeMain.inf >> > > > index 8dee5bee0a..61161bee28 100644 >> > > > --- a/MdeModulePkg/Core/Dxe/DxeMain.inf >> > > > +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf >> > > > @@ -1,11 +1,11 @@ >> > > > ## @file >> > > > # This is core module in DXE phase. >> > > > # >> > > > # It provides an implementation of DXE Core that is compliant >> > > > with DXE >> > CIS. >> > > > # >> > > > -# Copyright (c) 2006 - 2018, Intel Corporation. All rights >> > > > reserved.
>> > > > +# Copyright (c) 2006 - 2019, Intel Corporation. All rights >> > > > +reserved.
>> > > > # SPDX-License-Identifier: BSD-2-Clause-Patent # ## >> > > > >> > > > [Defines] >> > > > @@ -130,11 +130,10 @@ >> > > > >> > > > [Protocols] >> > > > ## PRODUCES >> > > > ## SOMETIMES_CONSUMES >> > > > gEfiDecompressProtocolGuid >> > > > - gEfiLoadPeImageProtocolGuid ## SOMETIMES_PRO= DUCES >> # >> > > > Produces when PcdFrameworkCompatibilitySupport is set >> > > >> > > A couple of questions. >> > > >> > > Is '#include ' in >> > > MdeModulePkg\Core\Dxe\DxeMain.h still needed? >> > > >> > > Can we remove EFI_PE32_IMAGE_PROTOCOL altogether? Seems to me >> there >> > > is no other consumer within edk2. >> > > >> > > Best Regards, >> > > Hao Wu >> > >> > Hi Hao, >> > >> > 1. Yes, since following definitions in ar= e >> > still used in MdeModulePkg\Core\Dxe\Image\Image.c >> > #define EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION >> > 0x01 >> > #define >> > >> EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRA >> TIO >> > N 0x02 >> >> OK. I overlooked that these definitions are still being used. >> >> > >> > 2. I also think we can remove this protocol, but I prefer a separate >> > patch (not covered by this patch series) to remove it and solve the >> > dependency issue in 1 together. Is it OK to you? >> >> As point 1 mentioned above, I think the protocol should be kept to pres= erve >> the definitions. >> >> Maybe Liming will have some comments on this. >> >> Best Regards, >> Hao Wu >> >> > >> > Thanks, >> > Dandan >> > > >> > > > gEfiSimpleFileSystemProtocolGuid ## >SOMETIMES_CONSUMES >> > > > gEfiLoadFileProtocolGuid ## SOMETIMES_CON= SUMES >> > > > gEfiLoadFile2ProtocolGuid ## SOMETIMES_CON= SUMES >> > > > gEfiBusSpecificDriverOverrideProtocolGuid ## >> > SOMETIMES_CONSUMES >> > > > gEfiDriverFamilyOverrideProtocolGuid ## >> SOMETIMES_CONSUMES >> > > > @@ -171,13 +170,10 @@ >> > > > gEfiVariableWriteArchProtocolGuid ## CONSUMES >> > > > gEfiVariableArchProtocolGuid ## CONSUMES >> > > > gEfiCapsuleArchProtocolGuid ## CONSUMES >> > > > gEfiWatchdogTimerArchProtocolGuid ## CONSUMES >> > > > >> > > > -[FeaturePcd] >> > > > - >> > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport >> > > > ## CONSUMES >> > > > - >> > > > [Pcd] >> > > > >> > > > >> > > >> >gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePage >> > > Nu >> > > > mber ## SOMETIMES_CONSUMES >> > > > >> > > > >> > > >> >gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageN >> > > um >> > > > ber ## SOMETIMES_CONSUMES >> > > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable >> > > > ## CONSUMES >> > > > >> > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxEfiSystemTablePointerAddress >> > > > ## CONSUMES >> > > > diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c >> > > > b/MdeModulePkg/Core/Dxe/Image/Image.c >> > > > index de5b8bed27..22a87ecf6d 100644 >> > > > --- a/MdeModulePkg/Core/Dxe/Image/Image.c >> > > > +++ b/MdeModulePkg/Core/Dxe/Image/Image.c >> > > > @@ -1,9 +1,9 @@ >> > > > /** @file >> > > > Core image handling services to load and unload PeImage. >> > > > >> > > > -Copyright (c) 2006 - 2018, Intel Corporation. All rights >> > > > reserved.
>> > > > +Copyright (c) 2006 - 2019, Intel Corporation. All rights >> > > > +reserved.
>> > > > SPDX-License-Identifier: BSD-2-Clause-Patent >> > > > >> > > > **/ >> > > > >> > > > #include "DxeMain.h" >> > > > @@ -12,19 +12,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >> > > > // // Module Globals // LOADED_IMAGE_PRIVATE_DATA >> > > > *mCurrentImage >> > > =3D >> > > > NULL; >> > > > >> > > > -LOAD_PE32_IMAGE_PRIVATE_DATA mLoadPe32PrivateData =3D { >> > > > - LOAD_PE32_IMAGE_PRIVATE_DATA_SIGNATURE, >> > > > - NULL, >> > > > - { >> > > > - CoreLoadImageEx, >> > > > - CoreUnloadImageEx >> > > > - } >> > > > -}; >> > > > - >> > > > typedef struct { >> > > > LIST_ENTRY Link; >> > > > EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL *Emulator; >> > > > UINT16 MachineType; >> > > > } EMULATOR_ENTRY; >> > > > @@ -274,22 +265,10 @@ CoreInitializeImageServices ( >> > > > ); >> > > > ASSERT_EFI_ERROR(Status); >> > > > >> > > > InitializeListHead (&mAvailableEmulators); >> > > > >> > > > - if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) { >> > > > - // >> > > > - // Export DXE Core PE Loader functionality for backward >compatibility. >> > > > - // >> > > > - Status =3D CoreInstallProtocolInterface ( >> > > > - &mLoadPe32PrivateData.Handle, >> > > > - &gEfiLoadPeImageProtocolGuid, >> > > > - EFI_NATIVE_INTERFACE, >> > > > - &mLoadPe32PrivateData.Pe32Image >> > > > - ); >> > > > - } >> > > > - >> > > > ProtectUefiImage (&Image->Info, Image->LoadedImageDevicePath); >> > > > >> > > > return Status; >> > > > } >> > > > >> > > > @@ -1564,96 +1543,10 @@ CoreLoadImage ( >> > > > PERF_LOAD_IMAGE_END (Handle); >> > > > >> > > > return Status; >> > > > } >> > > > >> > > > - >> > > > - >> > > > -/** >> > > > - Loads an EFI image into memory and returns a handle to the >> > > > image with extended parameters. >> > > > - >> > > > - @param This Calling context >> > > > - @param ParentImageHandle The caller's image handle. >> > > > - @param FilePath The specific file path from wh= ich the image >> is >> > > > - loaded. >> > > > - @param SourceBuffer If not NULL, a pointer to the = memory >> > > location >> > > > - containing a copy of the image= to be loaded. >> > > > - @param SourceSize The size in bytes of SourceBuf= fer. >> > > > - @param DstBuffer The buffer to store the image. >> > > > - @param NumberOfPages For input, specifies the space= size of >> the >> > > > - image by caller if not NULL. F= or output, >> > > > - specifies the actual space siz= e needed. >> > > > - @param ImageHandle Image handle for output. >> > > > - @param EntryPoint Image entry point for output. >> > > > - @param Attribute The bit mask of attributes to = set for the >> load >> > > > - PE image. >> > > > - >> > > > - @retval EFI_SUCCESS The image was loaded into memo= ry. >> > > > - @retval EFI_NOT_FOUND The FilePath was not found. >> > > > - @retval EFI_INVALID_PARAMETER One of the parameters has an >> invalid >> > > > value. >> > > > - @retval EFI_UNSUPPORTED The image type is not supporte= d, or >> the >> > > > device >> > > > - path cannot be parsed to locat= e the proper >> > > > - protocol for loading the file. >> > > > - @retval EFI_OUT_OF_RESOURCES Image was not loaded due to >> > > insufficient >> > > > - resources. >> > > > - @retval EFI_LOAD_ERROR Image was not loaded because t= he >> > image >> > > > format was corrupt or not >> > > > - understood. >> > > > - @retval EFI_DEVICE_ERROR Image was not loaded because t= he >> > > device >> > > > returned a read error. >> > > > - @retval EFI_ACCESS_DENIED Image was not loaded because t= he >> > > platform >> > > > policy prohibits the >> > > > - image from being loaded. NULL = is returned in >> > > > *ImageHandle. >> > > > - @retval EFI_SECURITY_VIOLATION Image was loaded and an >> > > ImageHandle >> > > > was created with a >> > > > - valid EFI_LOADED_IMAGE_PROTOCO= L. However, the >> > > > current >> > > > - platform policy specifies that= the image should not >be >> > > > started. >> > > > - >> > > > -**/ >> > > > -EFI_STATUS >> > > > -EFIAPI >> > > > -CoreLoadImageEx ( >> > > > - IN EFI_PE32_IMAGE_PROTOCOL *This, >> > > > - IN EFI_HANDLE ParentImageHandle, >> > > > - IN EFI_DEVICE_PATH_PROTOCOL *FilePath, >> > > > - IN VOID *SourceBuffer OPTIO= NAL, >> > > > - IN UINTN SourceSize, >> > > > - IN EFI_PHYSICAL_ADDRESS DstBuffer OPTIO= NAL, >> > > > - OUT UINTN *NumberOfPages OPTIO= NAL, >> > > > - OUT EFI_HANDLE *ImageHandle, >> > > > - OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIO= NAL, >> > > > - IN UINT32 Attribute >> > > > - ) >> > > > -{ >> > > > - EFI_STATUS Status; >> > > > - EFI_HANDLE Handle; >> > > > - >> > > > - PERF_LOAD_IMAGE_BEGIN (NULL); >> > > > - >> > > > - Status =3D CoreLoadImageCommon ( >> > > > - TRUE, >> > > > - ParentImageHandle, >> > > > - FilePath, >> > > > - SourceBuffer, >> > > > - SourceSize, >> > > > - DstBuffer, >> > > > - NumberOfPages, >> > > > - ImageHandle, >> > > > - EntryPoint, >> > > > - Attribute >> > > > - ); >> > > > - >> > > > - Handle =3D NULL; >> > > > - if (!EFI_ERROR (Status)) { >> > > > - // >> > > > - // ImageHandle will be valid only Status is success. >> > > > - // >> > > > - Handle =3D *ImageHandle; >> > > > - } >> > > > - >> > > > - PERF_LOAD_IMAGE_END (Handle); >> > > > - >> > > > - return Status; >> > > > -} >> > > > - >> > > > - >> > > > /** >> > > > Transfer control to a loaded image's entry point. >> > > > >> > > > @param ImageHandle Handle of image to be started. >> > > > @param ExitDataSize Pointer of the size to ExitDat= a >> > > > @@ -2010,28 +1903,5 @@ CoreUnloadImage ( >> > > > } >> > > > >> > > > Done: >> > > > return Status; >> > > > } >> > > > - >> > > > - >> > > > - >> > > > -/** >> > > > - Unload the specified image. >> > > > - >> > > > - @param This Indicates the calling context. >> > > > - @param ImageHandle The specified image handle. >> > > > - >> > > > - @retval EFI_INVALID_PARAMETER Image handle is NULL. >> > > > - @retval EFI_UNSUPPORTED Attempt to unload an unsupport= ed >> > > image. >> > > > - @retval EFI_SUCCESS Image successfully unloaded. >> > > > - >> > > > -**/ >> > > > -EFI_STATUS >> > > > -EFIAPI >> > > > -CoreUnloadImageEx ( >> > > > - IN EFI_PE32_IMAGE_PROTOCOL *This, >> > > > - IN EFI_HANDLE ImageHandle >> > > > - ) >> > > > -{ >> > > > - return CoreUnloadImage (ImageHandle); -} diff --git >> > > > a/MdeModulePkg/Core/Dxe/Image/Image.h >> > > > b/MdeModulePkg/Core/Dxe/Image/Image.h >> > > > index 6020a27371..e9c44ab2a7 100644 >> > > > --- a/MdeModulePkg/Core/Dxe/Image/Image.h >> > > > +++ b/MdeModulePkg/Core/Dxe/Image/Image.h >> > > > @@ -1,30 +1,17 @@ >> > > > /** @file >> > > > Data structure and functions to load and unload PeImage. >> > > > >> > > > -Copyright (c) 2006 - 2018, Intel Corporation. All rights >> > > > reserved.
>> > > > +Copyright (c) 2006 - 2019, Intel Corporation. All rights >> > > > +reserved.
>> > > > SPDX-License-Identifier: BSD-2-Clause-Patent >> > > > >> > > > **/ >> > > > >> > > > >> > > > #ifndef _IMAGE_H_ >> > > > #define _IMAGE_H_ >> > > > >> > > > -#define LOAD_PE32_IMAGE_PRIVATE_DATA_SIGNATURE >> > > > SIGNATURE_32('l','p','e','i') >> > > > - >> > > > -typedef struct { >> > > > - UINTN Signature; >> > > > - /// Image handle >> > > > - EFI_HANDLE Handle; >> > > > - EFI_PE32_IMAGE_PROTOCOL Pe32Image; >> > > > -} LOAD_PE32_IMAGE_PRIVATE_DATA; >> > > > - >> > > > -#define LOAD_PE32_IMAGE_PRIVATE_DATA_FROM_THIS(a) \ >> > > > - CR(a, LOAD_PE32_IMAGE_PRIVATE_DATA, Pe32Image, >> > > > LOAD_PE32_IMAGE_PRIVATE_DATA_SIGNATURE) >> > > > - >> > > > - >> > > > // >> > > > // Private Data Types >> > > > // >> > > > #define IMAGE_FILE_HANDLE_SIGNATURE >> SIGNATURE_32('i','m','g','f') >> > > > typedef struct { >> > > > @@ -32,76 +19,6 @@ typedef struct { >> > > > BOOLEAN FreeBuffer; >> > > > VOID *Source; >> > > > UINTN SourceSize; >> > > > } IMAGE_FILE_HANDLE; >> > > > >> > > > -/** >> > > > - Loads an EFI image into memory and returns a handle to the >> > > > image with extended parameters. >> > > > - >> > > > - @param This Calling context >> > > > - @param ParentImageHandle The caller's image handle. >> > > > - @param FilePath The specific file path from wh= ich the image >> is >> > > > - loaded. >> > > > - @param SourceBuffer If not NULL, a pointer to the = memory >> > > location >> > > > - containing a copy of the image= to be loaded. >> > > > - @param SourceSize The size in bytes of SourceBuf= fer. >> > > > - @param DstBuffer The buffer to store the image. >> > > > - @param NumberOfPages For input, specifies the space= size of >> the >> > > > - image by caller if not NULL. F= or output, >> > > > - specifies the actual space siz= e needed. >> > > > - @param ImageHandle Image handle for output. >> > > > - @param EntryPoint Image entry point for output. >> > > > - @param Attribute The bit mask of attributes to = set for the >> load >> > > > - PE image. >> > > > - >> > > > - @retval EFI_SUCCESS The image was loaded into memo= ry. >> > > > - @retval EFI_NOT_FOUND The FilePath was not found. >> > > > - @retval EFI_INVALID_PARAMETER One of the parameters has an >> invalid >> > > > value. >> > > > - @retval EFI_UNSUPPORTED The image type is not supporte= d, or >> the >> > > > device >> > > > - path cannot be parsed to locat= e the proper >> > > > - protocol for loading the file. >> > > > - @retval EFI_OUT_OF_RESOURCES Image was not loaded due to >> > > insufficient >> > > > - resources. >> > > > - @retval EFI_LOAD_ERROR Image was not loaded because t= he >> > image >> > > > format was corrupt or not >> > > > - understood. >> > > > - @retval EFI_DEVICE_ERROR Image was not loaded because t= he >> > > device >> > > > returned a read error. >> > > > - @retval EFI_ACCESS_DENIED Image was not loaded because t= he >> > > platform >> > > > policy prohibits the >> > > > - image from being loaded. NULL = is returned in >> > > > *ImageHandle. >> > > > - @retval EFI_SECURITY_VIOLATION Image was loaded and an >> > > ImageHandle >> > > > was created with a >> > > > - valid EFI_LOADED_IMAGE_PROTOCO= L. However, the >> > > > current >> > > > - platform policy specifies that= the image should not >be >> > > > started. >> > > > - >> > > > -**/ >> > > > -EFI_STATUS >> > > > -EFIAPI >> > > > -CoreLoadImageEx ( >> > > > - IN EFI_PE32_IMAGE_PROTOCOL *This, >> > > > - IN EFI_HANDLE ParentImageHandle, >> > > > - IN EFI_DEVICE_PATH_PROTOCOL *FilePath, >> > > > - IN VOID *SourceBuffer OPTIO= NAL, >> > > > - IN UINTN SourceSize, >> > > > - IN EFI_PHYSICAL_ADDRESS DstBuffer OPTIO= NAL, >> > > > - OUT UINTN *NumberOfPages OPTIO= NAL, >> > > > - OUT EFI_HANDLE *ImageHandle, >> > > > - OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIO= NAL, >> > > > - IN UINT32 Attribute >> > > > - ); >> > > > - >> > > > - >> > > > -/** >> > > > - Unload the specified image. >> > > > - >> > > > - @param This Indicates the calling context. >> > > > - @param ImageHandle The specified image handle. >> > > > - >> > > > - @retval EFI_INVALID_PARAMETER Image handle is NULL. >> > > > - @retval EFI_UNSUPPORTED Attempt to unload an unsupport= ed >> > > image. >> > > > - @retval EFI_SUCCESS Image successfully unloaded. >> > > > - >> > > > -**/ >> > > > -EFI_STATUS >> > > > -EFIAPI >> > > > -CoreUnloadImageEx ( >> > > > - IN EFI_PE32_IMAGE_PROTOCOL *This, >> > > > - IN EFI_HANDLE ImageHandle >> > > > - ); >> > > > #endif >> > > > diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c >> > > > b/MdeModulePkg/Core/Pei/FwVol/FwVol.c >> > > > index f817ba04e2..709db00694 100644 >> > > > --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c >> > > > +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c >> > > > @@ -1092,19 +1092,10 @@ PeiFfsFindNextFile ( { >> > > > PEI_CORE_FV_HANDLE *CoreFvHandle; >> > > > >> > > > CoreFvHandle =3D FvHandleToCoreHandle (FvHandle); >> > > > >> > > > - // >> > > > - // To make backward compatiblity, if can not find correspondin= g >> > > > the handle of FV >> > > > - // then treat FV as build-in FFS2/FFS3 format and memory mappe= d >> > > > FV that FV handle is pointed >> > > > - // to the address of first byte of FV. >> > > > - // >> > > > - if ((CoreFvHandle =3D=3D NULL) && FeaturePcdGet >> > > > (PcdFrameworkCompatibilitySupport)) { >> > > > - return FindFileEx (FvHandle, NULL, SearchType, FileHandle, N= ULL); >> > > > - } >> > > > - >> > > > if ((CoreFvHandle =3D=3D NULL) || CoreFvHandle->FvPpi =3D=3D N= ULL) { >> > > > return EFI_NOT_FOUND; >> > > > } >> > > > >> > > > return CoreFvHandle->FvPpi->FindFileByType >> > > > (CoreFvHandle->FvPpi, SearchType, FvHandle, FileHandle); @@ >> > > > -2109,66 +2100,10 @@ PEI_CORE_FV_HANDLE * >> FindNextCoreFvHandle ( >> > > > IN PEI_CORE_INSTANCE *Private, >> > > > IN UINTN Instance >> > > > ) >> > > > { >> > > > - UINTN Index; >> > > > - BOOLEAN Match; >> > > > - EFI_HOB_FIRMWARE_VOLUME *FvHob; >> > > > - >> > > > - // >> > > > - // Handle Framework FvHob and Install FvInfo Ppi for it. >> > > > - // >> > > > - if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) { >> > > > - // >> > > > - // Loop to search the wanted FirmwareVolume which supports F= FS >> > > > - // >> > > > - FvHob =3D (EFI_HOB_FIRMWARE_VOLUME *)GetFirstHob >> > > (EFI_HOB_TYPE_FV); >> > > > - while (FvHob !=3D NULL) { >> > > > - // >> > > > - // Search whether FvHob has been installed into PeiCore's = FV >> database. >> > > > - // If found, no need install new FvInfoPpi for it. >> > > > - // >> > > > - for (Index =3D 0, Match =3D FALSE; Index < Private->FvCoun= t; Index++) >{ >> > > > - if ((EFI_PEI_FV_HANDLE)(UINTN)FvHob->BaseAddress =3D=3D >Private- >> > > > >Fv[Index].FvHeader) { >> > > > - Match =3D TRUE; >> > > > - break; >> > > > - } >> > > > - } >> > > > - >> > > > - // >> > > > - // Search whether FvHob has been cached into PeiCore's Unk= nown >> FV >> > > > database. >> > > > - // If found, no need install new FvInfoPpi for it. >> > > > - // >> > > > - if (!Match) { >> > > > - for (Index =3D 0; Index < Private->UnknownFvInfoCount; I= ndex ++) >{ >> > > > - if ((UINTN)FvHob->BaseAddress =3D=3D (UINTN)Private- >> > > > >UnknownFvInfo[Index].FvInfo) { >> > > > - Match =3D TRUE; >> > > > - break; >> > > > - } >> > > > - } >> > > > - } >> > > > - >> > > > - // >> > > > - // If the Fv in FvHob has not been installed into PeiCore'= s FV >> database >> > > and >> > > > has >> > > > - // not been cached into PeiCore's Unknown FV database, ins= tall a >> new >> > > > FvInfoPpi >> > > > - // for it then PeiCore will dispatch it in callback of FvI= nfoPpi. >> > > > - // >> > > > - if (!Match) { >> > > > - PeiServicesInstallFvInfoPpi ( >> > > > - &(((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)FvHob- >> > > >BaseAddress)- >> > > > >FileSystemGuid), >> > > > - (VOID *)(UINTN)FvHob->BaseAddress, >> > > > - (UINT32)FvHob->Length, >> > > > - NULL, >> > > > - NULL >> > > > - ); >> > > > - } >> > > > - >> > > > - FvHob =3D (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob >> > > > (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob- >> > > >Header.HobLength)); >> > > > - } >> > > > - } >> > > > - >> > > > if (Instance >=3D Private->FvCount) { >> > > > return NULL; >> > > > } >> > > > >> > > > return &Private->Fv[Instance]; >> > > > diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf >> > > > b/MdeModulePkg/Core/Pei/PeiMain.inf >> > > > index c8a6d5b80b..7c482dacfc 100644 >> > > > --- a/MdeModulePkg/Core/Pei/PeiMain.inf >> > > > +++ b/MdeModulePkg/Core/Pei/PeiMain.inf >> > > > @@ -100,11 +100,10 @@ >> > > > gEfiPeiCoreFvLocationPpiGuid ## SOMETIMES_CON= SUMES >> > > > >> > > > [Pcd] >> > > > gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize >> > > > ## CONSUMES >> > > > >> > > > >> > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSecti >> > > onFi >> > > > rst ## CONSUMES >> > > > - >> > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport >> > > > ## CONSUMES >> > > > >> > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressPeiCodePageNumb >> > > er >> > > > ## SOMETIMES_CONSUMES >> > > > >> > > > >> > > >> >gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePage >> > > Nu >> > > > mber ## SOMETIMES_CONSUMES >> > > > >> > > > >> > > >> >gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageN >> > > um >> > > > ber ## SOMETIMES_CONSUMES >> > > > >> gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable >> > > > ## CONSUMES >> > > > gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnS3Boot >> > > > ## CONSUMES >> > > > -- >> > > > 2.18.0.windows.1 >> > > > >> > > > >> > > >=20