/* Get root bridge device instance by specific root bridge handle. */
PCI_IO_DEVICE* GetRootBridgeByHandle(EFI_HANDLE RootBridgeHandle)
/* Get root bridge device instance by specific root bridge handle. */
PCI_IO_DEVICE* GetRootBridgeByHandle(EFI_HANDLE RootBridgeHandle)
{
  PCI_IO_DEVICE  *RootBridgeDev;
  LIST_ENTRY     *CurrentLink;
  CurrentLink = mPciDevicePool.ForwardLink;
  while (CurrentLink != NULL && CurrentLink != &mPciDevicePool) {
    RootBridgeDev = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
    if (RootBridgeDev->Handle == RootBridgeHandle) {
      return RootBridgeDev;
    }
    CurrentLink = CurrentLink->ForwardLink;
  }
  return NULL;
}