TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | NO_MAPPING (VOID *) (UINTN) -1 |
#define | RESOURCE_VALID(Resource) ((Resource)->Base <= (Resource)->Limit) |
Variables | |
UINT8 | mInStride [] |
UINT8 | mOutStride [] |
PCI Root Bridge Io Protocol code.
Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciRootBridgeIo.c.
#define NO_MAPPING (VOID *) (UINTN) -1 |
Definition at line 14 of file PciRootBridgeIo.c.
#define RESOURCE_VALID | ( | Resource | ) | ((Resource)->Base <= (Resource)->Limit) |
Definition at line 16 of file PciRootBridgeIo.c.
PCI_ROOT_BRIDGE_INSTANCE * CreateRootBridge | ( | IN PCI_ROOT_BRIDGE * | Bridge | ) |
Construct the Pci Root Bridge instance.
Bridge | The root bridge instance. |
Definition at line 63 of file PciRootBridgeIo.c.
UINT64 GetElapsedTick | ( | UINT64 * | CurrentTick, |
UINT64 | StartTick, | ||
UINT64 | EndTick | ||
) |
Return the elapsed tick count from CurrentTick.
CurrentTick | On input, the previous tick count. On output, the current tick count. |
StartTick | The value the performance counter starts with when it rolls over. |
EndTick | The value that the performance counter ends with before it rolls over. |
Definition at line 583 of file PciRootBridgeIo.c.
UINT64 MultThenDivU64x64x32 | ( | IN UINT64 | Multiplicand, |
IN UINT64 | Multiplier, | ||
IN UINT32 | Divisor, | ||
OUT UINT32 *Remainder | OPTIONAL | ||
) |
Return the result of (Multiplicand * Multiplier / Divisor).
Multiplicand | A 64-bit unsigned value. |
Multiplier | A 64-bit unsigned value. |
Divisor | A 32-bit unsigned value. |
Remainder | A pointer to a 32-bit unsigned value. This parameter is optional and may be NULL. |
Definition at line 530 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoAllocateBuffer | ( | IN EFI_PCI_ROOT_BRIDGE_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 EfiPciOperationBusMasterCommonBuffer or EfiPciOperationBusMasterCommonBuffer64 mapping.
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
Type | This parameter is not used and must be ignored. |
MemoryType | The type of memory to allocate, EfiBootServicesData or EfiRuntimeServicesData. |
Pages | The number of pages to allocate. |
HostAddress | A pointer to store the base system memory address of the allocated range. |
Attributes | The requested bit mask of attributes for the allocated range. Only the attributes EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE, EFI_PCI_ATTRIBUTE_MEMORY_CACHED, and EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE may be used with this function. |
EFI_SUCCESS | The requested memory pages were allocated. |
EFI_INVALID_PARAMETER | MemoryType is invalid. |
EFI_INVALID_PARAMETER | HostAddress is NULL. |
EFI_UNSUPPORTED | Attributes is unsupported. The only legal attribute bits are MEMORY_WRITE_COMBINE, MEMORY_CACHED, and DUAL_ADDRESS_CYCLE. |
EFI_OUT_OF_RESOURCES | The memory pages could not be allocated. |
Definition at line 1598 of file PciRootBridgeIo.c.
EFI_STATUS RootBridgeIoCheckParameter | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN OPERATION_TYPE | OperationType, | ||
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN VOID * | Buffer | ||
) |
Check parameters for IO,MMIO,PCI read/write services of PCI Root Bridge IO.
The I/O operations are carried out exactly as requested. The caller is responsible for satisfying any alignment and I/O width restrictions that a PI System on a platform might require. For example on some platforms, width requests of EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will be handled by the driver.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | OperationType | I/O operation type: IO/MMIO/PCI. |
[in] | Width | Signifies the width of the I/O or Memory operation. |
[in] | Address | The base address of the I/O operation. |
[in] | Count | The number of I/O operations to perform. The number of bytes moved is Width size * Count, starting at Address. |
[in] | Buffer | For read operations, the destination buffer to store the results. For write operations, the source buffer from which to write data. |
EFI_SUCCESS | The parameters for this request pass the checks. |
EFI_INVALID_PARAMETER | Width is invalid for this PI system. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_INVALID_PARAMETER | Address or Count is invalid. |
EFI_UNSUPPORTED | The Buffer is not aligned for the given Width. |
EFI_UNSUPPORTED | The address range specified by Address, Width, and Count is not valid for this PI system. |
Definition at line 329 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoConfiguration | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
OUT VOID ** | Resources | ||
) |
Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI resource descriptors.
There are only two resource descriptor types from the ACPI Specification that may be used to describe the current resources allocated to a PCI root bridge. These are the QWORD Address Space Descriptor, and the End Tag. The QWORD Address Space Descriptor can describe memory, I/O, and bus number ranges for dynamic or fixed resources. The configuration of a PCI root bridge is described with one or more QWORD Address Space Descriptors followed by an End Tag.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[out] | Resources | A pointer to the resource descriptors that describe the current configuration of this PCI root bridge. The storage for the resource descriptors is allocated by this function. The caller must treat the return buffer as read-only data, and the buffer must not be freed by the caller. |
EFI_SUCCESS | The current configuration of this PCI root bridge was returned in Resources. |
EFI_UNSUPPORTED | The current configuration of this PCI root bridge could not be retrieved. |
Definition at line 1882 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoCopyMem | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | DestAddress, | ||
IN UINT64 | SrcAddress, | ||
IN UINTN | Count | ||
) |
Enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI root bridge memory space.
The CopyMem() function enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI root bridge memory space. This is especially useful for video scroll operation on a memory mapped video buffer. The memory operations are carried out exactly as requested. The caller is responsible for satisfying any alignment and memory width restrictions that a PCI root bridge on a platform might require.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance. |
[in] | Width | Signifies the width of the memory operations. |
[in] | DestAddress | The destination address of the memory operation. The caller is responsible for aligning the DestAddress if required. |
[in] | SrcAddress | The source address of the memory operation. The caller is responsible for aligning the SrcAddress if required. |
[in] | Count | The number of memory operations to perform. Bytes moved is Width size * Count, starting at DestAddress and SrcAddress. |
EFI_SUCCESS | The data was copied from one memory region to another memory region. |
EFI_INVALID_PARAMETER | Width is invalid for this PCI root bridge. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 1102 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoFlush | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This | ) |
Flushes all PCI posted write transactions from a PCI host bridge to system memory.
The Flush() function flushes any PCI posted write transactions from a PCI host bridge to system memory. Posted write transactions are generated by PCI bus masters when they perform write transactions to target addresses in system memory. This function does not flush posted write transactions from any PCI bridges. A PCI controller specific action must be taken to guarantee that the posted write transactions have been flushed from the PCI controller and from all the PCI bridges into the PCI host bridge. This is typically done with a PCI read transaction from the PCI controller prior to calling Flush().
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
EFI_SUCCESS | The PCI posted write transactions were flushed from the PCI host bridge to system memory. |
EFI_DEVICE_ERROR | The PCI posted write transactions were not flushed from the PCI host bridge due to a hardware error. |
Definition at line 1740 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoFreeBuffer | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN UINTN | Pages, | ||
OUT VOID * | HostAddress | ||
) |
Frees memory that was allocated with AllocateBuffer().
The FreeBuffer() function frees memory that was allocated with AllocateBuffer().
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
Pages | The number of pages to free. |
HostAddress | The base system memory address of the allocated range. |
EFI_SUCCESS | The requested memory pages were freed. |
EFI_INVALID_PARAMETER | The memory range specified by HostAddress and Pages was not allocated with AllocateBuffer(). |
Definition at line 1697 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoGetAttributes | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
OUT UINT64 * | Supported, | ||
OUT UINT64 * | Attributes | ||
) |
Gets the attributes that a PCI root bridge supports setting with SetAttributes(), and the attributes that a PCI root bridge is currently using.
The GetAttributes() function returns the mask of attributes that this PCI root bridge supports and the mask of attributes that the PCI root bridge is currently using.
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
Supported | A pointer to the mask of attributes that this PCI root bridge supports setting with SetAttributes(). |
Attributes | A pointer to the mask of attributes that this PCI root bridge is currently using. |
EFI_SUCCESS | If Supports is not NULL, then the attributes that the PCI root bridge supports is returned in Supports. If Attributes is not NULL, then the attributes that the PCI root bridge is currently using is returned in Attributes. |
EFI_INVALID_PARAMETER | Both Supports and Attributes are NULL. |
Definition at line 1771 of file PciRootBridgeIo.c.
EFI_STATUS RootBridgeIoGetMemTranslationByAddress | ( | IN PCI_ROOT_BRIDGE_INSTANCE * | RootBridge, |
IN UINT64 | Address, | ||
IN OUT UINT64 * | Translation | ||
) |
Use address to match apertures of memory type and then get the corresponding translation.
RootBridge | The root bridge instance. |
Address | The address used to match aperture. |
Translation | Pointer containing the output translation. |
Definition at line 497 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoIoRead | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
OUT VOID * | Buffer | ||
) |
Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the memory operations. |
[in] | Address | The base address of the I/O operation. The caller is responsible for aligning the Address if required. |
[in] | Count | The number of I/O operations to perform. Bytes moved is Width size * Count, starting at Address. |
[out] | Buffer | For read operations, the destination buffer to store the results. For write operations, the source buffer to write data from. |
EFI_SUCCESS | The data was read from or written to the PCI root bridge. |
EFI_INVALID_PARAMETER | Width is invalid for this PCI root bridge. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 974 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoIoWrite | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN VOID * | Buffer | ||
) |
Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the memory operations. |
[in] | Address | The base address of the I/O operation. The caller is responsible for aligning the Address if required. |
[in] | Count | The number of I/O operations to perform. Bytes moved is Width size * Count, starting at Address. |
[in] | Buffer | For read operations, the destination buffer to store the results. For write operations, the source buffer to write data from. |
EFI_SUCCESS | The data was read from or written to the PCI root bridge. |
EFI_INVALID_PARAMETER | Width is invalid for this PCI root bridge. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 1033 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoMap | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION | Operation, | ||
IN VOID * | HostAddress, | ||
IN OUT UINTN * | NumberOfBytes, | ||
OUT EFI_PHYSICAL_ADDRESS * | DeviceAddress, | ||
OUT VOID ** | Mapping | ||
) |
Provides the PCI controller-specific address needed to access system memory for DMA.
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
Operation | Indicate if the bus master is going to read or write to system memory. |
HostAddress | The system memory address to map on the PCI controller. |
NumberOfBytes | On input the number of bytes to map. On output the number of bytes that were mapped. |
DeviceAddress | The resulting map address for the bus master PCI controller to use to access the system memory's HostAddress. |
Mapping | The value to pass to Unmap() when the bus master DMA operation is complete. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Invalid parameters found. |
EFI_UNSUPPORTED | The HostAddress cannot be mapped as a common buffer. |
EFI_DEVICE_ERROR | The System hardware could not map the requested address. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to lack of resources. |
Definition at line 1331 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoMemRead | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
OUT VOID * | Buffer | ||
) |
Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.
The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller registers in the PCI root bridge memory space. The memory operations are carried out exactly as requested. The caller is responsible for satisfying any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the memory operation. |
[in] | Address | The base address of the memory operation. The caller is responsible for aligning the Address if required. |
[in] | Count | The number of memory operations to perform. Bytes moved is Width size * Count, starting at Address. |
[out] | Buffer | For read operations, the destination buffer to store the results. For write operations, the source buffer to write data from. |
EFI_SUCCESS | The data was read from or written to the PCI root bridge. |
EFI_INVALID_PARAMETER | Width is invalid for this PCI root bridge. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 840 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoMemWrite | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN VOID * | Buffer | ||
) |
Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.
The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller registers in the PCI root bridge memory space. The memory operations are carried out exactly as requested. The caller is responsible for satisfying any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the memory operation. |
[in] | Address | The base address of the memory operation. The caller is responsible for aligning the Address if required. |
[in] | Count | The number of memory operations to perform. Bytes moved is Width size * Count, starting at Address. |
[in] | Buffer | For read operations, the destination buffer to store the results. For write operations, the source buffer to write data from. |
EFI_SUCCESS | The data was read from or written to the PCI root bridge. |
EFI_INVALID_PARAMETER | Width is invalid for this PCI root bridge. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 910 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoPciAccess | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN BOOLEAN | Read, | ||
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN OUT VOID * | Buffer | ||
) |
PCI configuration space access.
This | A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL |
Read | TRUE indicating it's a read operation. |
Width | Signifies the width of the memory operation. |
Address | The address within the PCI configuration space for the PCI controller. |
Count | The number of PCI configuration operations to perform. |
Buffer | The destination buffer to store the results. |
EFI_SUCCESS | The data was read/written from/to the PCI root bridge. |
EFI_INVALID_PARAMETER | Invalid parameters found. |
Definition at line 1187 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoPciRead | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN OUT VOID * | Buffer | ||
) |
Allows read from PCI configuration space.
This | A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL |
Width | Signifies the width of the memory operation. |
Address | The address within the PCI configuration space for the PCI controller. |
Count | The number of PCI configuration operations to perform. |
Buffer | The destination buffer to store the results. |
EFI_SUCCESS | The data was read from the PCI root bridge. |
EFI_INVALID_PARAMETER | Invalid parameters found. |
Definition at line 1270 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoPciWrite | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINTN | Count, | ||
IN OUT VOID * | Buffer | ||
) |
Allows write to PCI configuration space.
This | A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL |
Width | Signifies the width of the memory operation. |
Address | The address within the PCI configuration space for the PCI controller. |
Count | The number of PCI configuration operations to perform. |
Buffer | The source buffer to get the results. |
EFI_SUCCESS | The data was written to the PCI root bridge. |
EFI_INVALID_PARAMETER | Invalid parameters found. |
Definition at line 1297 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoPollIo | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINT64 | Mask, | ||
IN UINT64 | Value, | ||
IN UINT64 | Delay, | ||
OUT UINT64 * | Result | ||
) |
Reads from the I/O space of a PCI Root Bridge. Returns when either the polling exit criteria is satisfied or after a defined duration.
This function provides a standard way to poll a PCI I/O location. A PCI I/O read operation is performed at the PCI I/O address specified by Address for the width specified by Width. The result of this PCI I/O read operation is stored in Result. This PCI I/O read operation is repeated until either a timeout of Delay 100 ns units has expired, or (Result & Mask) is equal to Value.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the I/O operations. |
[in] | Address | The base address of the I/O operations. The caller is responsible for aligning Address if required. |
[in] | Mask | Mask used for the polling criteria. Bytes above Width in Mask are ignored. The bits in the bytes below Width which are zero in Mask are ignored when polling the I/O address. |
[in] | Value | The comparison value used for the polling exit criteria. |
[in] | Delay | The number of 100 ns units to poll. Note that timer available may be of poorer granularity. |
[out] | Result | Pointer to the last value read from the memory location. |
EFI_SUCCESS | The last data returned from the access matched the poll exit criteria. |
EFI_INVALID_PARAMETER | Width is invalid. |
EFI_INVALID_PARAMETER | Result is NULL. |
EFI_TIMEOUT | Delay expired before a match occurred. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 740 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoPollMem | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH | Width, | ||
IN UINT64 | Address, | ||
IN UINT64 | Mask, | ||
IN UINT64 | Value, | ||
IN UINT64 | Delay, | ||
OUT UINT64 * | Result | ||
) |
Polls an address in memory mapped I/O space until an exit condition is met, or a timeout occurs.
This function provides a standard way to poll a PCI memory location. A PCI memory read operation is performed at the PCI memory address specified by Address for the width specified by Width. The result of this PCI memory read operation is stored in Result. This PCI memory read operation is repeated until either a timeout of Delay 100 ns units has expired, or (Result & Mask) is equal to Value.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Width | Signifies the width of the memory operations. |
[in] | Address | The base address of the memory operations. The caller is responsible for aligning Address if required. |
[in] | Mask | Mask used for the polling criteria. Bytes above Width in Mask are ignored. The bits in the bytes below Width which are zero in Mask are ignored when polling the memory address. |
[in] | Value | The comparison value used for the polling exit criteria. |
[in] | Delay | The number of 100 ns units to poll. Note that timer available may be of poorer granularity. |
[out] | Result | Pointer to the last value read from the memory location. |
EFI_SUCCESS | The last data returned from the access matched the poll exit criteria. |
EFI_INVALID_PARAMETER | Width is invalid. |
EFI_INVALID_PARAMETER | Result is NULL. |
EFI_TIMEOUT | Delay expired before a match occurred. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Definition at line 636 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoSetAttributes | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN UINT64 | Attributes, | ||
IN OUT UINT64 * | ResourceBase, | ||
IN OUT UINT64 * | ResourceLength | ||
) |
Sets attributes for a resource range on a PCI root bridge.
The SetAttributes() function sets the attributes specified in Attributes for the PCI root bridge on the resource range specified by ResourceBase and ResourceLength. Since the granularity of setting these attributes may vary from resource type to resource type, and from platform to platform, the actual resource range and the one passed in by the caller may differ. As a result, this function may set the attributes specified by Attributes on a larger resource range than the caller requested. The actual range is returned in ResourceBase and ResourceLength. The caller is responsible for verifying that the actual range for which the attributes were set is acceptable.
This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
Attributes | The mask of attributes to set. If the attribute bit MEMORY_WRITE_COMBINE, MEMORY_CACHED, or MEMORY_DISABLE is set, then the resource range is specified by ResourceBase and ResourceLength. If MEMORY_WRITE_COMBINE, MEMORY_CACHED, and MEMORY_DISABLE are not set, then ResourceBase and ResourceLength are ignored, and may be NULL. |
ResourceBase | A pointer to the base address of the resource range to be modified by the attributes specified by Attributes. |
ResourceLength | A pointer to the length of the resource range to be modified by the attributes specified by Attributes. |
EFI_SUCCESS | The current configuration of this PCI root bridge was returned in Resources. |
EFI_UNSUPPORTED | The current configuration of this PCI root bridge could not be retrieved. |
Definition at line 1836 of file PciRootBridgeIo.c.
EFI_STATUS EFIAPI RootBridgeIoUnmap | ( | IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * | This, |
IN VOID * | Mapping | ||
) |
Completes the Map() operation and releases any corresponding resources.
The Unmap() function completes the Map() operation and releases any corresponding resources. If the operation was an EfiPciOperationBusMasterWrite or EfiPciOperationBusMasterWrite64, the data is committed to the target system memory. Any resources used for the mapping are freed.
[in] | This | A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. |
[in] | Mapping | The mapping value returned from Map(). |
EFI_SUCCESS | The range was unmapped. |
EFI_INVALID_PARAMETER | Mapping is not a value that was returned by Map(). |
EFI_DEVICE_ERROR | The data was not committed to the target system memory. |
Definition at line 1497 of file PciRootBridgeIo.c.
UINT8 mInStride[] |
Definition at line 21 of file PciRootBridgeIo.c.
UINT8 mOutStride[] |
Definition at line 39 of file PciRootBridgeIo.c.