Re: Proposal to add support for PCIe enumeration protocols in PEI

Abner Chang

Hi Mateusz,
Is the PEI PCI enumeration on demand according to the platform configuration? Or you are proposing the PCI enumeration is mandatory for each boot?
No matter which one, that would be good if the PCI device information that enumerated in PEI phase can be passed to DXE phase, then we don’t need the second time PCI enumeration in DXE phase if the device is ever enumerated in PEI.

Another benefit of PCI device information:
The PCI device information (e.g. PCI Device Table) can provide the information such as PCI BDF, device class, device type, embedded or on slot, IRQ routing, and etc.(maybe incorporate with platform libraries). This table can be leveraged by other upper layer EFI drivers (DXE/PEI/SMM) for other purposes without accessing PCI registers through PCI I/O protocol. (for example, create the SMBIOS table, ACPI table, ACPI methods and etc.).


-----Original Message-----
From: [] On Behalf Of Albecki,
Sent: Friday, October 29, 2021 9:02 PM
To:; Ray <>;
Subject: Re: [edk2-rfc] Proposal to add support for PCIe enumeration
protocols in PEI

That's my bad on the extra resource assignment. While I believe it is possible
to use less memory-efficient algorithm to assign resources on second pass
there should be no need for such behavior on majority of systems. What the
flow should look like is:

-> enumerator PEIM scans the PCI tree and assigns resources to all
controllers and installs EDKII_PCI_DEVICE_PPI for UFS controller
-> on another pass enumerator PEIM will install corresponding

The reason why platform might want to do multiple passes is to save CAR
space and only install EDKII_PCI_DEVICE_PPI for required devices in pre-
mem and that is what I wanted to emphasize with this flow. Of course for
small configurations with few controllers that need to be enumerated it
should be possible to do one pass and install PPI for every device.

Join to automatically receive all group messages.