From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::243; helo=mail-it0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 97A9321129447 for ; Tue, 18 Sep 2018 06:53:41 -0700 (PDT) Received: by mail-it0-x243.google.com with SMTP id h3-v6so3280158ita.2 for ; Tue, 18 Sep 2018 06:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QGMp4DYGEFw+Zi8WVf5p1cVCTZaQNkFRJXUcdZYiT5w=; b=VFLwIPuYKcK5IGCDmxBh94vZzPw42xF0N3EEwasREx8omB6fBSA9bdhX+2seb1AitH b36/DUDp1hZC3pAUyu19u2Lf0Zm05DsERP8aAAr0mXspcWqJQSAXB84ybM5wAD2H7AY0 W0bpUe/aL9bOHuk7Jde9PKGAoowrw5IBoCn7g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QGMp4DYGEFw+Zi8WVf5p1cVCTZaQNkFRJXUcdZYiT5w=; b=TdOF7yRppHsFEWd9rOXIITJxM570p7sUHWpFVt7DC1wnwsFtuz+bkOjRlzNVa5ER7k r2nty9wAwrp68Af0EAg4flWyvfAYiPvMA3YxtmGm2yk1vy/RQJcaKms1vdcsoQ7Dd40I LDkLNltJQiwfnGXbwkGKiWjRnhjoxSJOkTpaS2PiNmD/uSR7Vv3WykjOTS1Mc952D1Xq gJ7BZzCT/Zd6UtHzLxGtm5OhGK5jT/t10LaTUuuwbYflRb9UHyj4CRAx9s2X4YaNZja7 ljItGTNQY8QNJSAxSjhUDs10fuidTEybrybe3YphXIMoE7ate6iuDg/aCsflN+3ZnMcR gbQA== X-Gm-Message-State: APzg51BQJD2JTrV46zT8bB6qszS/ARYtoDMwc+D0nVgiTfi75hwLL1sl djnHnEZ3rPjioSv7/iP0hem4f7uZSEuL6rDW+PGcWg== X-Google-Smtp-Source: ANB0VdawvzLMMI1u/1d0WfI32NA595FSK7O+ZiNsfotMq7lZDdUBeh/a63yptkK9ZI59AnduiLRs2+28EC1rxFsNQOU= X-Received: by 2002:a24:57cb:: with SMTP id u194-v6mr16675607ita.148.1537278820391; Tue, 18 Sep 2018 06:53:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Tue, 18 Sep 2018 06:53:39 -0700 (PDT) In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503AD62A6A@shsmsx102.ccr.corp.intel.com> References: <20180915132859.25727-1-ard.biesheuvel@linaro.org> <74D8A39837DF1E4DA445A8C0B3885C503AD62A6A@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Tue, 18 Sep 2018 06:53:39 -0700 Message-ID: To: "Yao, Jiewen" Cc: "edk2-devel@lists.01.org" , "Ni, Ruiyu" , "Zimmer, Vincent" , "Dong, Eric" , Andrew Fish , "Carsey, Jaben" , "Richardson, Brian" , "Gao, Liming" , "Kinney, Michael D" , "Zeng, Star" 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 13:53:41 -0000 Content-Type: text/plain; charset="UTF-8" On 18 September 2018 at 00:32, Yao, Jiewen wrote: > HI Ard > This is a great feature. > Thanks! > May I know what test has been done for this patch series? > > Would you please share that information? No matter your unit test, or system level test. > I have used ArmVirtPkg/ArmVirtQemu.dsc built for AARCH64 in two configurations: - one replacing the native FAT driver built from source with the EBC binary version - another one replacing the FAT driver and including the X86 emulator [0] The tests involved accessing a FAT partition (both builds) and running the X86 version of iPXE (the latter build only) [0] https://github.com/ardbiesheuvel/X86EmulatorPkg >> -----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 >> >> Add the basic plumbing to DXE core, the PCI bus driver and the boot manager >> 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. >> >> One implementation of such an emulator can be found here: >> https://github.com/ardbiesheuvel/X86EmulatorPkg >> >> 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. >> >> 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 >> >> 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 >> >> 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 >> >> 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 >> >> -- >> 2.17.1 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel