/* Get Option rom driver's mapping for PCI device. */
BOOLEAN PciRomGetImageMapping(IN PCI_IO_DEVICE *PciIoDevice)
/* Get Option rom driver's mapping for PCI device. */
BOOLEAN PciRomGetImageMapping(IN PCI_IO_DEVICE *PciIoDevice)
{
  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL  *PciRootBridgeIo;
  UINTN                            Index;
  PciRootBridgeIo = PciIoDevice->PciRootBridgeIo;
  for (Index = 0; Index < mNumberOfPciRomImages; Index++) {
    if ((mRomImageTable[Index].Seg  == PciRootBridgeIo->SegmentNumber) &&
        (mRomImageTable[Index].Bus  == PciIoDevice->BusNumber) &&
        (mRomImageTable[Index].Dev  == PciIoDevice->DeviceNumber) &&
        (mRomImageTable[Index].Func == PciIoDevice->FunctionNumber))
    {
      if (mRomImageTable[Index].ImageHandle != NULL) {
        AddDriver (PciIoDevice, mRomImageTable[Index].ImageHandle, NULL);
      }
      PciIoDevice->PciIo.RomImage = mRomImageTable[Index].RomImage;
      PciIoDevice->PciIo.RomSize  = mRomImageTable[Index].RomSize;
      return TRUE;
    }
  }
  return FALSE;
}