MdeModulePkg/PciBus: Restrict one VGA per HostBridge not Segment

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1109

Today's restriction of VGA device is to have only one VGA device
enabled per PCI segment. It's not correct because several segments
may share one IO / MMIO address space.
We should restrict to have one VGA per Host Bridge because each
Host Bridge has its only IO / MMIO address space.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Ruiyu Ni
2018-08-23 10:50:16 +08:00
parent 06da1e310b
commit 983f5abb9a
3 changed files with 20 additions and 20 deletions

View File

@@ -1413,9 +1413,9 @@ SupportPaletteSnoopAttributes (
}
//
// Get the boot VGA on the same segement
// Get the boot VGA on the same Host Bridge
//
Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice);
Temp = LocateVgaDeviceOnHostBridge (PciIoDevice->PciRootBridgeIo->ParentHandle);
if (Temp == NULL) {
//
@@ -1668,9 +1668,9 @@ PciIoAttributes (
//
if (Operation == EfiPciIoAttributeOperationEnable) {
//
// Check if there have been an active VGA device on the same segment
// Check if there have been an active VGA device on the same Host Bridge
//
Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice);
Temp = LocateVgaDeviceOnHostBridge (PciIoDevice->PciRootBridgeIo->ParentHandle);
if (Temp != NULL && Temp != PciIoDevice) {
//
// An active VGA has been detected, so can not enable another