From: Laszlo Ersek Subject: Re: [PATCH] OvmfPkg: AcpiPlatformDxe: PCI enumeration may be disabled Date: Thu, 12 Feb 2015 13:33:50 +0100 Message-ID: <54DC9DAE.7050906__31033.3481793807$1423744547$gmane$org@redhat.com> References: <1423743367-20254-1-git-send-email-lersek@redhat.com> <20150212122921.GH13644@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150212122921.GH13644@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: edk2-devel@lists.sourceforge.net, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/12/15 13:29, Wei Liu wrote: > On Thu, Feb 12, 2015 at 01:16:07PM +0100, Laszlo Ersek wrote: >> SVN r16411 delayed ACPI table installation until PCI enumeration was >> complete, because on QEMU the ACPI-related fw_cfg files should only be >> downloaded after PCI enumeration. >> >> However, InitializeXen() in "OvmfPkg/PlatformPei/Xen.c" sets >> PcdPciDisableBusEnumeration to TRUE. This causes >> PciBusDriverBindingStart() in "MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c" to >> set gFullEnumeration to FALSE, which in turn makes PciEnumerator() in >> "MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c" branch to >> PciEnumeratorLight(). The installation of >> EFI_PCI_ENUMERATION_COMPLETE_PROTOCOL at the end of PciEnumerator() is not >> reached. >> >> Which means that starting with SVN r16411, AcpiPlatformDxe is never >> dispatched on Xen. >> >> This patch replaces the EFI_PCI_ENUMERATION_COMPLETE_PROTOCOL depex with a >> matching protocol registration callback for the PCI enumeration enabled >> (ie. QEMU) case. When PCI enumeration is disabled (ie. when running on >> Xen), AcpiPlatformDxe doesn't wait for >> EFI_PCI_ENUMERATION_COMPLETE_PROTOCOL. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Laszlo Ersek > > This patch fixes the bug I have. Thanks! > > Tested-by: Wei Liu Thanks. If Jordan is okay with the patch too, I'll push it. Sorry about the regression, too. Cheers Laszlo