iPXE
PciIo.h
Go to the documentation of this file.
1/** @file
2 EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
3 and DMA interfaces that a driver uses to access its PCI controller.
4
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef __PCI_IO_H__
11#define __PCI_IO_H__
12
13FILE_LICENCE ( BSD2_PATENT );
14FILE_SECBOOT ( PERMITTED );
15
16///
17/// Global ID for the PCI I/O Protocol
18///
19#define EFI_PCI_IO_PROTOCOL_GUID \
20 { \
21 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \
22 }
23
25
26///
27/// *******************************************************
28/// EFI_PCI_IO_PROTOCOL_WIDTH
29/// *******************************************************
30///
46
47//
48// Complete PCI address generater
49//
50#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged
51#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles
52#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode)
53#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode)
54#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
55#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode)
56#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
57#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
58#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
59#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined
60#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header
61#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header
62#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header
63#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached
64#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range
65#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device
66#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR
67#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC
68#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
69#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
70#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
71
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)
74
75///
76/// *******************************************************
77/// EFI_PCI_IO_PROTOCOL_OPERATION
78/// *******************************************************
79///
80typedef enum {
81 ///
82 /// A read operation from system memory by a bus master.
83 ///
85 ///
86 /// A write operation from system memory by a bus master.
87 ///
89 ///
90 /// Provides both read and write access to system memory by both the processor and a
91 /// bus master. The buffer is coherent from both the processor's and the bus master's point of view.
92 ///
96
97///
98/// *******************************************************
99/// EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
100/// *******************************************************
101///
102typedef enum {
103 ///
104 /// Retrieve the PCI controller's current attributes, and return them in Result.
105 ///
107 ///
108 /// Set the PCI controller's current attributes to Attributes.
109 ///
111 ///
112 /// Enable the attributes specified by the bits that are set in Attributes for this PCI controller.
113 ///
115 ///
116 /// Disable the attributes specified by the bits that are set in Attributes for this PCI controller.
117 ///
119 ///
120 /// Retrieve the PCI controller's supported attributes, and return them in Result.
121 ///
125
126/**
127 Reads from the memory space of a PCI controller. Returns either when the polling exit criteria is
128 satisfied or after a defined duration.
129
130 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
131 @param Width Signifies the width of the memory or I/O operations.
132 @param BarIndex The BAR index of the standard PCI Configuration header to use as the
133 base address for the memory operation to perform.
134 @param Offset The offset within the selected BAR to start the memory operation.
135 @param Mask Mask used for the polling criteria.
136 @param Value The comparison value used for the polling exit criteria.
137 @param Delay The number of 100 ns units to poll.
138 @param Result Pointer to the last value read from the memory location.
139
140 @retval EFI_SUCCESS The last data returned from the access matched the poll exit criteria.
141 @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
142 @retval EFI_UNSUPPORTED Offset is not valid for the BarIndex of this PCI controller.
143 @retval EFI_TIMEOUT Delay expired before a match occurred.
144 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
145 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
146
147**/
148typedef
153 IN UINT8 BarIndex,
154 IN UINT64 Offset,
155 IN UINT64 Mask,
156 IN UINT64 Value,
157 IN UINT64 Delay,
158 OUT UINT64 *Result
159 );
160
161/**
162 Enable a PCI driver to access PCI controller registers in the PCI memory or I/O space.
163
164 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
165 @param Width Signifies the width of the memory or I/O operations.
166 @param BarIndex The BAR index of the standard PCI Configuration header to use as the
167 base address for the memory or I/O operation to perform.
168 @param Offset The offset within the selected BAR to start the memory or I/O operation.
169 @param Count The number of memory or I/O operations to perform.
170 @param Buffer For read operations, the destination buffer to store the results. For write
171 operations, the source buffer to write data from.
172
173 @retval EFI_SUCCESS The data was read from or written to the PCI controller.
174 @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
175 @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
176 valid for the PCI BAR specified by BarIndex.
177 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
178 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
179
180**/
181typedef
186 IN UINT8 BarIndex,
187 IN UINT64 Offset,
188 IN UINTN Count,
190 );
191
192typedef struct {
193 ///
194 /// Read PCI controller registers in the PCI memory or I/O space.
195 ///
197 ///
198 /// Write PCI controller registers in the PCI memory or I/O space.
199 ///
202
203/**
204 Enable a PCI driver to access PCI controller registers in PCI configuration space.
205
206 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
207 @param Width Signifies the width of the memory operations.
208 @param Offset The offset within the PCI configuration space for the PCI controller.
209 @param Count The number of PCI configuration operations to perform.
210 @param Buffer For read operations, the destination buffer to store the results. For write
211 operations, the source buffer to write data from.
212
213
214 @retval EFI_SUCCESS The data was read from or written to the PCI controller.
215 @retval EFI_UNSUPPORTED The address range specified by Offset, Width, and Count is not
216 valid for the PCI configuration header of the PCI controller.
217 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
218 @retval EFI_INVALID_PARAMETER Buffer is NULL or Width is invalid.
219
220**/
221typedef
226 IN UINT32 Offset,
227 IN UINTN Count,
229 );
230
231typedef struct {
232 ///
233 /// Read PCI controller registers in PCI configuration space.
234 ///
236 ///
237 /// Write PCI controller registers in PCI configuration space.
238 ///
241
242/**
243 Enables a PCI driver to copy one region of PCI memory space to another region of PCI
244 memory space.
245
246 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
247 @param Width Signifies the width of the memory operations.
248 @param DestBarIndex The BAR index in the standard PCI Configuration header to use as the
249 base address for the memory operation to perform.
250 @param DestOffset The destination offset within the BAR specified by DestBarIndex to
251 start the memory writes for the copy operation.
252 @param SrcBarIndex The BAR index in the standard PCI Configuration header to use as the
253 base address for the memory operation to perform.
254 @param SrcOffset The source offset within the BAR specified by SrcBarIndex to start
255 the memory reads for the copy operation.
256 @param Count The number of memory operations to perform. Bytes moved is Width
257 size * Count, starting at DestOffset and SrcOffset.
258
259 @retval EFI_SUCCESS The data was copied from one memory region to another memory region.
260 @retval EFI_UNSUPPORTED DestBarIndex not valid for this PCI controller.
261 @retval EFI_UNSUPPORTED SrcBarIndex not valid for this PCI controller.
262 @retval EFI_UNSUPPORTED The address range specified by DestOffset, Width, and Count
263 is not valid for the PCI BAR specified by DestBarIndex.
264 @retval EFI_UNSUPPORTED The address range specified by SrcOffset, Width, and Count is
265 not valid for the PCI BAR specified by SrcBarIndex.
266 @retval EFI_INVALID_PARAMETER Width is invalid.
267 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
268
269**/
270typedef
275 IN UINT8 DestBarIndex,
276 IN UINT64 DestOffset,
277 IN UINT8 SrcBarIndex,
278 IN UINT64 SrcOffset,
279 IN UINTN Count
280 );
281
282/**
283 Provides the PCI controller-specific addresses needed to access system memory.
284
285 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
286 @param Operation Indicates if the bus master is going to read or write to system memory.
287 @param HostAddress The system memory address to map to the PCI controller.
288 @param NumberOfBytes On input the number of bytes to map. On output the number of bytes
289 that were mapped.
290 @param DeviceAddress The resulting map address for the bus master PCI controller to use to
291 access the hosts HostAddress.
292 @param Mapping A resulting value to pass to Unmap().
293
294 @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
295 @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.
296 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
297 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
298 @retval EFI_DEVICE_ERROR The system hardware could not map the requested address.
299
300**/
301typedef
306 IN VOID *HostAddress,
307 IN OUT UINTN *NumberOfBytes,
308 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
309 OUT VOID **Mapping
310 );
311
312/**
313 Completes the Map() operation and releases any corresponding resources.
314
315 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
316 @param Mapping The mapping value returned from Map().
317
318 @retval EFI_SUCCESS The range was unmapped.
319 @retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
320
321**/
322typedef
326 IN VOID *Mapping
327 );
328
329/**
330 Allocates pages that are suitable for an EfiPciIoOperationBusMasterCommonBuffer
331 or EfiPciOperationBusMasterCommonBuffer64 mapping.
332
333 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
334 @param Type This parameter is not used and must be ignored.
335 @param MemoryType The type of memory to allocate, EfiBootServicesData or
336 EfiRuntimeServicesData.
337 @param Pages The number of pages to allocate.
338 @param HostAddress A pointer to store the base system memory address of the
339 allocated range.
340 @param Attributes The requested bit mask of attributes for the allocated range.
341
342 @retval EFI_SUCCESS The requested memory pages were allocated.
343 @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are
344 MEMORY_WRITE_COMBINE, MEMORY_CACHED and DUAL_ADDRESS_CYCLE.
345 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
346 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
347
348**/
349typedef
354 IN EFI_MEMORY_TYPE MemoryType,
355 IN UINTN Pages,
356 OUT VOID **HostAddress,
357 IN UINT64 Attributes
358 );
359
360/**
361 Frees memory that was allocated with AllocateBuffer().
362
363 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
364 @param Pages The number of pages to free.
365 @param HostAddress The base system memory address of the allocated range.
366
367 @retval EFI_SUCCESS The requested memory pages were freed.
368 @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages
369 was not allocated with AllocateBuffer().
370
371**/
372typedef
376 IN UINTN Pages,
377 IN VOID *HostAddress
378 );
379
380/**
381 Flushes all PCI posted write transactions from a PCI host bridge to system memory.
382
383 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
384
385 @retval EFI_SUCCESS The PCI posted write transactions were flushed from the PCI host
386 bridge to system memory.
387 @retval EFI_DEVICE_ERROR The PCI posted write transactions were not flushed from the PCI
388 host bridge due to a hardware error.
389
390**/
391typedef
395 );
396
397/**
398 Retrieves this PCI controller's current PCI bus number, device number, and function number.
399
400 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
401 @param SegmentNumber The PCI controller's current PCI segment number.
402 @param BusNumber The PCI controller's current PCI bus number.
403 @param DeviceNumber The PCI controller's current PCI device number.
404 @param FunctionNumber The PCI controller's current PCI function number.
405
406 @retval EFI_SUCCESS The PCI controller location was returned.
407 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
408
409**/
410typedef
414 OUT UINTN *SegmentNumber,
415 OUT UINTN *BusNumber,
416 OUT UINTN *DeviceNumber,
417 OUT UINTN *FunctionNumber
418 );
419
420/**
421 Performs an operation on the attributes that this PCI controller supports. The operations include
422 getting the set of supported attributes, retrieving the current attributes, setting the current
423 attributes, enabling attributes, and disabling attributes.
424
425 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
426 @param Operation The operation to perform on the attributes for this PCI controller.
427 @param Attributes The mask of attributes that are used for Set, Enable, and Disable
428 operations.
429 @param Result A pointer to the result mask of attributes that are returned for the Get
430 and Supported operations.
431
432 @retval EFI_SUCCESS The operation on the PCI controller's attributes was completed.
433 @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
434 @retval EFI_UNSUPPORTED one or more of the bits set in
435 Attributes are not supported by this PCI controller or one of
436 its parent bridges when Operation is Set, Enable or Disable.
437
438**/
439typedef
444 IN UINT64 Attributes,
445 OUT UINT64 *Result OPTIONAL
446 );
447
448/**
449 Gets the attributes that this PCI controller supports setting on a BAR using
450 SetBarAttributes(), and retrieves the list of resource descriptors for a BAR.
451
452 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
453 @param BarIndex The BAR index of the standard PCI Configuration header to use as the
454 base address for resource range. The legal range for this field is 0..5.
455 @param Supports A pointer to the mask of attributes that this PCI controller supports
456 setting for this BAR with SetBarAttributes().
457 @param Resources A pointer to the resource descriptors that describe the current
458 configuration of this BAR of the PCI controller.
459
460 @retval EFI_SUCCESS If Supports is not NULL, then the attributes that the PCI
461 controller supports are returned in Supports. If Resources
462 is not NULL, then the resource descriptors that the PCI
463 controller is currently using are returned in Resources.
464 @retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.
465 @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
466 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate
467 Resources.
468**/
469typedef
473 IN UINT8 BarIndex,
474 OUT UINT64 *Supports OPTIONAL,
476 );
477
478/**
479 Sets the attributes for a range of a BAR on a PCI controller.
480
481 @param This A pointer to the EFI_PCI_IO_PROTOCOL instance.
482 @param Attributes The mask of attributes to set for the resource range specified by
483 BarIndex, Offset, and Length.
484 @param BarIndex The BAR index of the standard PCI Configuration header to use as the
485 base address for resource range. The legal range for this field is 0..5.
486 @param Offset A pointer to the BAR relative base address of the resource range to be
487 modified by the attributes specified by Attributes.
488 @param Length A pointer to the length of the resource range to be modified by the
489 attributes specified by Attributes.
490
491 @retval EFI_SUCCESS The set of attributes specified by Attributes for the resource
492 range specified by BarIndex, Offset, and Length were
493 set on the PCI controller, and the actual resource range is returned
494 in Offset and Length.
495 @retval EFI_INVALID_PARAMETER Offset or Length is NULL.
496 @retval EFI_UNSUPPORTED BarIndex not valid for this PCI controller.
497 @retval EFI_OUT_OF_RESOURCES There are not enough resources to set the attributes on the
498 resource range specified by BarIndex, Offset, and
499 Length.
500
501**/
502typedef
506 IN UINT64 Attributes,
507 IN UINT8 BarIndex,
508 IN OUT UINT64 *Offset,
510 );
511
512///
513/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
514/// and DMA interfaces used to abstract accesses to PCI controllers.
515/// There is one EFI_PCI_IO_PROTOCOL instance for each PCI controller on a PCI bus.
516/// A device driver that wishes to manage a PCI controller in a system will have to
517/// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller.
518///
535
536 ///
537 /// The size, in bytes, of the ROM image.
538 ///
540
541 ///
542 /// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
543 /// for allocating memory for the ROM image, and copying the contents of the ROM to memory.
544 /// The contents of this buffer are either from the PCI option ROM that can be accessed
545 /// through the ROM BAR of the PCI controller, or it is from a platform-specific location.
546 /// The Attributes() function can be used to determine from which of these two sources
547 /// the RomImage buffer was initialized.
548 ///
550};
551
553
554#endif
Resources
Definition 3c90x.h:226
UINT64 UINTN
Unsigned value of native width.
unsigned long long UINT64
8-byte unsigned value.
#define EFIAPI
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
UINT16 Mask
Definition Acpi10.h:157
UINT8 Type
Definition Acpi10.h:137
#define VOID
Undeclared type.
Definition Base.h:272
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition Base.h:293
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.
Definition PciIo.h:412
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.
Definition PciIo.h:223
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.
Definition PciIo.h:393
EFI_PCI_IO_PROTOCOL_WIDTH
Definition PciIo.h:31
@ EfiPciIoWidthFillUint16
Definition PciIo.h:41
@ EfiPciIoWidthUint16
Definition PciIo.h:33
@ EfiPciIoWidthUint8
Definition PciIo.h:32
@ EfiPciIoWidthFillUint32
Definition PciIo.h:42
@ EfiPciIoWidthFillUint8
Definition PciIo.h:40
@ EfiPciIoWidthFillUint64
Definition PciIo.h:43
@ EfiPciIoWidthUint32
Definition PciIo.h:34
@ EfiPciIoWidthFifoUint64
Definition PciIo.h:39
@ EfiPciIoWidthUint64
Definition PciIo.h:35
@ EfiPciIoWidthFifoUint32
Definition PciIo.h:38
@ EfiPciIoWidthMaximum
Definition PciIo.h:44
@ EfiPciIoWidthFifoUint16
Definition PciIo.h:37
@ EfiPciIoWidthFifoUint8
Definition PciIo.h:36
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.
Definition PciIo.h:303
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.
Definition PciIo.h:504
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(),...
Definition PciIo.h:471
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.
Definition PciIo.h:150
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...
Definition PciIo.h:351
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.
Definition PciIo.h:272
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().
Definition PciIo.h:374
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.
Definition PciIo.h:441
EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION
Definition PciIo.h:102
@ EfiPciIoAttributeOperationDisable
Disable the attributes specified by the bits that are set in Attributes for this PCI controller.
Definition PciIo.h:118
@ EfiPciIoAttributeOperationMaximum
Definition PciIo.h:123
@ EfiPciIoAttributeOperationGet
Retrieve the PCI controller's current attributes, and return them in Result.
Definition PciIo.h:106
@ EfiPciIoAttributeOperationEnable
Enable the attributes specified by the bits that are set in Attributes for this PCI controller.
Definition PciIo.h:114
@ EfiPciIoAttributeOperationSet
Set the PCI controller's current attributes to Attributes.
Definition PciIo.h:110
@ EfiPciIoAttributeOperationSupported
Retrieve the PCI controller's supported attributes, and return them in Result.
Definition PciIo.h:122
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.
Definition PciIo.h:324
EFI_PCI_IO_PROTOCOL_OPERATION
Definition PciIo.h:80
@ EfiPciIoOperationMaximum
Definition PciIo.h:94
@ EfiPciIoOperationBusMasterWrite
A write operation from system memory by a bus master.
Definition PciIo.h:88
@ EfiPciIoOperationBusMasterRead
A read operation from system memory by a bus master.
Definition PciIo.h:84
@ EfiPciIoOperationBusMasterCommonBuffer
Provides both read and write access to system memory by both the processor and a bus master.
Definition PciIo.h:93
EFI_GUID gEfiPciIoProtocolGuid
struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL
Definition PciIo.h:24
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.
Definition PciIo.h:183
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.
Definition UefiSpec.h:32
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
SEGOFF16_t Buffer
Buffer address.
Definition pxe_api.h:8
UINT8_t Length
Length of this structure.
Definition pxe_api.h:13
EFI_PCI_IO_PROTOCOL_IO_MEM Write
Write PCI controller registers in the PCI memory or I/O space.
Definition PciIo.h:200
EFI_PCI_IO_PROTOCOL_IO_MEM Read
Read PCI controller registers in the PCI memory or I/O space.
Definition PciIo.h:196
EFI_PCI_IO_PROTOCOL_CONFIG Read
Read PCI controller registers in PCI configuration space.
Definition PciIo.h:235
EFI_PCI_IO_PROTOCOL_CONFIG Write
Write PCI controller registers in PCI configuration space.
Definition PciIo.h:239
The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration, and DMA interfaces used to...
Definition PciIo.h:519
EFI_PCI_IO_PROTOCOL_FLUSH Flush
Definition PciIo.h:530
EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci
Definition PciIo.h:524
EFI_PCI_IO_PROTOCOL_ACCESS Mem
Definition PciIo.h:522
EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem
Definition PciIo.h:525
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo
Definition PciIo.h:521
EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer
Definition PciIo.h:528
VOID * RomImage
A pointer to the in memory copy of the ROM image.
Definition PciIo.h:549
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem
Definition PciIo.h:520
UINT64 RomSize
The size, in bytes, of the ROM image.
Definition PciIo.h:539
EFI_PCI_IO_PROTOCOL_ACCESS Io
Definition PciIo.h:523
EFI_PCI_IO_PROTOCOL_UNMAP Unmap
Definition PciIo.h:527
EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes
Definition PciIo.h:532
EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation
Definition PciIo.h:531
EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes
Definition PciIo.h:533
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes
Definition PciIo.h:534
EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer
Definition PciIo.h:529
EFI_PCI_IO_PROTOCOL_MAP Map
Definition PciIo.h:526