From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E3F382113DA2A for ; Tue, 18 Sep 2018 00:32:49 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2018 00:32:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="73884735" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 18 Sep 2018 00:32:38 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 00:32:37 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Sep 2018 00:32:37 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.226]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Tue, 18 Sep 2018 15:32:30 +0800 From: "Yao, Jiewen" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Zimmer, Vincent" , "Dong, Eric" , Andrew Fish , "Carsey, Jaben" , "Richardson, Brian" , "Gao, Liming" , "Kinney, Michael D" , "Zeng, Star" Thread-Topic: [edk2] [PATCH v2 0/7] MdeModulePkg: add support for dispatching foreign arch PE/COFF images Thread-Index: AQHUTPgb78b5a3jcP0GDpiWeAuM4+qT1qROA Date: Tue, 18 Sep 2018 07:32:29 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AD62A6A@shsmsx102.ccr.corp.intel.com> References: <20180915132859.25727-1-ard.biesheuvel@linaro.org> In-Reply-To: <20180915132859.25727-1-ard.biesheuvel@linaro.org> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODYxZGNhN2QtODg4NS00ZDkzLTgzMjEtZmM4NjA4ZDEzNzdlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNXB2cGlcL2pITXg4ZHljY1c2UXhEUGdjbEx0SzI2d3gxZ2M5amxOQjgwdWtQVlc1Sldua3o0amJ0bmpVYkFRaUMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 0/7] MdeModulePkg: add support for dispatching foreign arch PE/COFF images X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2018 07:32:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable HI Ard This is a great feature. May I know what test has been done for this patch series? Would you please share that information? No matter your unit test, or syste= m level test. Thank you Yao Jiewen > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Ard Biesheuvel > Sent: Saturday, September 15, 2018 9:29 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Zimmer, Vincent > ; Dong, Eric ; Andrew > Fish ; Carsey, Jaben ; > Richardson, Brian ; Gao, Liming > ; Kinney, Michael D ; > Zeng, Star > Subject: [edk2] [PATCH v2 0/7] MdeModulePkg: add support for dispatching > foreign arch PE/COFF images >=20 > Add the basic plumbing to DXE core, the PCI bus driver and the boot manag= er > to allow PE/COFF images to be dispatched that target an architecture that= is > not native for the platform, but which is supported by one of potentially > several available emulators. >=20 > One implementation of such an emulator can be found here: > https://github.com/ardbiesheuvel/X86EmulatorPkg >=20 > This also allows us to get rid of the special treatment of EBC images in > core code. Instead, the EbcDxe driver is augmented with an implementation > of the EDK2 PE/COFF image emulator so that internal knowledge of how EBC > is implemented (I-cache flushing, thunks) is removed from the DXE core. >=20 > Changes since v2: > - subsume the EBC handling into the EDK2 emulator protocol and abstract > away from EBC specifics in core code. > - allow multiple emulator implementations to co-exist > - incorporate Star's review feedback >=20 > Cc: Vincent Zimmer > Cc: Brian Richardson > Cc: Michael D Kinney > Cc: Andrew Fish > Cc: Leif Lindholm > Cc: Star Zeng > Cc: Eric Dong > Cc: Ruiyu Ni > Cc: Liming Gao > Cc: Jaben Carsey > Cc: Steven Shi >=20 > Ard Biesheuvel (7): > MdeModulePkg: introduce PE/COFF image emulator protocol > MdeModulePkg/DxeCore: invoke the emulator protocol for foreign > images > MdeModulePkg/PciBusDxe: invoke PE/COFF emulator for foreign option > ROMs > MdeModulePkg/UefiBootManagerLib: allow foreign Driver#### images > MdeModulePkg/EbcDxe: implement the PE/COFF emulator protocol > MdePkg/UefiBaseType.h: treat EBC as a non-native machine type > MdeModulePkg/DxeCore: remove explicit EBC handling >=20 > MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h | 1 + > MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf | 1 + > .../Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 51 ++++++- > MdeModulePkg/Core/Dxe/DxeMain.h | 6 +- > MdeModulePkg/Core/Dxe/DxeMain.inf | 2 +- > MdeModulePkg/Core/Dxe/Image/Image.c | 141 > +++++++++++------- > .../Include/Protocol/PeCoffImageEmulator.h | 99 ++++++++++++ > .../Library/UefiBootManagerLib/BmLoadOption.c | 51 ++++++- > .../Library/UefiBootManagerLib/InternalBm.h | 1 + > .../UefiBootManagerLib/UefiBootManagerLib.inf | 1 + > MdeModulePkg/MdeModulePkg.dec | 4 + > MdeModulePkg/Universal/EbcDxe/EbcDxe.inf | 3 + > MdeModulePkg/Universal/EbcDxe/EbcInt.c | 124 > +++++++++++++++ > MdeModulePkg/Universal/EbcDxe/EbcInt.h | 3 + > MdePkg/Include/Uefi/UefiBaseType.h | 8 +- > 15 files changed, 432 insertions(+), 64 deletions(-) > create mode 100644 > MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h >=20 > -- > 2.17.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel