From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 4C7A921A00AE6 for ; Wed, 12 Sep 2018 06:22:41 -0700 (PDT) Received: by mail-wm0-x244.google.com with SMTP id s12-v6so2411729wmc.0 for ; Wed, 12 Sep 2018 06:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=M/F0h94nHXTs66yCZozaAw+uRiie9rUHqlBLie07EqE=; b=AdcuvErAD2FnGltkGqYTP4D098HsEDPNh47EUUrv7gUd5FTEhfu5caMSImNB8yBV25 88VKDA3Bbzuiw6J+8vJV4oKTQR9Rxldk3HKYEwQDzNLdg4zeb/20WnGqYCzp1QQobCvC uizd4OjSxSI5LlrVF+xMqv7o0SggZI73Z+Jr4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=M/F0h94nHXTs66yCZozaAw+uRiie9rUHqlBLie07EqE=; b=k5KDkmHhS1W5RVsPVgU5ZkwRynqZzfsculNxL5z6LMFtgPGhA4i4PLCi+qlrtMt5TH 2CIcYZrLpZ7rg6379fXmIqrgSH4gufix7uHSo8BUpSH39s4NbZWlMs6UsuBqvvDJT+ii iPPHRbhG2DmgwjZBuAXXJHkLUkD1ryf2JP619B0KF2LuXGpAZyg5BJ8I0bOthGPLISdH RSywczPCaCskPeSdFLQlR685mz9/7kW0Zaj3sm8vY/AdpVxHPhwEPwZLK83GnRz24M06 H8eSts4wE63Qv4BR4OqXlNR+U5s3o1uAEMGLcb5+YwmdkoVVaCIR/CHe6an1aUgMu5cW 69wQ== X-Gm-Message-State: APzg51At3q0uBaoWkkL9E/n2sNeyCJZ8RlRDcSktEui41uHMuJverrUv Hq9+xgWjgDFPNOO9VlUOYUs4Cydm9NPv/A== X-Google-Smtp-Source: ANB0VdaZgdDjRgzeYOXbhOdssSyszPKgRPKvL5tbBFcbzOPtHN7LMBp+VgdPnNhZ0oJIirpRvyut/g== X-Received: by 2002:a1c:1314:: with SMTP id 20-v6mr1643996wmt.55.1536758559032; Wed, 12 Sep 2018 06:22:39 -0700 (PDT) Received: from mba13.kuq.prv ([2001:a62:605:90f4:1f3:d690:1764:36ca]) by smtp.gmail.com with ESMTPSA id e133-v6sm1985129wma.33.2018.09.12.06.22.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 06:22:38 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: agraf@suse.de, Ard Biesheuvel , Zimmer Vincent , Brian Richardson , Michael D Kinney , Andrew Fish , Laszlo Ersek , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni Date: Wed, 12 Sep 2018 15:21:47 +0200 Message-Id: <20180912132151.4258-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Subject: [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 13:22:41 -0000 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 an emulator. One implementation of such an emulator can be found here: https://github.com/ardbiesheuvel/X86EmulatorPkg 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 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 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 -- 2.17.1