TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | HOST_BRIDGE_INFO |
Hardware info library with types and accessors to parse information about PCI host bridges.
Copyright 2021 - 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HardwareInfoPciHostBridgeLib.h.
EFI_STATUS HardwareInfoPciHostBridgeGet | ( | IN CONST HOST_BRIDGE_INFO * | HostBridge, |
IN UINTN | DataSize, | ||
OUT UINTN * | BusNrStart, | ||
OUT UINTN * | BusNrLast, | ||
OUT UINT64 *Attributes | OPTIONAL, | ||
OUT BOOLEAN *DmaAbove4G | OPTIONAL, | ||
OUT BOOLEAN *NoExtendedConfigSpace | OPTIONAL, | ||
OUT BOOLEAN *CombineMemPMem | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *Io | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *Mem | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *MemAbove4G | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *PMem | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G | OPTIONAL, | ||
OUT PCI_ROOT_BRIDGE_APERTURE *PcieConfig | OPTIONAL | ||
) |
Getter that parses information from a HOST_BRIDGE_INFO object into smaller chunks of types handled by the PciHostBridgeLib.
[in] | HostBridge | Host bridge information object |
[in] | DataSize | Size in bytes of the actually filled data available in the HostBridge object |
[out] | BusNrStart | Pointer to the Bus Number range start |
[out] | BusNrLast | Pointer to the Bus Number range end |
[out] | Attributes | Pointer to the host bridge's attributes |
[out] | DmaAbove4G | Pointer to the DMA Above 4G flag |
[out] | NoExtendedConfigSpace | Pointer to the Extended Config Space flag |
[out] | CombineMemPMem | Pointer to the Combine Mem and PMem flag |
[out] | Io | Pointer to the PIO aperture object |
[out] | Mem | Pointer to the 32-bit MMIO aperture object |
[out] | MemAbove4G | Pointer to the 64-bit MMIO aperture object |
[out] | PMem | Pointer to the 32-bit prefetchable MMIO aperture object |
[out] | PMemAbove4G | Pointer to the 64-bit prefetchable MMIO aperture object |
[out] | PcieConfig | MMIO mapped PCIe config aperture (ECAM) |
EFI_SUCCESS | Whole operation succeeded |
EFI_INVALID_PARAMETER | HostBridge object and/or non-optional output parameters are invalid |
EFI_INCOMPATIBLE_VERSION | HostBridge information provided belongs to and unsupported version |
EFI_WARN_STALE_DATA | One or more apertures having valid ranges in the HostBridge info were ignored because the correspnding aperture pointer is NULL |
Definition at line 453 of file HardwareInfoPciHostBridgeLib.c.
EFI_STATUS HardwareInfoPciHostBridgeGetApertures | ( | IN CONST HOST_BRIDGE_INFO * | HostBridge, |
IN UINTN | DataSize, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | Io, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | Mem, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | MemAbove4G, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | PMem, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | PMemAbove4G, | ||
OUT PCI_ROOT_BRIDGE_APERTURE * | PcieConfig | ||
) |
Interpret the MMIO resources in HostBridge and set the apertures in 32-bit space (Mem), 64-bit space (MemAbove4G), PIO (IO) and ECAM (PcieConfig) accordingly.
The 2 types of apertures in each MMIO space (prefetchable and non-prefetchable) may be merged into a single window, hence if both types of apertures are defined while the CombineMemPMem flag is set, the ranges must be contiguous.
[in] | HostBridge | Root bridge's resources specification |
[in] | DataSize | Size in bytes of the actually filled data available in the HostBridge object |
[out] | Mem | Pointer to 32-bit MMIO aperture |
[out] | MemAbove4G | Pointer to 64-bit MMIO aperture |
[out] | PMem | Pointer to the 32-bit prefetchable MMIO aperture |
[out] | PMemAbove4G | Pointer to the 64-bit prefetchable MMIO aperture |
[out] | PcieConfig | Pointer to MMIO mapped PCIe config aperture (ECAM) |
EFI_INVALID_PARAMETER | HostBridge object is invalid |
EFI_INCOMPATIBLE_VERSION | HostBridge information belongs to an unsupported version |
EFI_WARN_STALE_DATA | One or more valid aperture in the HostBridge's resources were ignored because corresponding aperture pointer is NULL. |
EFI_SUCCESS | Operation executed cleanly, all valid ranges were parsed into the corresponding aperture object. |
Definition at line 297 of file HardwareInfoPciHostBridgeLib.c.
EFI_STATUS HardwareInfoPciHostBridgeGetBusNrRange | ( | IN CONST HOST_BRIDGE_INFO * | HostBridge, |
IN UINTN | DataSize, | ||
OUT UINTN * | BusNrStart, | ||
OUT UINTN * | BusNrLast | ||
) |
Interpret the HostBridge resources and extact the bus number range.
[in] | HostBridge | Root bridge's resources specification |
[in] | DataSize | Size in bytes of the actually filled data available in the HostBridge object |
[out] | BusNrStart | Pointer to the Bus Number range start |
[out] | BusNrLast | Pointer to the Bus Number range end |
EFI_SUCCESS | Retrieved the bus number range without any issues. |
EFI_INVALID_PARAMETER | One of the parameters is invalid, either NULL pointer or size 0 |
EFI_INCOMPATIBLE_VERSION | HostBridge data of unsupported version |
Definition at line 270 of file HardwareInfoPciHostBridgeLib.c.
EFI_STATUS HardwareInfoPciHostBridgeGetFlags | ( | IN CONST HOST_BRIDGE_INFO * | HostBridge, |
IN UINTN | DataSize, | ||
OUT UINT64 *Attributes | OPTIONAL, | ||
OUT BOOLEAN *DmaAbove4G | OPTIONAL, | ||
OUT BOOLEAN *NoExtendedConfigSpace | OPTIONAL, | ||
OUT BOOLEAN *CombineMemPMem | OPTIONAL | ||
) |
Retrieve all flags and attributes of a host bridge describing the resources and capabilities.
[in] | HostBridge | Host bridge information object |
[in] | DataSize | Size in bytes of the actually filled data available in the HostBridge object |
[out] | Attributes | Pointer to the host bridge's attributes |
[out] | DmaAbove4G | Pointer to the DMA Above 4G flag |
[out] | NoExtendedConfigSpace | Pointer to the Extended Config Space flag |
[out] | CombineMemPMem | Pointer to the Combine Mem and PMem flag |
EFI_INVALID_PARAMETER | HostBridge object is invalid |
EFI_INCOMPATIBLE_VERSION | HostBridge information belongs to an unsupported version |
EFI_SUCCESS | Operation executed cleanly |
Definition at line 413 of file HardwareInfoPciHostBridgeLib.c.
EFI_STATUS HardwareInfoPciHostBridgeLastMmioAddress | ( | IN CONST HOST_BRIDGE_INFO * | HostBridge, |
IN UINTN | DataSize, | ||
IN BOOLEAN | HighMem, | ||
OUT UINT64 * | LastMmioAddress | ||
) |
Extract the last MMIO address, either from high (64-bit) or low (32-bit) memory used by the HostBridge's apertures.
[in] | HostBridge | Root bridge's resources specification |
[in] | DataSize | Size in bytes of the actually filled data available in the HostBridge object |
[in] | HighMem | 64-bit (true) or 32-bit (false) MMIO address |
[out] | LastMmioAddress | Pointer to last MMIO address |
EFI_SUCCESS | Operation succeeded |
EFI_INVALID_PARAMETER | One or more pointer parameters are invalid |
EFI_INCOMPATIBLE_VERSION | HostBridge information belongs to an unsupported version |
Definition at line 61 of file HardwareInfoPciHostBridgeLib.c.