From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=mgFGMOaW; spf=pass (domain: linaro.org, ip: 209.85.210.195, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by groups.io with SMTP; Thu, 11 Apr 2019 11:58:25 -0700 Received: by mail-pf1-f195.google.com with SMTP id 8so3898571pfr.4 for ; Thu, 11 Apr 2019 11:58:25 -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=mgFGMOaWN4PpMto5HBr6JwsmSjjWC3C543G881m4QhUozRQx8eTxEcYGPuTOUjEYDY kJ0evFIRItMUTr0CWGAGqrZinTD/c7Fl7j+z8r/cdIEfSAqqwc02qLdtPsCuP3bwn4YC TgBPEFfv9XsrTFXDgHxtud3bquNmdFrhu2Kkij6ePg9h3JpeqKJvo3sE2niHAQYJWEPs MzJUNuSCLxdI0PWL8nuxjX7zK3ccCYmKgzxULu4t4JdMu4/0eimoZwsW2dxPd3EOh546 Lv+6XhILyvgOJPZ+jqWPud7tVAPpT+5wp9uewcDAG9Tnpq8eZuKEXTBtIh8b0GiQjEje BxAQ== 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=FzYJ2bKJR0zVcro0BZmJa7hLOIxoLiCDAqYC2bLLxifbfeZBtX7SgfV7Wpt1sTL/hY 45ws9Fi0yw2Y/ahprtpz12LK8v1JB+c2xSKQRNN1sTY9osJ1+I0EHpmScavw5GsUBz9U trywsQYJ86D4Sw1CTKnpOpyUrUWD27E0kxWx9EzTon3nPd8Cmbnm/VhK3walrvnzQZZ9 3OCgRCaX4UrG/sVONaVy6GY2xdV659JyNqA4C6C/9V15VlabJwUOjPLaALv6a0hfuRJ3 UuCFpcglEkr5NrCOmMI5EJ72/uYh0hThsqVBGPf/zFnhPgZ+XbbfTDNz9pVp31apNoFh 0DkA== X-Gm-Message-State: APjAAAV6TMA0vNweudJ4rUaS3yhLHT2GHbL0iTIh/ag19E7RQicOLpTA ttOp4OtG6jP6COuIylwvh3BN29Uj3ddjBh4Q X-Google-Smtp-Source: APXvYqxq0za1IEDi+PpvaGxnTONkeO/j7l8SwJ3aU/iss0hNsBxDNtJmszjJJDQdYm6Lf54up/+BKQ== X-Received: by 2002:a62:75cd:: with SMTP id q196mr42774117pfc.70.1555009104296; Thu, 11 Apr 2019 11:58:24 -0700 (PDT) Return-Path: Received: from localhost.localdomain (50-205-23-12-static.hfc.comcastbusiness.net. [50.205.23.12]) by smtp.gmail.com with ESMTPSA id w3sm82712861pfn.179.2019.04.11.11.58.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 11:58:23 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io 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 Subject: [PATCH v5 3/7] MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures Date: Thu, 11 Apr 2019 11:58:09 -0700 Message-Id: <20190411185813.2084-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190411185813.2084-1-ard.biesheuvel@linaro.org> References: <20190411185813.2084-1-ard.biesheuvel@linaro.org> 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