/* Note: The returned array/buffer is owned by callee. */
PCI_SEGMENT_INFO* EFIAPI GetPciSegmentInfo(UINTN *Count)
/* Note: The returned array/buffer is owned by callee. */
PCI_SEGMENT_INFO* EFIAPI GetPciSegmentInfo(UINTN *Count)
{
  EFI_HOB_GUID_TYPE  *GuidHob;
  ACPI_BOARD_INFO    *AcpiBoardInfo;
  ASSERT (Count != NULL);
  if (Count == NULL) {
    return NULL;
  }
  if (mPciSegment0.BaseAddress == 0) {
    GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);
    ASSERT (GuidHob != NULL);
    AcpiBoardInfo            = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob);
    mPciSegment0.BaseAddress = AcpiBoardInfo->PcieBaseAddress;
  }
  *Count = 1;
  return &mPciSegment0;
}