84 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
85 return EFI_INVALID_PARAMETER;
95 if (BarIndex >= PCI_MAX_BAR) {
96 return EFI_INVALID_PARAMETER;
100 return EFI_INVALID_PARAMETER;
107 if ((Width >= EfiPciIoWidthFifoUint8) && (Width <= EfiPciIoWidthFifoUint64)) {
113 if ((*Offset + Count * (
UINTN)(1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
114 return EFI_INVALID_PARAMETER;
117 *Offset = *Offset + PciIoDevice->PciBar[BarIndex].BaseAddress;
145 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
146 return EFI_INVALID_PARAMETER;
154 if (PciIoDevice->IsPciExp) {
156 return EFI_UNSUPPORTED;
160 *Offset = EFI_PCI_ADDRESS (PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber, 0);
161 *Offset = (*Offset) | ExtendOffset;
163 if ((*Offset + Count * (
UINTN)(1 << Width)) - 1 >= PCI_MAX_CONFIG_OFFSET) {
164 return EFI_UNSUPPORTED;
167 *Offset = EFI_PCI_ADDRESS (PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber, *Offset);
211 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
213 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
214 return EFI_INVALID_PARAMETER;
218 if (EFI_ERROR (Status)) {
219 return EFI_UNSUPPORTED;
222 if (Width > EfiPciIoWidthUint64) {
223 return EFI_INVALID_PARAMETER;
230 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
231 Status =
PciIoMemRead (This, Width, BarIndex, Offset, 1, Result);
232 if (EFI_ERROR (Status)) {
236 if (((*Result & Mask) == Value) || (Delay == 0)) {
246 Status =
PciIoMemRead (This, Width, BarIndex, Offset, 1, Result);
247 if (EFI_ERROR (Status)) {
251 if ((*Result & Mask) == Value) {
264 Status = PciIoDevice->PciRootBridgeIo->PollMem (
265 PciIoDevice->PciRootBridgeIo,
274 if (EFI_ERROR (Status)) {
277 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
278 PciIoDevice->DevicePath
323 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
325 if ((UINT32)Width > EfiPciIoWidthUint64) {
326 return EFI_INVALID_PARAMETER;
330 if (EFI_ERROR (Status)) {
331 return EFI_UNSUPPORTED;
338 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
339 Status =
PciIoIoRead (This, Width, BarIndex, Offset, 1, Result);
340 if (EFI_ERROR (Status)) {
344 if (((*Result & Mask) == Value) || (Delay == 0)) {
354 Status =
PciIoIoRead (This, Width, BarIndex, Offset, 1, Result);
355 if (EFI_ERROR (Status)) {
359 if ((*Result & Mask) == Value) {
372 Status = PciIoDevice->PciRootBridgeIo->PollIo (
373 PciIoDevice->PciRootBridgeIo,
382 if (EFI_ERROR (Status)) {
385 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
386 PciIoDevice->DevicePath
427 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
429 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
430 return EFI_INVALID_PARAMETER;
433 if (Buffer ==
NULL) {
434 return EFI_INVALID_PARAMETER;
438 if (EFI_ERROR (Status)) {
439 return EFI_UNSUPPORTED;
446 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
447 Count *= (
UINTN)(1 << (Width & 0x03));
452 Status = PciIoDevice->PciRootBridgeIo->Mem.
Read (
453 PciIoDevice->PciRootBridgeIo,
460 if (EFI_ERROR (Status)) {
463 EFI_IO_BUS_PCI | EFI_IOB_EC_READ_ERROR,
464 PciIoDevice->DevicePath
505 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
507 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
508 return EFI_INVALID_PARAMETER;
511 if (Buffer ==
NULL) {
512 return EFI_INVALID_PARAMETER;
516 if (EFI_ERROR (Status)) {
517 return EFI_UNSUPPORTED;
524 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
525 Count *= (
UINTN)(1 << (Width & 0x03));
530 Status = PciIoDevice->PciRootBridgeIo->Mem.
Write (
531 PciIoDevice->PciRootBridgeIo,
538 if (EFI_ERROR (Status)) {
541 EFI_IO_BUS_PCI | EFI_IOB_EC_WRITE_ERROR,
542 PciIoDevice->DevicePath
583 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
585 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
586 return EFI_INVALID_PARAMETER;
589 if (Buffer ==
NULL) {
590 return EFI_INVALID_PARAMETER;
594 if (EFI_ERROR (Status)) {
595 return EFI_UNSUPPORTED;
602 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
603 Count *= (
UINTN)(1 << (Width & 0x03));
608 Status = PciIoDevice->PciRootBridgeIo->Io.
Read (
609 PciIoDevice->PciRootBridgeIo,
616 if (EFI_ERROR (Status)) {
619 EFI_IO_BUS_PCI | EFI_IOB_EC_READ_ERROR,
620 PciIoDevice->DevicePath
661 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
663 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
664 return EFI_INVALID_PARAMETER;
667 if (Buffer ==
NULL) {
668 return EFI_INVALID_PARAMETER;
672 if (EFI_ERROR (Status)) {
673 return EFI_UNSUPPORTED;
680 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
681 Count *= (
UINTN)(1 << (Width & 0x03));
686 Status = PciIoDevice->PciRootBridgeIo->Io.
Write (
687 PciIoDevice->PciRootBridgeIo,
694 if (EFI_ERROR (Status)) {
697 EFI_IO_BUS_PCI | EFI_IOB_EC_WRITE_ERROR,
698 PciIoDevice->DevicePath
737 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
741 if (EFI_ERROR (Status)) {
749 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
750 Count *= (
UINTN)(1 << (Width & 0x03));
755 Status = PciIoDevice->PciRootBridgeIo->Pci.
Read (
756 PciIoDevice->PciRootBridgeIo,
763 if (EFI_ERROR (Status)) {
766 EFI_IO_BUS_PCI | EFI_IOB_EC_READ_ERROR,
767 PciIoDevice->DevicePath
806 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
810 if (EFI_ERROR (Status)) {
818 if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) {
819 Count *= (
UINTN)(1 << (Width & 0x03));
824 Status = PciIoDevice->PciRootBridgeIo->Pci.
Write (
825 PciIoDevice->PciRootBridgeIo,
832 if (EFI_ERROR (Status)) {
835 EFI_IO_BUS_PCI | EFI_IOB_EC_WRITE_ERROR,
836 PciIoDevice->DevicePath
876 IN UINT8 DestBarIndex,
877 IN UINT64 DestOffset,
878 IN UINT8 SrcBarIndex,
886 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
888 if ((UINT32)Width >= EfiPciIoWidthMaximum) {
889 return EFI_INVALID_PARAMETER;
892 if ((Width == EfiPciIoWidthFifoUint8) ||
893 (Width == EfiPciIoWidthFifoUint16) ||
894 (Width == EfiPciIoWidthFifoUint32) ||
895 (Width == EfiPciIoWidthFifoUint64) ||
896 (Width == EfiPciIoWidthFillUint8) ||
897 (Width == EfiPciIoWidthFillUint16) ||
898 (Width == EfiPciIoWidthFillUint32) ||
899 (Width == EfiPciIoWidthFillUint64))
901 return EFI_INVALID_PARAMETER;
904 Status =
PciIoVerifyBarAccess (PciIoDevice, DestBarIndex, PciBarTypeMem, Width, Count, &DestOffset);
905 if (EFI_ERROR (Status)) {
906 return EFI_UNSUPPORTED;
909 Status =
PciIoVerifyBarAccess (PciIoDevice, SrcBarIndex, PciBarTypeMem, Width, Count, &SrcOffset);
910 if (EFI_ERROR (Status)) {
911 return EFI_UNSUPPORTED;
918 if (((SrcOffset & ((1 << (Width & 0x03)) - 1)) != 0) || ((DestOffset & ((1 << (Width & 0x03)) - 1)) != 0)) {
919 Count *= (
UINTN)(1 << (Width & 0x03));
924 Status = PciIoDevice->PciRootBridgeIo->CopyMem (
925 PciIoDevice->PciRootBridgeIo,
932 if (EFI_ERROR (Status)) {
935 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
936 PciIoDevice->DevicePath
967 IN VOID *HostAddress,
975 UINT64 IoMmuAttribute;
978 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
980 if ((UINT32)Operation >= EfiPciIoOperationMaximum) {
981 return EFI_INVALID_PARAMETER;
984 if ((HostAddress ==
NULL) || (NumberOfBytes ==
NULL) || (DeviceAddress ==
NULL) || (Mapping ==
NULL)) {
985 return EFI_INVALID_PARAMETER;
993 Status = PciIoDevice->PciRootBridgeIo->Map (
994 PciIoDevice->PciRootBridgeIo,
995 RootBridgeIoOperation,
1002 if (EFI_ERROR (Status)) {
1005 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1006 PciIoDevice->DevicePath
1010 if (mIoMmuProtocol !=
NULL) {
1011 if (!EFI_ERROR (Status)) {
1012 switch (Operation) {
1014 IoMmuAttribute = EDKII_IOMMU_ACCESS_READ;
1017 IoMmuAttribute = EDKII_IOMMU_ACCESS_WRITE;
1020 IoMmuAttribute = EDKII_IOMMU_ACCESS_READ | EDKII_IOMMU_ACCESS_WRITE;
1024 return EFI_INVALID_PARAMETER;
1027 Status = mIoMmuProtocol->SetAttribute (
1029 PciIoDevice->Handle,
1059 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1061 if (mIoMmuProtocol !=
NULL) {
1062 mIoMmuProtocol->SetAttribute (
1064 PciIoDevice->Handle,
1070 Status = PciIoDevice->PciRootBridgeIo->Unmap (
1071 PciIoDevice->PciRootBridgeIo,
1075 if (EFI_ERROR (Status)) {
1078 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1079 PciIoDevice->DevicePath
1113 OUT VOID **HostAddress,
1114 IN UINT64 Attributes
1121 (~(EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED))) != 0)
1123 return EFI_UNSUPPORTED;
1126 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1129 Attributes |= EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE;
1132 Status = PciIoDevice->PciRootBridgeIo->AllocateBuffer (
1133 PciIoDevice->PciRootBridgeIo,
1141 if (EFI_ERROR (Status)) {
1144 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1145 PciIoDevice->DevicePath
1169 IN VOID *HostAddress
1175 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1177 Status = PciIoDevice->PciRootBridgeIo->FreeBuffer (
1178 PciIoDevice->PciRootBridgeIo,
1183 if (EFI_ERROR (Status)) {
1186 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1187 PciIoDevice->DevicePath
1214 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1216 Status = PciIoDevice->PciRootBridgeIo->Flush (
1217 PciIoDevice->PciRootBridgeIo
1219 if (EFI_ERROR (Status)) {
1222 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1223 PciIoDevice->DevicePath
1255 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1257 if ((Segment ==
NULL) || (Bus ==
NULL) || (Device ==
NULL) || (Function ==
NULL)) {
1258 return EFI_INVALID_PARAMETER;
1262 *Bus = PciIoDevice->BusNumber;
1263 *Device = PciIoDevice->DeviceNumber;
1264 *Function = PciIoDevice->FunctionNumber;
1285 IN PCI_BAR_TYPE BarType
1291 if ((PciIoDevice->PciBar[BarIndex].BarType != PciBarTypeMem32) &&
1292 (PciIoDevice->PciBar[BarIndex].BarType != PciBarTypePMem32) &&
1293 (PciIoDevice->PciBar[BarIndex].BarType != PciBarTypePMem64) &&
1294 (PciIoDevice->PciBar[BarIndex].BarType != PciBarTypeMem64))
1302 if ((PciIoDevice->PciBar[BarIndex].BarType != PciBarTypeIo32) &&
1303 (PciIoDevice->PciBar[BarIndex].BarType != PciBarTypeIo16))
1331 IN UINT64 Attributes,
1335 UINT64 PciRootBridgeSupports;
1336 UINT64 PciRootBridgeAttributes;
1337 UINT64 NewPciRootBridgeAttributes;
1343 Status = PciIoDevice->PciRootBridgeIo->GetAttributes (
1344 PciIoDevice->PciRootBridgeIo,
1345 &PciRootBridgeSupports,
1346 &PciRootBridgeAttributes
1348 if (EFI_ERROR (Status)) {
1349 return EFI_UNSUPPORTED;
1363 NewPciRootBridgeAttributes = PciRootBridgeAttributes | Attributes;
1365 NewPciRootBridgeAttributes = PciRootBridgeAttributes & (~Attributes);
1371 if ((NewPciRootBridgeAttributes ^ PciRootBridgeAttributes) != 0) {
1372 Status = PciIoDevice->PciRootBridgeIo->SetAttributes (
1373 PciIoDevice->PciRootBridgeIo,
1374 NewPciRootBridgeAttributes,
1378 if (EFI_ERROR (Status)) {
1382 return EFI_UNSUPPORTED;
1389 PciIoDevice->Attributes = NewPciRootBridgeAttributes;
1418 return EFI_UNSUPPORTED;
1447 if (Temp->Parent == PciIoDevice->Parent) {
1459 return EFI_UNSUPPORTED;
1466 return EFI_UNSUPPORTED;
1479 if (Temp->BusNumber < PciIoDevice->BusNumber) {
1487 return EFI_UNSUPPORTED;
1497 return EFI_UNSUPPORTED;
1528 IN UINT64 Attributes,
1529 OUT UINT64 *Result OPTIONAL
1539 UINT64 UpStreamAttributes;
1540 UINT16 BridgeControl;
1543 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1545 switch (Operation) {
1547 if (Result ==
NULL) {
1548 return EFI_INVALID_PARAMETER;
1551 *Result = PciIoDevice->Attributes;
1555 if (Result ==
NULL) {
1556 return EFI_INVALID_PARAMETER;
1559 *Result = PciIoDevice->Supports;
1563 Status = PciIoDevice->PciIo.Attributes (
1564 &(PciIoDevice->PciIo),
1569 if (EFI_ERROR (Status)) {
1570 return EFI_UNSUPPORTED;
1573 Status = PciIoDevice->PciIo.Attributes (
1574 &(PciIoDevice->PciIo),
1576 (~Attributes) & (PciIoDevice->Supports),
1579 if (EFI_ERROR (Status)) {
1580 return EFI_UNSUPPORTED;
1590 return EFI_INVALID_PARAMETER;
1599 if ((Attributes & EFI_PCI_DEVICE_ENABLE) == EFI_PCI_DEVICE_ENABLE) {
1600 Attributes &= (PciIoDevice->Supports);
1607 EFI_IO_BUS_PCI | EFI_P_PC_ENABLE,
1608 PciIoDevice->DevicePath
1617 return EFI_UNSUPPORTED;
1625 Supports = (PciIoDevice->Supports) & Attributes;
1626 if (Supports != Attributes) {
1627 return EFI_UNSUPPORTED;
1633 if (PciIoDevice->Parent ==
NULL) {
1678 if ((Temp !=
NULL) && (Temp != PciIoDevice)) {
1682 return EFI_UNSUPPORTED;
1697 if (EFI_ERROR (Status)) {
1706 return EFI_UNSUPPORTED;
1733 UpStreamAttributes = Attributes &
1739 UpStreamBridge = PciIoDevice->Parent;
1746 if (BridgeControl != 0) {
1750 PciIoDevice->Attributes |= Attributes;
1755 Status = UpStreamBridge->PciIo.Attributes (
1756 &(UpStreamBridge->PciIo),
1766 if (BridgeControl != 0) {
1770 PciIoDevice->Attributes &= (~Attributes);
1774 if (EFI_ERROR (Status)) {
1777 EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR,
1778 PciIoDevice->DevicePath
1800 UINT64 AddrRangeMin,
1807 Status = RootBridgeIo->Configuration (
1809 (VOID **)&Configuration
1811 if (EFI_ERROR (Status)) {
1819 while (Configuration->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR) {
1820 if ((Configuration->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) &&
1821 (Configuration->AddrRangeMin + Configuration->AddrTranslationOffset <= AddrRangeMin) &&
1822 (Configuration->AddrRangeMin + Configuration->AddrLen + Configuration->AddrTranslationOffset >= AddrRangeMin + AddrLen)
1825 return Configuration->AddrTranslationOffset;
1865 OUT UINT64 *Supports OPTIONAL,
1866 OUT VOID **Resources OPTIONAL
1873 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
1875 if ((Supports ==
NULL) && (Resources ==
NULL)) {
1876 return EFI_INVALID_PARAMETER;
1879 if ((BarIndex >= PCI_MAX_BAR) || (PciIoDevice->PciBar[BarIndex].BarType == PciBarTypeUnknown)) {
1880 return EFI_UNSUPPORTED;
1887 if (Supports !=
NULL) {
1891 if (Resources !=
NULL) {
1893 if (Descriptor ==
NULL) {
1894 return EFI_OUT_OF_RESOURCES;
1897 *Resources = Descriptor;
1899 Descriptor->Desc = ACPI_ADDRESS_SPACE_DESCRIPTOR;
1901 Descriptor->AddrRangeMin = PciIoDevice->PciBar[BarIndex].BaseAddress;
1902 Descriptor->AddrLen = PciIoDevice->PciBar[BarIndex].Length;
1903 Descriptor->AddrRangeMax = PciIoDevice->PciBar[BarIndex].Alignment;
1905 switch (PciIoDevice->PciBar[BarIndex].BarType) {
1906 case PciBarTypeIo16:
1907 case PciBarTypeIo32:
1911 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_IO;
1914 case PciBarTypePMem32:
1918 Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
1922 case PciBarTypeMem32:
1926 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
1930 Descriptor->AddrSpaceGranularity = 32;
1933 case PciBarTypePMem64:
1937 Descriptor->SpecificFlag = EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE;
1941 case PciBarTypeMem64:
1945 Descriptor->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
1949 Descriptor->AddrSpaceGranularity = 64;
1960 End->Desc = ACPI_END_TAG_DESCRIPTOR;
1966 if (Descriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
1968 PciIoDevice->PciRootBridgeIo,
1969 Descriptor->AddrRangeMin,
1972 if (Descriptor->AddrTranslationOffset == (UINT64)-1) {
1974 return EFI_UNSUPPORTED;
1980 Descriptor->AddrRangeMin -= Descriptor->AddrTranslationOffset;
2014 IN UINT64 Attributes,
2016 IN OUT UINT64 *Offset,
2017 IN OUT UINT64 *Length
2022 UINT64 NonRelativeOffset;
2025 PciIoDevice = PCI_IO_DEVICE_FROM_PCI_IO_THIS (This);
2030 if ((Offset ==
NULL) || (Length ==
NULL)) {
2031 return EFI_INVALID_PARAMETER;
2034 if (PciIoDevice->PciBar[BarIndex].BarType == PciBarTypeUnknown) {
2035 return EFI_UNSUPPORTED;
2044 if (Attributes != (Attributes & Supports)) {
2045 return EFI_UNSUPPORTED;
2052 NonRelativeOffset = *Offset;
2061 if (EFI_ERROR (Status)) {
2062 return EFI_UNSUPPORTED;
2087 if (PciDevice1->Parent == PciDevice2->Parent) {
2094 return (BOOLEAN)(Existed1 || Existed2);
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
EFI_PCI_IO_PROTOCOL_WIDTH
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE
Map a memory range so writes are combined.
#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY
MEM cycles 0xA0000-0xBFFFF (24 bit decode)
#define EFI_PCI_IO_PASS_THROUGH_BAR
Special BAR that passes a memory or I/O cycle through unchanged.
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16
I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE
Clear for an add-in PCI Device.
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO
I/O cycles 0x0100-0x03FF or greater (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE
Clear for PCI controllers that can not genrate a DAC.
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16
I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM
Clear for a physical PCI Option ROM accessed through ROM BAR.
EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
@ EfiPciIoAttributeOperationDisable
@ EfiPciIoAttributeOperationGet
@ EfiPciIoAttributeOperationEnable
@ EfiPciIoAttributeOperationSet
@ EfiPciIoAttributeOperationSupported
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED
Map a memory range so all r/w accesses are cached.
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER
Enable the DMA bit in the PCI Config Header.
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO
I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
EFI_PCI_IO_PROTOCOL_OPERATION
@ EfiPciIoOperationBusMasterWrite
@ EfiPciIoOperationBusMasterRead
@ EfiPciIoOperationBusMasterCommonBuffer
#define EFI_PCI_IO_ATTRIBUTE_MEMORY
Enable the Memory decode bit in the PCI Config Header.
#define EFI_PCI_IO_ATTRIBUTE_IO
Enable the I/O decode bit in the PCI Config Header.
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO
I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
#define FeaturePcdGet(TokenName)
#define EFI_PCI_BRIDGE_CONTROL_VGA_16
0x0010
#define IS_PCI_BRIDGE(_p)
#define EFI_PCI_BRIDGE_CONTROL_VGA
0x0008
#define EFI_PCI_COMMAND_MEMORY_SPACE
0x0002
#define EFI_PCI_COMMAND_IO_SPACE
0x0001
#define EFI_PCI_COMMAND_BUS_MASTER
0x0004
#define IS_CARDBUS_BRIDGE(_p)
#define EFI_PCI_BRIDGE_CONTROL_ISA
0x0004
#define EFI_PCI_COMMAND_VGA_PALETTE_SNOOP
0x0020
#define PCI_EXP_MAX_CONFIG_OFFSET
#define PCI_READ_COMMAND_REGISTER(a, b)
#define PCI_ENABLE_BRIDGE_CONTROL_REGISTER(a, b)
#define PCI_DISABLE_COMMAND_REGISTER(a, b)
#define PCI_DISABLE_BRIDGE_CONTROL_REGISTER(a, b)
#define PCI_ENABLE_COMMAND_REGISTER(a, b)
BOOLEAN PciDeviceExisted(IN PCI_IO_DEVICE *Bridge, IN PCI_IO_DEVICE *PciIoDevice)
PCI_IO_DEVICE * LocateVgaDeviceOnHostBridge(IN EFI_HANDLE HostBridgeHandle)
EFI_STATUS EFIAPI PciIoGetLocation(IN EFI_PCI_IO_PROTOCOL *This, OUT UINTN *Segment, OUT UINTN *Bus, OUT UINTN *Device, OUT UINTN *Function)
BOOLEAN CheckBarType(IN PCI_IO_DEVICE *PciIoDevice, IN UINT8 BarIndex, IN PCI_BAR_TYPE BarType)
EFI_STATUS EFIAPI PciIoMemRead(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI PciIoAttributes(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, IN UINT64 Attributes, OUT UINT64 *Result OPTIONAL)
EFI_STATUS EFIAPI PciIoSetBarAttributes(IN EFI_PCI_IO_PROTOCOL *This, IN UINT64 Attributes, IN UINT8 BarIndex, IN OUT UINT64 *Offset, IN OUT UINT64 *Length)
EFI_STATUS EFIAPI PciIoConfigRead(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT32 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI PciIoMemWrite(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS ModifyRootBridgeAttributes(IN PCI_IO_DEVICE *PciIoDevice, IN UINT64 Attributes, IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation)
BOOLEAN PciDevicesOnTheSamePath(IN PCI_IO_DEVICE *PciDevice1, IN PCI_IO_DEVICE *PciDevice2)
EFI_STATUS EFIAPI PciIoPollMem(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINT64 Mask, IN UINT64 Value, IN UINT64 Delay, OUT UINT64 *Result)
EFI_STATUS EFIAPI PciIoMap(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_OPERATION Operation, IN VOID *HostAddress, IN OUT UINTN *NumberOfBytes, OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping)
EFI_STATUS EFIAPI PciIoIoWrite(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINTN Count, IN OUT VOID *Buffer)
VOID InitializePciIoInstance(IN PCI_IO_DEVICE *PciIoDevice)
UINT64 GetMmioAddressTranslationOffset(EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo, UINT64 AddrRangeMin, UINT64 AddrLen)
EFI_STATUS SupportPaletteSnoopAttributes(IN PCI_IO_DEVICE *PciIoDevice, IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation)
EFI_STATUS EFIAPI PciIoConfigWrite(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT32 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI PciIoFlush(IN EFI_PCI_IO_PROTOCOL *This)
EFI_STATUS EFIAPI PciIoGetBarAttributes(IN EFI_PCI_IO_PROTOCOL *This, IN UINT8 BarIndex, OUT UINT64 *Supports OPTIONAL, OUT VOID **Resources OPTIONAL)
EFI_STATUS PciIoVerifyConfigAccess(IN PCI_IO_DEVICE *PciIoDevice, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINTN Count, IN UINT64 *Offset)
EFI_STATUS EFIAPI PciIoCopyMem(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 DestBarIndex, IN UINT64 DestOffset, IN UINT8 SrcBarIndex, IN UINT64 SrcOffset, IN UINTN Count)
EFI_STATUS EFIAPI PciIoPollIo(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINT64 Mask, IN UINT64 Value, IN UINT64 Delay, OUT UINT64 *Result)
EFI_STATUS PciIoVerifyBarAccess(IN PCI_IO_DEVICE *PciIoDevice, IN UINT8 BarIndex, IN PCI_BAR_TYPE Type, IN IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN IN UINTN Count, IN UINT64 *Offset)
EFI_STATUS EFIAPI PciIoUnmap(IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping)
EFI_STATUS EFIAPI PciIoAllocateBuffer(IN EFI_PCI_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 PciIoIoRead(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_WIDTH Width, IN UINT8 BarIndex, IN UINT64 Offset, IN UINTN Count, IN OUT VOID *Buffer)
EFI_STATUS EFIAPI PciIoFreeBuffer(IN EFI_PCI_IO_PROTOCOL *This, IN UINTN Pages, IN VOID *HostAddress)
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION
@ EfiPciOperationBusMasterRead64
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH
#define EFI_PROGRESS_CODE
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read