/* Get the active VGA device on the specified Host Bridge. */
PCI_IO_DEVICE* LocateVgaDeviceOnHostBridge(IN EFI_HANDLE HostBridgeHandle)
/* Get the active VGA device on the specified Host Bridge. */
PCI_IO_DEVICE* LocateVgaDeviceOnHostBridge(IN EFI_HANDLE HostBridgeHandle)
{
  LIST_ENTRY     *CurrentLink;
  PCI_IO_DEVICE  *PciIoDevice;
  CurrentLink = mPciDevicePool.ForwardLink;
  while (CurrentLink != NULL && CurrentLink != &mPciDevicePool) {
    PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
    if (PciIoDevice->PciRootBridgeIo->ParentHandle == HostBridgeHandle) {
      PciIoDevice = LocateVgaDevice (PciIoDevice);
      if (PciIoDevice != NULL) {
        return PciIoDevice;
      }
    }
    CurrentLink = CurrentLink->ForwardLink;
  }
  return NULL;
}