14#define NO_MAPPING (VOID *) (UINTN) -1
16#define RESOURCE_VALID(Resource) ((Resource)->Base <= (Resource)->Limit)
68 PCI_RESOURCE_TYPE Index;
69 CHAR16 *DevicePathStr;
74 DEBUG ((DEBUG_INFO,
"RootBridge: "));
76 DEBUG ((DEBUG_INFO,
" Support/Attr: %lx / %lx\n", Bridge->Supports, Bridge->Attributes));
77 DEBUG ((DEBUG_INFO,
" DmaAbove4G: %s\n", Bridge->DmaAbove4G ? L
"Yes" : L
"No"));
78 DEBUG ((DEBUG_INFO,
"NoExtConfSpace: %s\n", Bridge->NoExtendedConfigSpace ? L
"Yes" : L
"No"));
81 " AllocAttr: %lx (%s%s)\n",
82 Bridge->AllocationAttributes,
88 " Bus: %lx - %lx Translation=%lx\n",
91 Bridge->Bus.Translation
96 ASSERT (Bridge->Bus.Translation == 0);
97 if (Bridge->Bus.Translation != 0) {
103 " Io: %lx - %lx Translation=%lx\n",
106 Bridge->Io.Translation
110 " Mem: %lx - %lx Translation=%lx\n",
113 Bridge->Mem.Translation
117 " MemAbove4G: %lx - %lx Translation=%lx\n",
118 Bridge->MemAbove4G.Base,
119 Bridge->MemAbove4G.Limit,
120 Bridge->MemAbove4G.Translation
124 " PMem: %lx - %lx Translation=%lx\n",
127 Bridge->PMem.Translation
131 " PMemAbove4G: %lx - %lx Translation=%lx\n",
132 Bridge->PMemAbove4G.Base,
133 Bridge->PMemAbove4G.Limit,
134 Bridge->PMemAbove4G.Translation
140 if (RESOURCE_VALID (&Bridge->Mem)) {
141 ASSERT (Bridge->Mem.Limit < SIZE_4GB);
142 if (Bridge->Mem.Limit >= SIZE_4GB) {
147 if (RESOURCE_VALID (&Bridge->MemAbove4G)) {
148 ASSERT (Bridge->MemAbove4G.Base >= SIZE_4GB);
149 if (Bridge->MemAbove4G.Base < SIZE_4GB) {
154 if (RESOURCE_VALID (&Bridge->PMem)) {
155 ASSERT (Bridge->PMem.Limit < SIZE_4GB);
156 if (Bridge->PMem.Limit >= SIZE_4GB) {
161 if (RESOURCE_VALID (&Bridge->PMemAbove4G)) {
162 ASSERT (Bridge->PMemAbove4G.Base >= SIZE_4GB);
163 if (Bridge->PMemAbove4G.Base < SIZE_4GB) {
171 if (!Bridge->ResourceAssigned) {
178 ASSERT (!RESOURCE_VALID (&Bridge->PMem));
179 ASSERT (!RESOURCE_VALID (&Bridge->PMemAbove4G));
180 if (RESOURCE_VALID (&Bridge->PMem) || RESOURCE_VALID (&Bridge->PMemAbove4G)) {
190 ASSERT (!RESOURCE_VALID (&Bridge->MemAbove4G));
191 ASSERT (!RESOURCE_VALID (&Bridge->PMemAbove4G));
192 if (RESOURCE_VALID (&Bridge->MemAbove4G) || RESOURCE_VALID (&Bridge->PMemAbove4G)) {
199 ASSERT (RootBridge !=
NULL);
201 RootBridge->Signature = PCI_ROOT_BRIDGE_SIGNATURE;
202 RootBridge->Supports = Bridge->Supports;
203 RootBridge->Attributes = Bridge->Attributes;
204 RootBridge->DmaAbove4G = Bridge->DmaAbove4G;
205 RootBridge->NoExtendedConfigSpace = Bridge->NoExtendedConfigSpace;
206 RootBridge->AllocationAttributes = Bridge->AllocationAttributes;
208 RootBridge->DevicePathStr = DevicePathStr;
212 ASSERT (RootBridge->ConfigBuffer !=
NULL);
222 for (Index = TypeIo; Index < TypeMax; Index++) {
225 Aperture = &RootBridge->Bus;
228 Aperture = &RootBridge->Io;
231 Aperture = &RootBridge->Mem;
234 Aperture = &RootBridge->MemAbove4G;
237 Aperture = &RootBridge->PMem;
240 Aperture = &RootBridge->PMemAbove4G;
248 RootBridge->ResAllocNode[Index].Type = Index;
249 if (Bridge->ResourceAssigned && (Aperture->Limit >= Aperture->Base)) {
254 RootBridge->ResAllocNode[Index].Base = TO_HOST_ADDRESS (
256 Aperture->Translation
258 RootBridge->ResAllocNode[Index].Length = Aperture->Limit - Aperture->Base + 1;
259 RootBridge->ResAllocNode[Index].Status = ResAllocated;
261 RootBridge->ResAllocNode[Index].Base = 0;
262 RootBridge->ResAllocNode[Index].Length = 0;
263 RootBridge->ResAllocNode[Index].Status = ResNone;
331 IN OPERATION_TYPE OperationType,
348 if (Buffer ==
NULL) {
349 return EFI_INVALID_PARAMETER;
355 if ((UINT32)Width >= EfiPciWidthMaximum) {
356 return EFI_INVALID_PARAMETER;
363 if ((Width >= EfiPciWidthFifoUint8) && (Width <= EfiPciWidthFifoUint64)) {
373 if (Count >
DivU64x32 (MAX_UINT64, Size)) {
374 return EFI_INVALID_PARAMETER;
380 if ((Address & (Size - 1)) != 0) {
381 return EFI_UNSUPPORTED;
388 if (Address > MAX_UINT64 - Length) {
389 return EFI_INVALID_PARAMETER;
392 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
406 if (OperationType == IoOperation) {
410 if (Address + Length <= 0x1000) {
411 if ((RootBridge->Attributes & (
412 EFI_PCI_ATTRIBUTE_ISA_IO | EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_ATTRIBUTE_VGA_IO |
413 EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO | EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO |
414 EFI_PCI_ATTRIBUTE_ISA_IO_16 | EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 | EFI_PCI_ATTRIBUTE_VGA_IO_16)) != 0)
420 Base = RootBridge->Io.Base;
421 Limit = RootBridge->Io.Limit;
422 }
else if (OperationType == MemOperation) {
426 if ((Address >= 0xA0000) && ((Address + Length) <= 0xC0000)) {
427 if ((RootBridge->Attributes & EFI_PCI_ATTRIBUTE_VGA_MEMORY) != 0) {
436 if ((Address >= RootBridge->Mem.Base) && (Address + Length <= RootBridge->Mem.Limit + 1)) {
437 Base = RootBridge->Mem.Base;
438 Limit = RootBridge->Mem.Limit;
439 }
else if ((Address >= RootBridge->PMem.Base) && (Address + Length <= RootBridge->PMem.Limit + 1)) {
440 Base = RootBridge->PMem.Base;
441 Limit = RootBridge->PMem.Limit;
442 }
else if ((Address >= RootBridge->MemAbove4G.Base) && (Address + Length <= RootBridge->MemAbove4G.Limit + 1)) {
443 Base = RootBridge->MemAbove4G.Base;
444 Limit = RootBridge->MemAbove4G.Limit;
446 Base = RootBridge->PMemAbove4G.Base;
447 Limit = RootBridge->PMemAbove4G.Limit;
451 if ((PciRbAddr->Bus < RootBridge->Bus.Base) ||
452 (PciRbAddr->Bus > RootBridge->Bus.Limit))
454 return EFI_INVALID_PARAMETER;
457 if ((PciRbAddr->Device > PCI_MAX_DEVICE) ||
458 (PciRbAddr->Function > PCI_MAX_FUNC))
460 return EFI_INVALID_PARAMETER;
463 if (PciRbAddr->ExtendedRegister != 0) {
464 Address = PciRbAddr->ExtendedRegister;
466 Address = PciRbAddr->Register;
470 Limit = RootBridge->NoExtendedConfigSpace ? 0xFF : 0xFFF;
473 if (Address < Base) {
474 return EFI_INVALID_PARAMETER;
477 if (Address + Length > Limit + 1) {
478 return EFI_INVALID_PARAMETER;
500 IN OUT UINT64 *Translation
503 if ((Address >= RootBridge->Mem.Base) && (Address <= RootBridge->Mem.Limit)) {
504 *Translation = RootBridge->Mem.Translation;
505 }
else if ((Address >= RootBridge->PMem.Base) && (Address <= RootBridge->PMem.Limit)) {
506 *Translation = RootBridge->PMem.Translation;
507 }
else if ((Address >= RootBridge->MemAbove4G.Base) && (Address <= RootBridge->MemAbove4G.Limit)) {
508 *Translation = RootBridge->MemAbove4G.Translation;
509 }
else if ((Address >= RootBridge->PMemAbove4G.Base) && (Address <= RootBridge->PMemAbove4G.Limit)) {
510 *Translation = RootBridge->PMemAbove4G.Translation;
512 return EFI_INVALID_PARAMETER;
531 IN UINT64 Multiplicand,
532 IN UINT64 Multiplier,
534 OUT UINT32 *Remainder OPTIONAL
538 UINT32 LocalRemainder;
545 if (Multiplicand < Multiplier) {
546 Uint64 = Multiplicand;
547 Multiplicand = Multiplier;
560 if ((Multiplicand & 0x1) == 1) {
591 PreviousTick = *CurrentTick;
593 if (StartTick < EndTick) {
594 return *CurrentTick - PreviousTick;
596 return PreviousTick - *CurrentTick;
647 UINT64 NumberOfTicks;
655 if (Result ==
NULL) {
656 return EFI_INVALID_PARAMETER;
659 if ((UINT32)Width > EfiPciWidthUint64) {
660 return EFI_INVALID_PARAMETER;
666 Status = This->Mem.Read (This, Width, Address, 1, Result);
667 if (EFI_ERROR (Status)) {
671 if ((*Result & Mask) == Value) {
688 ; ElapsedTick <= NumberOfTicks
689 ; ElapsedTick +=
GetElapsedTick (&CurrentTick, StartTick, EndTick)
692 Status = This->Mem.Read (This, Width, Address, 1, Result);
693 if (EFI_ERROR (Status)) {
697 if ((*Result & Mask) == Value) {
751 UINT64 NumberOfTicks;
763 if (Result ==
NULL) {
764 return EFI_INVALID_PARAMETER;
767 if ((UINT32)Width > EfiPciWidthUint64) {
768 return EFI_INVALID_PARAMETER;
771 Status = This->Io.Read (This, Width, Address, 1, Result);
772 if (EFI_ERROR (Status)) {
776 if ((*Result & Mask) == Value) {
793 ; ElapsedTick <= NumberOfTicks
794 ; ElapsedTick +=
GetElapsedTick (&CurrentTick, StartTick, EndTick)
797 Status = This->Io.Read (This, Width, Address, 1, Result);
798 if (EFI_ERROR (Status)) {
802 if ((*Result & Mask) == Value) {
860 if (EFI_ERROR (Status)) {
864 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
866 if (EFI_ERROR (Status)) {
875 TO_HOST_ADDRESS (Address, Translation),
930 if (EFI_ERROR (Status)) {
934 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
936 if (EFI_ERROR (Status)) {
945 TO_HOST_ADDRESS (Address, Translation),
993 if (EFI_ERROR (Status)) {
997 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1004 TO_HOST_ADDRESS (Address, RootBridge->Io.Translation),
1052 if (EFI_ERROR (Status)) {
1056 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1063 TO_HOST_ADDRESS (Address, RootBridge->Io.Translation),
1105 IN UINT64 DestAddress,
1106 IN UINT64 SrcAddress,
1116 if ((UINT32)Width > EfiPciWidthUint64) {
1117 return EFI_INVALID_PARAMETER;
1120 if (DestAddress == SrcAddress) {
1124 Stride = (
UINTN)(1 << Width);
1127 if ((DestAddress > SrcAddress) &&
1128 (DestAddress < (SrcAddress + Count * Stride)))
1131 SrcAddress = SrcAddress + (Count - 1) * Stride;
1132 DestAddress = DestAddress + (Count - 1) * Stride;
1135 for (Index = 0; Index < Count; Index++) {
1143 if (EFI_ERROR (Status)) {
1154 if (EFI_ERROR (Status)) {
1159 SrcAddress += Stride;
1160 DestAddress += Stride;
1162 SrcAddress -= Stride;
1163 DestAddress -= Stride;
1205 if (EFI_ERROR (Status)) {
1212 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1213 CopyMem (&PciAddress, &Address,
sizeof (PciAddress));
1215 if (PciAddress.ExtendedRegister == 0) {
1216 PciAddress.ExtendedRegister = PciAddress.Register;
1223 PciAddress.Function,
1224 PciAddress.ExtendedRegister
1230 InStride = mInStride[Width];
1231 OutStride = mOutStride[Width];
1232 Size = (
UINTN)(1 << (Width & 0x03));
1233 for (Uint8Buffer = Buffer; Count > 0; Address += InStride, Uint8Buffer += OutStride, Count--) {
1334 IN VOID *HostAddress,
1345 if ((HostAddress ==
NULL) || (NumberOfBytes ==
NULL) || (DeviceAddress ==
NULL) ||
1348 return EFI_INVALID_PARAMETER;
1354 if ((UINT32)Operation >= EfiPciOperationMaximum) {
1355 return EFI_INVALID_PARAMETER;
1358 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1360 if (mIoMmu !=
NULL) {
1361 if (!RootBridge->DmaAbove4G) {
1370 Status = mIoMmu->Map (
1382 if ((!RootBridge->DmaAbove4G ||
1386 ((PhysicalAddress + *NumberOfBytes) > SIZE_4GB))
1402 return EFI_UNSUPPORTED;
1410 if (MapInfo ==
NULL) {
1412 return EFI_OUT_OF_RESOURCES;
1418 MapInfo->Signature = MAP_INFO_SIGNATURE;
1419 MapInfo->Operation = Operation;
1420 MapInfo->NumberOfBytes = *NumberOfBytes;
1422 MapInfo->HostAddress = PhysicalAddress;
1423 MapInfo->MappedHostAddress = SIZE_4GB - 1;
1428 Status =
gBS->AllocatePages (
1431 MapInfo->NumberOfPages,
1432 &MapInfo->MappedHostAddress
1434 if (EFI_ERROR (Status)) {
1449 (VOID *)(
UINTN)MapInfo->MappedHostAddress,
1450 (VOID *)(
UINTN)MapInfo->HostAddress,
1451 MapInfo->NumberOfBytes
1460 *DeviceAddress = MapInfo->MappedHostAddress;
1471 *DeviceAddress = PhysicalAddress;
1472 *Mapping = NO_MAPPING;
1507 if (mIoMmu !=
NULL) {
1508 Status = mIoMmu->Unmap (
1515 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1522 if (Mapping == NO_MAPPING) {
1526 MapInfo = NO_MAPPING;
1528 ; !
IsNull (&RootBridge->Maps, Link)
1532 MapInfo = MAP_INFO_FROM_LINK (Link);
1533 if (MapInfo == Mapping) {
1541 if (MapInfo != Mapping) {
1542 return EFI_INVALID_PARAMETER;
1556 (VOID *)(
UINTN)MapInfo->HostAddress,
1557 (VOID *)(
UINTN)MapInfo->MappedHostAddress,
1558 MapInfo->NumberOfBytes
1565 gBS->FreePages (MapInfo->MappedHostAddress, MapInfo->NumberOfPages);
1603 OUT VOID **HostAddress,
1604 IN UINT64 Attributes
1615 if ((Attributes & EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER) != 0) {
1616 return EFI_UNSUPPORTED;
1622 if (HostAddress ==
NULL) {
1623 return EFI_INVALID_PARAMETER;
1633 return EFI_INVALID_PARAMETER;
1636 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1638 if (mIoMmu !=
NULL) {
1639 if (!RootBridge->DmaAbove4G) {
1643 Attributes &= ~((UINT64)EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE);
1646 Status = mIoMmu->AllocateBuffer (
1658 if (!RootBridge->DmaAbove4G ||
1659 ((Attributes & EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) == 0))
1668 Status =
gBS->AllocatePages (
1674 if (!EFI_ERROR (Status)) {
1675 *HostAddress = (VOID *)(
UINTN)PhysicalAddress;
1700 OUT VOID *HostAddress
1705 if (mIoMmu !=
NULL) {
1706 Status = mIoMmu->FreeBuffer (
1773 OUT UINT64 *Supported,
1774 OUT UINT64 *Attributes
1779 if ((Attributes ==
NULL) && (Supported ==
NULL)) {
1780 return EFI_INVALID_PARAMETER;
1783 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1787 if (Supported !=
NULL) {
1788 *Supported = RootBridge->Supports;
1791 if (Attributes !=
NULL) {
1792 *Attributes = RootBridge->Attributes;
1838 IN UINT64 Attributes,
1839 IN OUT UINT64 *ResourceBase,
1840 IN OUT UINT64 *ResourceLength
1845 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1847 if ((Attributes & (~RootBridge->Supports)) != 0) {
1848 return EFI_UNSUPPORTED;
1851 RootBridge->Attributes = Attributes;
1884 OUT VOID **Resources
1887 PCI_RESOURCE_TYPE Index;
1896 RootBridge = ROOT_BRIDGE_FROM_THIS (This);
1898 RootBridge->ConfigBuffer,
1901 Descriptor = RootBridge->ConfigBuffer;
1902 for (Index = TypeIo; Index < TypeMax; Index++) {
1903 ResAllocNode = &RootBridge->ResAllocNode[Index];
1905 if (ResAllocNode->Status != ResAllocated) {
1909 Descriptor->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
1914 Descriptor->AddrRangeMin = ResAllocNode->Base;
1915 Descriptor->AddrRangeMax = ResAllocNode->Base + ResAllocNode->Length - 1;
1916 Descriptor->AddrLen = ResAllocNode->Length;
1922 switch (ResAllocNode->Type) {
1924 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_IO;
1928 Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
1930 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
1931 Descriptor->AddrSpaceGranularity = 32;
1935 Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
1937 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
1938 Descriptor->AddrSpaceGranularity = 64;
1942 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_BUS;
1956 End->Desc = ACPI_END_TAG_DESCRIPTOR;
1957 End->Checksum = 0x0;
1959 *Resources = RootBridge->ConfigBuffer;
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
UINT64 EFIAPI GetPerformanceCounterProperties(OUT UINT64 *StartValue OPTIONAL, OUT UINT64 *EndValue OPTIONAL)
UINT64 EFIAPI GetPerformanceCounter(VOID)
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
UINT64 EFIAPI MultU64x64(IN UINT64 Multiplicand, IN UINT64 Multiplier)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
VOID EFIAPI MemoryFence(VOID)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT64 EFIAPI MultU64x32(IN UINT64 Multiplicand, IN UINT32 Multiplier)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
UINT64 EFIAPI DivU64x64Remainder(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_CPU_IO_PROTOCOL_WIDTH
CHAR16 *EFIAPI ConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINTN EFIAPI PciSegmentReadBuffer(IN UINT64 StartAddress, IN UINTN Size, OUT VOID *Buffer)
#define PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register)
UINTN EFIAPI PciSegmentWriteBuffer(IN UINT64 StartAddress, IN UINTN Size, IN VOID *Buffer)
#define DEBUG(Expression)
UINT64 GetTranslationByResourceType(IN PCI_ROOT_BRIDGE_INSTANCE *RootBridge, IN PCI_RESOURCE_TYPE ResourceType)
#define EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM
#define EFI_PCI_HOST_BRIDGE_MEM64_DECODE
EFI_STATUS EFIAPI RootBridgeIoPollMem(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINT64 Mask, IN UINT64 Value, IN UINT64 Delay, OUT UINT64 *Result)
EFI_STATUS EFIAPI RootBridgeIoMemRead(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
EFI_STATUS EFIAPI RootBridgeIoUnmap(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN VOID *Mapping)
PCI_ROOT_BRIDGE_INSTANCE * CreateRootBridge(IN PCI_ROOT_BRIDGE *Bridge)
UINT64 GetElapsedTick(UINT64 *CurrentTick, UINT64 StartTick, UINT64 EndTick)
EFI_STATUS EFIAPI RootBridgeIoPciWrite(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI RootBridgeIoIoRead(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
EFI_STATUS EFIAPI RootBridgeIoSetAttributes(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN UINT64 Attributes, IN OUT UINT64 *ResourceBase, IN OUT UINT64 *ResourceLength)
EFI_STATUS EFIAPI RootBridgeIoPciAccess(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN BOOLEAN Read, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS RootBridgeIoGetMemTranslationByAddress(IN PCI_ROOT_BRIDGE_INSTANCE *RootBridge, IN UINT64 Address, IN OUT UINT64 *Translation)
EFI_STATUS EFIAPI RootBridgeIoGetAttributes(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, OUT UINT64 *Supported, OUT UINT64 *Attributes)
UINT64 MultThenDivU64x64x32(IN UINT64 Multiplicand, IN UINT64 Multiplier, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
EFI_STATUS EFIAPI RootBridgeIoFreeBuffer(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN UINTN Pages, OUT VOID *HostAddress)
EFI_STATUS EFIAPI RootBridgeIoIoWrite(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS RootBridgeIoCheckParameter(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN OPERATION_TYPE OperationType, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS EFIAPI RootBridgeIoCopyMem(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 DestAddress, IN UINT64 SrcAddress, IN UINTN Count)
EFI_STATUS EFIAPI RootBridgeIoAllocateBuffer(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT VOID **HostAddress, IN UINT64 Attributes)
EFI_STATUS EFIAPI RootBridgeIoMemWrite(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
EFI_STATUS EFIAPI RootBridgeIoConfiguration(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, OUT VOID **Resources)
EFI_STATUS EFIAPI RootBridgeIoMap(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation, IN VOID *HostAddress, IN OUT UINTN *NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_STATUS EFIAPI RootBridgeIoFlush(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This)
EFI_STATUS EFIAPI RootBridgeIoPollIo(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINT64 Mask, IN UINT64 Value, IN UINT64 Delay, OUT UINT64 *Result)
EFI_STATUS EFIAPI RootBridgeIoPciRead(IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION
@ EfiPciOperationBusMasterCommonBuffer
@ EfiPciOperationBusMasterWrite
@ EfiPciOperationBusMasterRead64
@ EfiPciOperationBusMasterWrite64
@ EfiPciOperationBusMasterRead
@ EfiPciOperationBusMasterCommonBuffer64
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_SIZE_TO_PAGES(Size)
#define EFI_TIMER_PERIOD_SECONDS(Seconds)
EFI_CPU_IO_PROTOCOL_ACCESS Io
EFI_CPU_IO_PROTOCOL_ACCESS Mem
EFI_CPU_IO_PROTOCOL_IO_MEM Read
EFI_CPU_IO_PROTOCOL_IO_MEM Write
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read