}\r
\r
/**\r
- Get the active VGA device on the same segment.\r
+ Get the active VGA device on the specified Host Bridge.\r
\r
- @param VgaDevice PCI IO instance for the VGA device.\r
+ @param HostBridgeHandle Host Bridge handle.\r
\r
- @return The active VGA device on the same segment.\r
+ @return The active VGA device on the specified Host Bridge.\r
\r
**/\r
PCI_IO_DEVICE *\r
-ActiveVGADeviceOnTheSameSegment (\r
- IN PCI_IO_DEVICE *VgaDevice\r
+LocateVgaDeviceOnHostBridge (\r
+ IN EFI_HANDLE HostBridgeHandle\r
)\r
{\r
LIST_ENTRY *CurrentLink;\r
- PCI_IO_DEVICE *Temp;\r
+ PCI_IO_DEVICE *PciIoDevice;\r
\r
CurrentLink = mPciDevicePool.ForwardLink;\r
\r
while (CurrentLink != NULL && CurrentLink != &mPciDevicePool) {\r
\r
- Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
+ PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink);\r
\r
- if (Temp->PciRootBridgeIo->SegmentNumber == VgaDevice->PciRootBridgeIo->SegmentNumber) {\r
+ if (PciIoDevice->PciRootBridgeIo->ParentHandle== HostBridgeHandle) {\r
\r
- Temp = LocateVgaDevice (Temp);\r
+ PciIoDevice = LocateVgaDevice (PciIoDevice);\r
\r
- if (Temp != NULL) {\r
- return Temp;\r
+ if (PciIoDevice != NULL) {\r
+ return PciIoDevice;\r
}\r
}\r
\r