/* This routine is used to process all PCI devices' Option Rom on a certain root bridge. */
VOID ProcessOptionRom(IN PCI_IO_DEVICE *Bridge, IN UINT64 RomBase, IN UINT64 MaxLength)
/* This routine is used to process all PCI devices' Option Rom on a certain root bridge. */
VOID ProcessOptionRom(IN PCI_IO_DEVICE *Bridge, IN UINT64 RomBase, IN UINT64 MaxLength)
{
  LIST_ENTRY     *CurrentLink;
  PCI_IO_DEVICE  *Temp;
  CurrentLink = Bridge->ChildList.ForwardLink;
  while (CurrentLink != NULL && CurrentLink != &Bridge->ChildList) {
    Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
    if (!IsListEmpty (&Temp->ChildList)) {
      ProcessOptionRom (Temp, RomBase, MaxLength);
    }
    if ((Temp->RomSize != 0) && (Temp->RomSize <= MaxLength)) {
      LoadOpRomImage (Temp, RomBase);
    }
    CurrentLink = CurrentLink->ForwardLink;
  }
}