]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/PciHostBridgeLib: Add ResourceAssigned field
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 29 Apr 2016 08:43:56 +0000 (16:43 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 11 May 2016 00:53:36 +0000 (08:53 +0800)
commitc5be19f378216a07c7783e07973d976407885e75
tree6b2f30a79a745e6a6e3f3d54c2698db7dc9664cc
parentc3933ccbbad7cc00f77f01acea19f6ca4de97bac
MdeModulePkg/PciHostBridgeLib: Add ResourceAssigned field

Some platform doesn't require PciBus driver to assign resource
to PCI devices which causes PciRootBridgeIo.Configuration() cannot
return correct resource information to caller.

When resource assignment by PciBus is not mandatory, only light
version of PCI bus enumeration is performed, which only collects
the device resource consumption and publishes the PciIo instance.
The corresponding logic is in PciEnumeratorLight() in PciBus driver.

But PciEnumeratorLight() still depends on
PciRootBridgeIo.Configuration() returns the starting bus number in
order to search down to find all PCI devices under the root bridge.

When ResourceAssigned in PCI_ROOT_BRIDGE returned by
PciHostBridgeGetRootBridges() is TRUE, PciHostBridge driver treats
the Bus/Io/Mem/MemAbove4G/PMem/PMemAbove4G as the resource that are
*actually assigned* to the root bridge, instead of the resource that
*can be assigned* to the root bridge.
So that PciRootBridgeIo.Configuration() can return the correct
information.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Include/Library/PciHostBridgeLib.h