From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f68.google.com (mail-ej1-f68.google.com [209.85.218.68]) by mx.groups.io with SMTP id smtpd.web10.12065.1600172782228063603 for ; Tue, 15 Sep 2020 05:26:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=grjxUXYY; spf=pass (domain: 9elements.com, ip: 209.85.218.68, mailfrom: marcello.bauer@9elements.com) Received: by mail-ej1-f68.google.com with SMTP id q13so4718730ejo.9 for ; Tue, 15 Sep 2020 05:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tife1aUCnduZamB/sUoh3pVqADMLJrb1ngdmBz5zJBg=; b=grjxUXYYKLTY7/IvI1TNKTrXcT+cvzhayjRkoq0SnPhvvnvdsFxquoEXBdCw3qEuvO RAUDlfRInuTJyNlCnidgYwM5AL9LWG8Ozg/02R3vxp9rdKytVnLHx24FQE/N91LqCSMj gSlYA/Iwdnb3jo1lnCGDEE1qCkevvvD8ZkJLw+2Nt5ExH8K+w8dlWvjqzJol+dcYSYUY fPBn48ORx6Kcjpn0rynS6NdO/AD4JL6lWcr6iISC7+sGUHmbUKIulN0y0CA5UYoAC16i dSPmWsb8arqJyeiVZbkDVpNx05HjNMzuYsYH4h/Ha72+EvnX2SJCVaWNoBgAaI9ax83Q y3/A== 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:mime-version:content-transfer-encoding; bh=Tife1aUCnduZamB/sUoh3pVqADMLJrb1ngdmBz5zJBg=; b=JXoWk6hs91hDuZ9gaLRxckeEMHD6wNdrMSY8UAySHzKCIs6OuK8yAPCxEwZYq6pc3W ojavc7mjmjXMq3WG8cIUMCNQR6ZDEI1RRSUD9bUuqGDTXEawRFyixqCAj0RawAArx9dA upTsKgb66Xy1pcmi8W18QTB0ttwe6rHW+AIJMuXQwtd1+iPfE5rTQjpzvJALcoX2L98h vlYESTJwtdefVWX14iF6X+14LbOC8FhAQ3tyQ2ZA3pdGeZKDmyw26f/0Cx3jDiiEffg1 Vuemcyohpsk1A/XLz/6EGCcWzfPT+XqdbwVsOqm22LYD/cvsRXhjhBbvfRsnXQLr6VZ3 SC3w== X-Gm-Message-State: AOAM530dtt+dc3c/prj2h3xD2uie3piKs87424Htgu+9V53FNouwZkSE xZD4kuKjghZ6ffMiSiGlJMZ85dW3uFktrw== X-Google-Smtp-Source: ABdhPJyxvn/rU7G1/kiRiA0fCp/d5jOg35V9EIjQMcoEGL53bGjOtjnEfVEEzAahu5cKUrIibYxoDA== X-Received: by 2002:a17:906:474f:: with SMTP id j15mr21054891ejs.468.1600172780437; Tue, 15 Sep 2020 05:26:20 -0700 (PDT) Return-Path: Received: from T14.n1ce.space ([2a02:908:e851:d750:5f43:5410:2022:1d7c]) by smtp.gmail.com with ESMTPSA id x25sm11217064edv.42.2020.09.15.05.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 05:26:20 -0700 (PDT) From: "Marcello Sylvester Bauer" To: devel@edk2.groups.io Cc: Patrick Rudolph , Christian Walter , Hao A Wu , Jian J Wang , Ray Ni Subject: [PATCH v2 1/2] MdeModulePkg: Fix OptionROM scanning Date: Tue, 15 Sep 2020 14:26:15 +0200 Message-Id: <20200915122616.17196-2-marcello.bauer@9elements.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915122616.17196-1-marcello.bauer@9elements.com> References: <20200915122616.17196-1-marcello.bauer@9elements.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Patrick Rudolph The Option ROM scanner can't work as enumeration was done by the first stage bootloader. Running it will disable the ability of the PCIPlatform code to scan for ROMs. Required for the following patch that enables custom Option ROM scanning using gPciPlatformProtocol. Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Cc: Patrick Rudolph Cc: Christian Walter Cc: Hao A Wu Cc: Jian J Wang Cc: Ray Ni --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeMod= ulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 6c68a97d4e46..7420f0079f7d 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -2530,10 +2530,12 @@ PciEnumeratorLight ( //=0D RemoveRejectedPciDevices (RootBridgeDev->Handle, RootBridgeDev);=0D =0D - //=0D - // Process option rom light=0D - //=0D - ProcessOptionRomLight (RootBridgeDev);=0D + if (!PcdGetBool (PcdPciDisableBusEnumeration)) {=0D + //=0D + // Process option rom light=0D + //=0D + ProcessOptionRomLight (RootBridgeDev);=0D + }=0D =0D //=0D // Determine attributes for all devices under this root bridge=0D --=20 2.28.0