From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f68.google.com (mail-ed1-f68.google.com [209.85.208.68]) by mx.groups.io with SMTP id smtpd.web12.628.1594658389723181144 for ; Mon, 13 Jul 2020 09:39:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=K9ULYD86; spf=pass (domain: 9elements.com, ip: 209.85.208.68, mailfrom: marcello.bauer@9elements.com) Received: by mail-ed1-f68.google.com with SMTP id g20so14268165edm.4 for ; Mon, 13 Jul 2020 09:39:49 -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=Sk62mqGWAAPH0RNYFr6UPj+b1sGR07Z/fjy6dXLsau0=; b=K9ULYD86JQrxF0FZzdpn41pRNaPy7l49aeMSIHIKtRG0rAE/YmMdR+uYSR/yzdqOsm cm+W7aTQQpgcxYwVt8DL9o006LPjdh9otKOqHe3OwhEvbPBLh9WjBUIH2mtHsTDdVCCH R9AKQP+evKMR3ak9bFNewiT5gvwjzr9xVjLhHIUONhUgLsFrvE3gg+VIuqdo2j5Yddfq 2Gp34+xH1sYch8WDE8WDS6hJP/+IZHGO4vX3qTla4ZzbKnCNFPwevLxpHCrwpwsHIFhK aUsljhhPEX0XyGloW4O+ObmPrZEOqvl1IbMZlv8ngP7GPK67EdV5tVv9KQHEEnVtxl9n 2b0g== 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=Sk62mqGWAAPH0RNYFr6UPj+b1sGR07Z/fjy6dXLsau0=; b=QY7mtRJzX02PQHBxwW6yaikBL6bgp9HxkvjgTulOlXhAmBYQKhqj0AYrA7Eg36UK+p O9dPe28/BH4qpeGjr8PaVdAzE+OzQ+4ss/oy0U2Igdop3tyzCyitSiElwzbxvK09/a+I iuNJRnbi9zgyceWS3/C95JSSFl7WdH+pTTL7CV6VUcxhuK8cYcGJUoonJngrIP29uTvC quZEtRmJhNVKN4jBwxnM5elanA+dFqxGYU1jnf1Jw6Itf86BI2gJJZRHYjtXYKhlqpil BhJlowypatso7In5LX7ks3H9+s4TSVXFsrB20NOvFbuss93+DZw1yJQ+BnhZjkgL7MhS fCyw== X-Gm-Message-State: AOAM530e9o792b3dK0aBSV2loo8UGSL6fdmFI+5qPEyfBJZDccTvjI6i wE8Hpll42vq9HNk5AYuthjUUdGNnW44= X-Google-Smtp-Source: ABdhPJxaZDlamQvVPK00SR8VyBCX15inkxg/cMqEx5vTF4asuaqEpyo7a4B4vOLpHyD730nuNUxBpA== X-Received: by 2002:a50:bf09:: with SMTP id f9mr230893edk.249.1594658388097; Mon, 13 Jul 2020 09:39:48 -0700 (PDT) Return-Path: Received: from T580.dut.n1ce.space ([2a02:908:e851:d750:f570:655a:1f30:429f]) by smtp.gmail.com with ESMTPSA id aq25sm10319459ejc.11.2020.07.13.09.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 09:39:47 -0700 (PDT) From: "Marcello Sylvester Bauer" To: devel@edk2.groups.io Cc: Patrick Rudolph , Christian Walter , Maurice Ma , Nate DeSimone , Star Zeng Subject: [PATCH v1 1/2] MdeModulePkg: Fix OptionROM scanning Date: Mon, 13 Jul 2020 18:39:43 +0200 Message-Id: <20200713163944.9893-2-marcello.bauer@9elements.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200713163944.9893-1-marcello.bauer@9elements.com> References: <20200713163944.9893-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: Maurice Ma Cc: Nate DeSimone Cc: Star Zeng --- 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.27.0