47 if (PciRootBridgeInfo ==
NULL) {
52 *NumberOfRootBridges = PciRootBridgeInfo->Count;
56 ASSERT (mPciSegments !=
NULL);
62 for (Index = 0; Index < PciRootBridgeInfo->Count; Index++) {
63 if (UplSegmentInfo->SegmentInfo[Index].SegmentNumber == (UINT16)(PciRootBridgeInfo->RootBridge[Index].Segment)) {
64 mPciSegments[Index].
BaseAddress = UplSegmentInfo->SegmentInfo[Index].BaseAddress;
67 mPciSegments[Index].
SegmentNumber = (UINT16)(PciRootBridgeInfo->RootBridge[Index].Segment);
68 mPciSegments[Index].
StartBusNumber = (UINT8)PciRootBridgeInfo->RootBridge[Index].Bus.Base;
69 mPciSegments[Index].
EndBusNumber = (UINT8)PciRootBridgeInfo->RootBridge[Index].Bus.Limit;
90 *NumberOfRootBridges = 1;
95 ASSERT (mPciSegments !=
NULL);
97 ASSERT (GuidHob !=
NULL);
98 if (GuidHob !=
NULL) {
101 mPciSegments->
BaseAddress = AcpiBoardInfo->PcieBaseAddress;
130 if (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob)) {
143 return PciRootBridgeInfo;
172 if (GenericHeader->Length > GET_GUID_HOB_DATA_SIZE (GuidHob)) {
176 if ((GenericHeader->Revision != UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES_REVISION) || (GenericHeader->Length <
sizeof (
UPL_PCI_SEGMENT_INFO_HOB))) {
185 return UplSegmentInfo;
209 if (mPciSegments !=
NULL) {
216 if (UplSegmentInfo ==
NULL) {
220 if (PciRootBridgeInfo ==
NULL) {
EFI_GUID gUefiAcpiBoardInfoGuid
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_GUID gUplPciSegmentInfoHobGuid
VOID RetrieveSegmentInfoFromHob(OUT UINTN *NumberOfRootBridges)
UPL_PCI_SEGMENT_INFO_HOB * Get_UPLSegInfo(VOID)
UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES * Get_RBInfo(VOID)
PCI_SEGMENT_INFO *EFIAPI GetPciSegmentInfo(UINTN *Count)
VOID RetrieveMultiSegmentInfoFromHob(IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, IN UPL_PCI_SEGMENT_INFO_HOB *UplSegmentInfo, OUT UINTN *NumberOfRootBridges)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
UINT8 StartBusNumber
Start BUS number, for verifying the PCI Segment address.
UINT8 EndBusNumber
End BUS number, for verifying the PCI Segment address.
UINT64 BaseAddress
ECAM Base address.
UINT16 SegmentNumber
Segment number.