From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::544; helo=mail-pg1-x544.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (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 89351211E011B for ; Sun, 31 Mar 2019 20:27:30 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id z9so3996765pgu.10 for ; Sun, 31 Mar 2019 20:27:30 -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:in-reply-to:references; bh=xM4ttDr0FC3tm4+Ki+HNyFrnkjWXEw61mH+nCchvQJs=; b=LgFn0eh1F6hvzDav5jcJfg6zpAaW5cxAATWzWCrV88TCodOMxCjbB1ecP5lLeZAGu/ d1Lsiy6GB0+TUt8PTVKVhJmZxjTqIconrjOrFnEbyZN4DwsAEtWUs7MH+cGdc/cfc2kb dBr4uCqumx9yXbgxxlmbXUeLrRVPjgolg96Ud89P4nz+WdW86Yn/LtpOpjwM+hwcJ+w4 gyv4Kf1sERIEy8zfXlTfKzkbh8FQs1Z//zKtB4Kx5dwYgggCczbY9YVyItm7Gm4p/aA/ 3va0oLxB0XPFktvCttTJMjbJV1EQMtajXmFm6xIl6wKqoPa5ob4ZQKLxJ8KrRqZ1D4uV Eicw== 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:in-reply-to :references; bh=xM4ttDr0FC3tm4+Ki+HNyFrnkjWXEw61mH+nCchvQJs=; b=OlnOKc8vQAhNZnN81cBx62mOtau7/l6zHeaA6YeTLF1miatvORcV3fn7s5YtTAcJWL rgPiEAYl1z/6mutF1OCsY007HPFwJNh0sHN+qxtbgf2jYg/P4GGkInsiEwKbTJAuAFqt ah9Feb9fsA1WEtJImcpV29O7eRas87x+Wn1snXtLXrL7T9LBhZzRfWKYbizDS7cIRLjS sYfesDYuDBzTNDDL/FzcDWNR7qphuf9LBy9AUNMSE+S6lrPooxc+W2NbnlM4CibkMB1r bvIcbaphd7cWB4amSotDgMwggQxL/l+623khF7K1NfoNz9WuPKuVRR4taZL/EgnrxzjI 5WdQ== X-Gm-Message-State: APjAAAUgdOSC5p5OlcQioleiHQcJeriVWBUlpCBQD4nt3ONsSP5mu155 bmGnXnAyGFTknMsYL/rW+gklDQU2p4Frpw== X-Google-Smtp-Source: APXvYqzsbKFBpRe5bMwczXmQ97gjB+tSxXg3NbB4mh0jeP2gR6vzfzN2O3wA4usrI/SL/go803dJOQ== X-Received: by 2002:a62:4481:: with SMTP id m1mr61366691pfi.253.1554089249722; Sun, 31 Mar 2019 20:27:29 -0700 (PDT) Received: from mba13.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id 16sm12758092pfz.106.2019.03.31.20.27.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 20:27:29 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Vincent Zimmer , Brian Richardson , Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi Date: Mon, 1 Apr 2019 10:27:05 +0700 Message-Id: <20190401032709.14787-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401032709.14787-1-ard.biesheuvel@linaro.org> References: <20190401032709.14787-1-ard.biesheuvel@linaro.org> Subject: [PATCH v4 3/7] MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures 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: Mon, 01 Apr 2019 03:27:30 -0000 Delete the explicit machine type check for option ROM images, and instead, rely on the LoadImage() boot service to decide whether an option ROM can be dispatched or not. This permits platforms to ship with emulators to execute option ROMs that are not native to the processor architecture. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c index c75ef1a82505..54cf4251cc86 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c @@ -699,13 +699,6 @@ ProcessOpRomImage ( goto NextImage; } - // - // Skip the EFI PCI Option ROM image if its machine type is not supported - // - if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (EfiRomHeader->EfiMachineType)) { - goto NextImage; - } - // // Ignore the EFI PCI Option ROM image if it is an EFI application // -- 2.17.1