On 2015-02-17 12:09:54, Laszlo Ersek wrote:
> On 02/17/15 20:15, Laszlo Ersek wrote:
> > On 02/17/15 18:14, Jordan Justen wrote:
> >> In OvmfPkg/AcpiPlatformDxe, we now look at the setting of
> >> PcdPciDisableBusEnumeration. If enumeration is enabled, then we wait
> >> for a callback on the gEfiPciEnumerationCompleteProtocolGuid protocol
> >> before installing the ACPI tables. Otherwise, we install the ACPI
> >> tables immediately.
> >>
> >> https://github.com/jljusten/edk2.git acpi-pci-pcd
> >>
> >> Jordan Justen (5):
> >>   OvmfPkg/AcpiPlatformDxe: FindAcpiTablesInFv => InstallOvmfFvTables
> >>   OvmfPkg/AcpiPlatformDxe: InstallAllQemuLinkedTables =>
> >>     InstallQemuFwCfgTables
> >>   ArmVirtualizationPkg: Set PcdPciDisableBusEnumeration to TRUE
> >>   OvmfPkg/AcpiPlatformDxe: Conditional callback for
> >>     PciEnumerationComplete
> >>   OvmfPkg/AcpiPlatformDxe: Remove PciEnumerationComplete depex
> >>
> >>  .../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc |  4 +
> >>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c             | 95 
> >> ++++++++++++++++++----
> >>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h             |  5 +-
> >>  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf        |  4 +-
> >>  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c            | 82 
> >> +++++++++++++++----
> >>  .../AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf   |  7 +-
> >>  6 files changed, 160 insertions(+), 37 deletions(-)
> >>
> > 
> > The approach taken in this patchset is one of the first ideas I had
> > while pondering the issue over the weekend. I didn't dare suggesting it,
> > lest I be crucified for trying to repurpose PcdPciDisableBusEnumeration
> > (because it now has dual consumption).
> 
> Some clarification / correction: I didn't shy away from using this PCD in:
> 
> [edk2] [PATCH] OvmfPkg: AcpiPlatformDxe: PCI enumeration may be disabled
> <http://thread.gmane.org/gmane.comp.bios.tianocore.devel/12608>

Gah. We've basically come full circle and implemented it twice. I'm
suitably ashamed. Would you like to update your patch to cover
QemuFwCfgAcpiPlatformDxe.inf as well?

For what it's worth, I still want to see PciBusDxe install
gEfiPciEnumerationCompleteProtocolGuid when
PcdPciDisableBusEnumeration is TRUE.

That would take care of the issue for Xen on IA32 and X64 without this
change, but it cover the other cases when PciBusDxe is not used at
all.

> but that patch doesn't count as "repurposing the PCD".
> 
> "Repurposing the PCD" will be when I set it to TRUE in VirtFdtDxe, on
> ARM, when the PCI host bridge will be absent, because I'll know that
> PciBusDxe won't even Start().
> 
> So, it's great that you're fine with that, thanks!

I'm not sure I would call it repurposing. For the sake of this change,
the issue is that for QEMU, if the PCI devices may be re-assigned
resources, then we need wait to read the ACPI tables. If
PcdPciDisableBusEnumeration is TRUE, then the PCI devices won't be
reassigned resources, and therefore OvmfPkg/AcpiPlatformDxe need not
wait.

Regarding other potential uses of PcdPciDisableBusEnumeration, I don't
know what my opinion would be on them. If it is not part of OVMF, then
it might be that I don't even notice. :)

But, I would be open to discussing adding an OvmfPkg PCD item that
indicates if PCI is supported. Maybe PcdOvmfPciEnabled? Would that
help? If so, maybe OvmfPkg/AcpiPlatformDxe could be updated to use
that PCD instead. (Assuming PcdBusDxe is fixed.)

-Jordan

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to