/* Add the PCI Enhanced Configuration Space Information to the MCFG Table. */
STATIC VOID AddPciConfigurationSpaceList(IN MCFG_TABLE *CONST Mcfg, IN CONST UINT32 PciCfgSpaceOffset, IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciCfgSpaceInfoList, IN UINT32 PciCfgSpaceCount)
/* Add the PCI Enhanced Configuration Space Information to the MCFG Table. */
STATIC VOID AddPciConfigurationSpaceList(IN MCFG_TABLE *CONST Mcfg, IN CONST UINT32 PciCfgSpaceOffset, IN CONST CM_ARM_PCI_CONFIG_SPACE_INFO *PciCfgSpaceInfoList, IN UINT32 PciCfgSpaceCount)
{
  MCFG_CFG_SPACE_ADDR  *PciCfgSpace;
  ASSERT (Mcfg != NULL);
  ASSERT (PciCfgSpaceInfoList != NULL);
  PciCfgSpace = (MCFG_CFG_SPACE_ADDR *)((UINT8 *)Mcfg + PciCfgSpaceOffset);
  while (PciCfgSpaceCount-- != 0) {
    PciCfgSpace->BaseAddress           = PciCfgSpaceInfoList->BaseAddress;
    PciCfgSpace->PciSegmentGroupNumber =
      PciCfgSpaceInfoList->PciSegmentGroupNumber;
    PciCfgSpace->StartBusNumber = PciCfgSpaceInfoList->StartBusNumber;
    PciCfgSpace->EndBusNumber   = PciCfgSpaceInfoList->EndBusNumber;
    PciCfgSpace->Reserved       = EFI_ACPI_RESERVED_DWORD;
    PciCfgSpace++;
    PciCfgSpaceInfoList++;
  }
}