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.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 39F662112B1CA for ; Wed, 12 Sep 2018 07:55:43 -0700 (PDT) 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; 12 Sep 2018 07:55:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,365,1531810800"; d="scan'208";a="88141456" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 12 Sep 2018 07:55:42 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Sep 2018 07:55:41 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Sep 2018 07:55:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.143]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Wed, 12 Sep 2018 22:55:39 +0800 From: "Gao, Liming" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Zimmer, Vincent" , "Dong, Eric" , Andrew Fish , "agraf@suse.de" , "Richardson, Brian" , "Kinney, Michael D" , Laszlo Ersek , "Zeng, Star" Thread-Topic: [edk2] [PATCH 0/4] MdeModulePkg: add support for dispatching foreign arch PE/COFF images Thread-Index: AQHUSpu7Ds8w7RDXwEGq7Wdmlrri/KTssDew Date: Wed, 12 Sep 2018 14:55:39 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2F6638@SHSMSX104.ccr.corp.intel.com> References: <20180912132151.4258-1-ard.biesheuvel@linaro.org> In-Reply-To: <20180912132151.4258-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDk1NzRiOTYtYmRiZi00MTIyLWIwZmUtODA5YzUxNDNiYTU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieU9yeEVqUGxiNWlPNTlZaHE0MEUzVWluNXk2R2lcL1FBRFE3NWJiaVRySkxOclE3N2t0OEJDMEpJTlwvYkdiQVhyIn0= 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 0/4] 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: Wed, 12 Sep 2018 14:55:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ard: What's purpose to run the not native image in emulator? And, what should = be done in the emulator driver, such as X64Emulator? Is the emulator respon= sible to translate the instruction between the different arch? I see X64Emu= altor bases on qemu code.=20 Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ar= d Biesheuvel > Sent: Wednesday, September 12, 2018 9:22 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Zimmer, Vincent ; Dong, Eric ; Andrew Fish > ; agraf@suse.de; Richardson, Brian ; Kinney, Michael D > ; Laszlo Ersek ; Zeng, Sta= r > Subject: [edk2] [PATCH 0/4] MdeModulePkg: add support for dispatching for= eign 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 an emulator. >=20 > One implementation of such an emulator can be found here: > https://github.com/ardbiesheuvel/X86EmulatorPkg >=20 > Cc: Zimmer Vincent > Cc: Brian Richardson > Cc: Michael D Kinney > Cc: Andrew Fish > Cc: Laszlo Ersek > Cc: Leif Lindholm > Cc: Star Zeng > Cc: Eric Dong > Cc: Ruiyu Ni >=20 > Ard Biesheuvel (4): > 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 >=20 > MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h | 1 + > MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf | 1 + > .../Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 16 +++++- > MdeModulePkg/Core/Dxe/DxeMain.h | 3 ++ > MdeModulePkg/Core/Dxe/DxeMain.inf | 1 + > MdeModulePkg/Core/Dxe/Image/Image.c | 39 +++++++++++--- > .../Include/Protocol/PeCoffImageEmulator.h | 51 +++++++++++++++++++ > .../Library/UefiBootManagerLib/BmLoadOption.c | 26 +++++++++- > .../Library/UefiBootManagerLib/InternalBm.h | 1 + > .../UefiBootManagerLib/UefiBootManagerLib.inf | 1 + > MdeModulePkg/MdeModulePkg.dec | 4 ++ > 11 files changed, 136 insertions(+), 8 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