63 return Acpi1->
UID < Acpi2->UID ? -1 :
64 Acpi1->UID > Acpi2->UID ? 1 :
97 return *Uid < Acpi->
UID ? -1 :
98 *Uid > Acpi->UID ? 1 :
145 Status =
gBS->LocateHandleBuffer (
147 &gEfiPciRootBridgeIoProtocolGuid,
152 if (EFI_ERROR (Status)) {
160 if (Collection ==
NULL) {
161 Status = EFI_OUT_OF_RESOURCES;
167 Status = EFI_OUT_OF_RESOURCES;
174 for (Idx = 0; Idx < NumHandles; ++Idx) {
177 Status =
gBS->HandleProtocol (
179 &gEfiDevicePathProtocolGuid,
182 if (EFI_ERROR (Status)) {
197 if (EFI_ERROR (Status)) {
205 if (Map->Count > 0) {
209 Map->BusNumbers =
AllocatePool (Map->Count *
sizeof *Map->BusNumbers);
210 if (Map->BusNumbers ==
NULL) {
211 Status = EFI_OUT_OF_RESOURCES;
221 while (Idx < Map->Count) {
224 ASSERT (Entry !=
NULL);
226 Map->BusNumbers[Idx] = Acpi->
UID;
229 "%a: extra bus position 0x%Lx maps to bus number (UID) 0x%x\n",
238 ASSERT (Entry ==
NULL);
240 *ExtraRootBusMap = Map;
248 if (EFI_ERROR (Status)) {
249 if (Map->BusNumbers !=
NULL) {
282 if (ExtraRootBusMap->BusNumbers !=
NULL) {
283 FreePool (ExtraRootBusMap->BusNumbers);
311 IN UINT64 RootBusPos,
312 OUT UINT32 *RootBusNr
315 if (RootBusPos == 0) {
316 return EFI_INVALID_PARAMETER;
319 if (RootBusPos > ExtraRootBusMap->Count) {
320 return EFI_NOT_FOUND;
323 *RootBusNr = ExtraRootBusMap->BusNumbers[(
UINTN)RootBusPos - 1];
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define DEBUG(Expression)
ORDERED_COLLECTION_ENTRY *EFIAPI OrderedCollectionMin(IN CONST ORDERED_COLLECTION *Collection)
VOID *EFIAPI OrderedCollectionUserStruct(IN CONST ORDERED_COLLECTION_ENTRY *Entry)
RETURN_STATUS EFIAPI OrderedCollectionInsert(IN OUT ORDERED_COLLECTION *Collection, OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL, IN VOID *UserStruct)
VOID EFIAPI OrderedCollectionUninit(IN ORDERED_COLLECTION *Collection)
ORDERED_COLLECTION *EFIAPI OrderedCollectionInit(IN ORDERED_COLLECTION_USER_COMPARE UserStructCompare, IN ORDERED_COLLECTION_KEY_COMPARE KeyCompare)
ORDERED_COLLECTION_ENTRY *EFIAPI OrderedCollectionNext(IN CONST ORDERED_COLLECTION_ENTRY *Entry)
VOID EFIAPI OrderedCollectionDelete(IN OUT ORDERED_COLLECTION *Collection, IN ORDERED_COLLECTION_ENTRY *Entry, OUT VOID **UserStruct OPTIONAL)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)