From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.21928.1594653996578125589 for ; Mon, 13 Jul 2020 08:26:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XW9GOsMv; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594653995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QpQbSh72qRm5VviKC0w9whqw/d9tQXKe+u/KU4Div/s=; b=XW9GOsMvHZVaJt6hXJcB+4pvhNLvPr5NWXMUbLrfA2vOpgUzsM3eCH5ben/31bRIFyG8GA 8fQ6zRYPpG0K6a19WXVFUj6C05NjzZw6XASpMPImGAgdKrQkcGp7CghweXUHAWxDV7BUbr xZgdE29yW3VNtVXs2DMTuiSuciXw+xU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-cLUqigPfNe2jDMTcZRsKYA-1; Mon, 13 Jul 2020 11:26:33 -0400 X-MC-Unique: cLUqigPfNe2jDMTcZRsKYA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BC9488C799; Mon, 13 Jul 2020 15:26:26 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-183.ams2.redhat.com [10.36.114.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9782F60BEC; Mon, 13 Jul 2020 15:26:22 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v1 1/2] MdeModulePkg: Fix OptionROM scanning To: marcello.bauer@9elements.com Cc: devel@edk2.groups.io, Patrick Rudolph , Christian Walter , Maurice Ma , Nate DeSimone , Star Zeng , Jian J Wang , Hao A Wu , Ray Ni , Anthony Perard , Julien Grall References: <20200713102202.814-1-marcello.bauer@9elements.com> <20200713102202.814-2-marcello.bauer@9elements.com> From: "Laszlo Ersek" Message-ID: <250ee1a1-45e2-a289-20b7-f51782004747@redhat.com> Date: Mon, 13 Jul 2020 17:26:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200713102202.814-2-marcello.bauer@9elements.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, On 07/13/20 12:22, Marcello Sylvester Bauer wrote: > 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(-) Please don't forget to CC the maintainers / designated reviewers of this code. $ python BaseTools/Scripts/GetMaintainer.py \ -l MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c Jian J Wang Hao A Wu Ray Ni devel@edk2.groups.io I'm adding Jian, Hao, and Ray now. Also CC'ing Anthony and Julien, because OVMF runs on Xen with PcdPciDisableBusEnumeration=TRUE, and this patch changes behavior in that case. Thanks Laszlo > > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/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 ( > // > RemoveRejectedPciDevices (RootBridgeDev->Handle, RootBridgeDev); > > - // > - // Process option rom light > - // > - ProcessOptionRomLight (RootBridgeDev); > + if (!PcdGetBool (PcdPciDisableBusEnumeration)) { > + // > + // Process option rom light > + // > + ProcessOptionRomLight (RootBridgeDev); > + } > > // > // Determine attributes for all devices under this root bridge >