18 #define EFI_PCI_IO_PROTOCOL_GUID \ 20 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \ 49 #define EFI_PCI_IO_PASS_THROUGH_BAR 0xff 50 #define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f
51 #define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001
52 #define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002
53 #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004
54 #define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008
55 #define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010
56 #define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020
57 #define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040
58 #define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
59 #define EFI_PCI_IO_ATTRIBUTE_IO 0x0100
60 #define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200
61 #define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400
62 #define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800
63 #define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000
64 #define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000
65 #define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000
66 #define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000
67 #define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000
68 #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000
69 #define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000
71 #define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) 72 #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) #define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
UINT64 RomSize
The size, in bytes, of the ROM image.
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_PCI_IO_PROTOCOL_CONFIG Read
Read PCI controller registers in PCI configuration space.
128 bit buffer containing a unique identifier value.
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.
A read operation from system memory by a bus master.
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_MAP Map
EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem
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...
UINT8_t Length
Length of this structure.
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_PCI_IO_PROTOCOL_FLUSH Flush
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.
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
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(),...
VOID * RomImage
A pointer to the in memory copy of the ROM image.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem
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.
Retrieve the PCI controller's current attributes, and return them in Result.
EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes
EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes
EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation
EFI_PCI_IO_PROTOCOL_WIDTH
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_CONFIG Write
Write PCI controller registers in PCI configuration 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_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_PCI_IO_PROTOCOL_UNMAP Unmap
EFI_PCI_IO_PROTOCOL_IO_MEM Write
Write PCI controller registers in the PCI memory or I/O space.
SEGOFF16_t Buffer
Buffer address.
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo
UINT64 UINTN
Unsigned value of native width.
Disable the attributes specified by the bits that are set in Attributes for this PCI controller.
Provides both read and write access to system memory by both the processor and a bus master.
#define VOID
Undeclared type.
unsigned long long UINT64
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_PCI_IO_PROTOCOL_OPERATION
Enable the attributes specified by the bits that are set in Attributes for this PCI controller.
EFI_ALLOCATE_TYPE
Enumeration of EFI memory allocation types.
EFI_PCI_IO_PROTOCOL_IO_MEM Read
Read PCI controller registers in the PCI memory or I/O space.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
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.
A write operation from system memory by a bus master.
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes
FILE_LICENCE(BSD2_PATENT)
EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer
EFI_GUID gEfiPciIoProtocolGuid
Retrieve the PCI controller's supported attributes, and return them in Result.
The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration, and DMA interfaces used to...
EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci
Set the PCI controller's current attributes to Attributes.
EFI_PCI_IO_PROTOCOL_ACCESS Io
EFI_PCI_IO_PROTOCOL_ACCESS Mem