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=YHVdkrO9; spf=pass (domain: linaro.org, ip: 209.85.215.195, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by groups.io with SMTP; Sun, 14 Apr 2019 12:52:56 -0700 Received: by mail-pg1-f195.google.com with SMTP id z9so7522473pgu.10 for ; Sun, 14 Apr 2019 12:52:56 -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=PQ9Vc3Jf/d9agrDG8io6jCnTdu9qC2E8XQN8ooK0kV4=; b=YHVdkrO9Q4RJGLZ0IpaOilFh9GUX6Z18Rh7TPo3++DsABrz2F7pfaLNw1nRBWxllut ICO6voq6WuOhrCgFatWTRkfiwxLK8eeLWp6sR9RJsdm0uABjkrGIwWLKetnSoU1mlhXo OtwgL6iQa9jUnI3WHg/pS6w3/FkQBmUTF02/y3PIys3uk4hMjpM1xB5/ZB/wmr8GvkXY P1hDgh7lZKhEA4j4nv3QvwPnthfJh1lCWRBeTHppeJbBvlew9WMsHnAzyo0k6TdaQlG1 QkoHmwXBpC7+AQ/YXVatHnCwRBWGlrnEvQEQ3ly+JsG0EZrbluSVSFl9baA/OkIe+yA/ rOCg== 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=PQ9Vc3Jf/d9agrDG8io6jCnTdu9qC2E8XQN8ooK0kV4=; b=TAbi+Azaw55v6hi9uxndI+vCj0lVnk0MfsQd0iFFb86J1o2QSNB/wS1MI03ooHF5Kx p6x8/VyYa2YENOyU/LloKK0L19W8wloyFkY41KvofaQSKa9TjBx8olWDI0qOb5/cOIeL +3JPU/Vu74GefwqjC9gCFQdrSJ1vrDOUdMJ7ny/swdp/qn5sQe6u5pq/jhh1c56hu6h4 59XZWtgh4kuOeOuFGL5c4T/RW1H0IUzdv+w2T60GdwHNLTV/aisfA+uFj02/42aDFeK8 ivfwZZktDc0l2phpbh/QnaOi5/ej4mHY/4aU044Ap40X49M1il+RJi7Wv4FO5zCif7yI g4dQ== X-Gm-Message-State: APjAAAWz0PA7BmEqbdsyG9U7hNkr0NnYMO7RtfdEw5pz/HxMfBGdUDLA Wj33qVE3IeE1zxgsyUJa5HIPuIiI5Yx9bMwR X-Google-Smtp-Source: APXvYqxTfb7gHxFkqZfkhRu1z9gx7C26toAgrkEceu3ioSQLA6YbXle3M7VD59xd8s4UU92+Mopt1Q== X-Received: by 2002:a63:cc0a:: with SMTP id x10mr63790575pgf.179.1555271575754; Sun, 14 Apr 2019 12:52:55 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([50.236.184.206]) by smtp.gmail.com with ESMTPSA id j16sm62388977pfi.58.2019.04.14.12.52.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Apr 2019 12:52:54 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Michael D Kinney , Andrew Fish , Leif Lindholm , Star Zeng , Eric Dong , Ruiyu Ni , Liming Gao , Jaben Carsey , Steven Shi , Jian J Wang , Hao Wu Subject: [PATCH v6 3/7] MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures Date: Sun, 14 Apr 2019 12:52:29 -0700 Message-Id: <20190414195233.30045-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190414195233.30045-1-ard.biesheuvel@linaro.org> References: <20190414195233.30045-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. Signed-off-by: Ard Biesheuvel Reviewed-by: Michael D Kinney --- 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