16#define EFI_PCI_IO_PROTOCOL_GUID \
18 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \
29 EfiPciIoWidthUint8 = 0,
33 EfiPciIoWidthFifoUint8,
34 EfiPciIoWidthFifoUint16,
35 EfiPciIoWidthFifoUint32,
36 EfiPciIoWidthFifoUint64,
37 EfiPciIoWidthFillUint8,
38 EfiPciIoWidthFillUint16,
39 EfiPciIoWidthFillUint32,
40 EfiPciIoWidthFillUint64,
47#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff
48#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f
49#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
50#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
51#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004
52#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008
53#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010
54#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
55#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
56#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
57#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100
58#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200
59#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400
60#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800
61#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000
62#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000
63#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000
64#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
65#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000
66#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
67#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000
69#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
70#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
91 EfiPciIoOperationMaximum
120 EfiPciIoAttributeOperationMaximum
272 IN UINT8 DestBarIndex,
273 IN UINT64 DestOffset,
274 IN UINT8 SrcBarIndex,
303 IN VOID *HostAddress,
353 OUT VOID **HostAddress,
441 IN UINT64 Attributes,
503 IN UINT64 Attributes,
505 IN OUT UINT64 *Offset,
506 IN OUT UINT64 *Length
549extern EFI_GUID gEfiPciIoProtocolGuid;
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_GET_LOCATION)(IN EFI_PCI_IO_PROTOCOL *This, OUT UINTN *SegmentNumber, OUT UINTN *BusNumber, OUT UINTN *DeviceNumber, OUT UINTN *FunctionNumber)
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_CONFIG)(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 * EFI_PCI_IO_PROTOCOL_FLUSH)(IN EFI_PCI_IO_PROTOCOL *This)
EFI_PCI_IO_PROTOCOL_WIDTH
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_MAP)(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 * EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES)(IN EFI_PCI_IO_PROTOCOL *This, IN UINT64 Attributes, IN UINT8 BarIndex, IN OUT UINT64 *Offset, IN OUT UINT64 *Length)
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES)(IN EFI_PCI_IO_PROTOCOL *This, IN UINT8 BarIndex, OUT UINT64 *Supports OPTIONAL, OUT VOID **Resources OPTIONAL)
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_POLL_IO_MEM)(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 * EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER)(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 * EFI_PCI_IO_PROTOCOL_COPY_MEM)(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 * EFI_PCI_IO_PROTOCOL_FREE_BUFFER)(IN EFI_PCI_IO_PROTOCOL *This, IN UINTN Pages, IN VOID *HostAddress)
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_ATTRIBUTES)(IN EFI_PCI_IO_PROTOCOL *This, IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation, IN UINT64 Attributes, OUT UINT64 *Result OPTIONAL)
EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
@ EfiPciIoAttributeOperationDisable
@ EfiPciIoAttributeOperationGet
@ EfiPciIoAttributeOperationEnable
@ EfiPciIoAttributeOperationSet
@ EfiPciIoAttributeOperationSupported
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_UNMAP)(IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping)
EFI_PCI_IO_PROTOCOL_OPERATION
@ EfiPciIoOperationBusMasterWrite
@ EfiPciIoOperationBusMasterRead
@ EfiPciIoOperationBusMasterCommonBuffer
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_IO_MEM)(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)
UINT64 EFI_PHYSICAL_ADDRESS
EFI_PCI_IO_PROTOCOL_IO_MEM Write
EFI_PCI_IO_PROTOCOL_IO_MEM Read
EFI_PCI_IO_PROTOCOL_CONFIG Read
EFI_PCI_IO_PROTOCOL_CONFIG Write