19#define EFI_PCI_IO_PROTOCOL_GUID \
21 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \
50#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff
51#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f
52#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
53#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
54#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004
55#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008
56#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010
57#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
58#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
59#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
60#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100
61#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200
62#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400
63#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800
64#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000
65#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000
66#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000
67#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
68#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000
69#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
70#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000
72#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
73#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)
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
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)
Retrieves this PCI controller's current PCI bus number, device number, and function number.
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)
Enable a PCI driver to access PCI controller registers in PCI configuration space.
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_FLUSH)(IN EFI_PCI_IO_PROTOCOL *This)
Flushes all PCI posted write transactions from a PCI host bridge to system memory.
EFI_PCI_IO_PROTOCOL_WIDTH
@ EfiPciIoWidthFillUint16
@ EfiPciIoWidthFillUint32
@ EfiPciIoWidthFillUint64
@ EfiPciIoWidthFifoUint64
@ EfiPciIoWidthFifoUint32
@ EfiPciIoWidthFifoUint16
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)
Provides the PCI controller-specific addresses needed to access system memory.
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)
Sets the attributes for a range of a BAR on a PCI controller.
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)
Gets the attributes that this PCI controller supports setting on a BAR using SetBarAttributes(),...
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)
Reads from the memory space of a PCI controller.
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)
Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer or EfiPciOperationBus...
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)
Enables a PCI driver to copy one region of PCI memory space to another region of PCI memory space.
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_FREE_BUFFER)(IN EFI_PCI_IO_PROTOCOL *This, IN UINTN Pages, IN VOID *HostAddress)
Frees memory that was allocated with AllocateBuffer().
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)
Performs an operation on the attributes that this PCI controller supports.
EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
@ EfiPciIoAttributeOperationDisable
Disable the attributes specified by the bits that are set in Attributes for this PCI controller.
@ EfiPciIoAttributeOperationMaximum
@ EfiPciIoAttributeOperationGet
Retrieve the PCI controller's current attributes, and return them in Result.
@ EfiPciIoAttributeOperationEnable
Enable the attributes specified by the bits that are set in Attributes for this PCI controller.
@ EfiPciIoAttributeOperationSet
Set the PCI controller's current attributes to Attributes.
@ EfiPciIoAttributeOperationSupported
Retrieve the PCI controller's supported attributes, and return them in Result.
EFI_STATUS(EFIAPI * EFI_PCI_IO_PROTOCOL_UNMAP)(IN EFI_PCI_IO_PROTOCOL *This, IN VOID *Mapping)
Completes the Map() operation and releases any corresponding resources.
EFI_PCI_IO_PROTOCOL_OPERATION
@ EfiPciIoOperationMaximum
@ EfiPciIoOperationBusMasterWrite
A write operation from system memory by a bus master.
@ EfiPciIoOperationBusMasterRead
A read operation from system memory by a bus master.
@ EfiPciIoOperationBusMasterCommonBuffer
Provides both read and write access to system memory by both the processor and a bus master.
EFI_GUID gEfiPciIoProtocolGuid
struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL
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)
Enable a PCI driver to access PCI controller registers in the PCI memory or I/O space.
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
EFI_ALLOCATE_TYPE
Enumeration of EFI memory allocation types.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
SEGOFF16_t Buffer
Buffer address.
UINT8_t Length
Length of this structure.
EFI_PCI_IO_PROTOCOL_IO_MEM Write
Write PCI controller registers in the PCI memory or I/O space.
EFI_PCI_IO_PROTOCOL_IO_MEM Read
Read PCI controller registers in the PCI memory or I/O space.
EFI_PCI_IO_PROTOCOL_CONFIG Read
Read PCI controller registers in PCI configuration space.
EFI_PCI_IO_PROTOCOL_CONFIG Write
Write PCI controller registers in PCI configuration space.
The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration, and DMA interfaces used to...
EFI_PCI_IO_PROTOCOL_FLUSH Flush
EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci
EFI_PCI_IO_PROTOCOL_ACCESS Mem
EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo
EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer
VOID * RomImage
A pointer to the in memory copy of the ROM image.
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem
UINT64 RomSize
The size, in bytes, of the ROM image.
EFI_PCI_IO_PROTOCOL_ACCESS Io
EFI_PCI_IO_PROTOCOL_UNMAP Unmap
EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes
EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation
EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes
EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer
EFI_PCI_IO_PROTOCOL_MAP Map