]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
MdeModulePkg/PciBus: do not improperly degrade resource
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 1 Apr 2016 08:14:07 +0000 (16:14 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Mon, 23 May 2016 05:49:41 +0000 (13:49 +0800)
commit05070c1b471b0d2af759f582e3c305859cd36b23
tree50799f8a35b2437291fcde39d0f758a146df982c
parentea669c1ba3313e9192a0dcee2dd7e4e6da75eddf
MdeModulePkg/PciBus: do not improperly degrade resource

PciBus driver originally always degrade (64->32) the MMIO resource
for PCI BAR when the PCI device contains option ROM.
But the degrade causes the PCI device can only use resource below 4GB
which makes the resource allocation fails when the PCI device wants
very big MMIO.
The patch follows the PI spec (ECR 1529) to honor the granularity
setting for PCI BAR from IncompatiblePciDeviceSupport so that even
for PCI device which contains option ROM, the degrade doesn't happen
if IncompatiblePciDeviceSupport returns 64 as granularity.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h
MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c