TianoCore EDK2 master
|
#include <PiDxe.h>
#include <IndustryStandard/Pci.h>
#include <Protocol/PciHostBridgeResourceAllocation.h>
#include <Protocol/PciRootBridgeIo.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PciHostBridgeLib.h>
#include <Library/PciLib.h>
#include "PciHostBridge.h"
Go to the source code of this file.
Functions | |
STATIC VOID | PcatPciRootBridgeBarExisted (IN UINTN Address, OUT UINT32 *OriginalValue, OUT UINT32 *Value) |
STATIC VOID | PcatPciRootBridgeParseBars (IN UINT16 Command, IN UINTN Bus, IN UINTN Device, IN UINTN Function, IN UINTN BarOffsetBase, IN UINTN BarOffsetEnd, IN PCI_ROOT_BRIDGE_APERTURE *Io, IN PCI_ROOT_BRIDGE_APERTURE *Mem, IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G) |
PCI_ROOT_BRIDGE * | ScanForRootBridges (OUT UINTN *NumberOfRootBridges) |
PCI_ROOT_BRIDGE * | RetrieveRootBridgeInfoFromHob (IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, OUT UINTN *NumberOfRootBridges) |
Variables | |
STATIC PCI_ROOT_BRIDGE_APERTURE | mNonExistAperture = { MAX_UINT64, 0 } |
Scan the entire PCI bus for root bridges to support coreboot UEFI payload.
Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciHostBridgeSupport.c.
STATIC VOID PcatPciRootBridgeBarExisted | ( | IN UINTN | Address, |
OUT UINT32 * | OriginalValue, | ||
OUT UINT32 * | Value | ||
) |
Probe a bar is existed or not.
[in] | Address | PCI address for the BAR. |
[out] | OriginalValue | The original bar value returned. |
[out] | Value | The probed bar value returned. |
Definition at line 30 of file PciHostBridgeSupport.c.
STATIC VOID PcatPciRootBridgeParseBars | ( | IN UINT16 | Command, |
IN UINTN | Bus, | ||
IN UINTN | Device, | ||
IN UINTN | Function, | ||
IN UINTN | BarOffsetBase, | ||
IN UINTN | BarOffsetEnd, | ||
IN PCI_ROOT_BRIDGE_APERTURE * | Io, | ||
IN PCI_ROOT_BRIDGE_APERTURE * | Mem, | ||
IN PCI_ROOT_BRIDGE_APERTURE * | MemAbove4G | ||
) |
Parse PCI bar and collect the assigned PCI resource information.
[in] | Command | Supported attributes. |
[in] | Bus | PCI bus number. |
[in] | Device | PCI device number. |
[in] | Function | PCI function number. |
[in] | BarOffsetBase | PCI bar start offset. |
[in] | BarOffsetEnd | PCI bar end offset. |
[in] | Io | IO aperture. |
[in] | Mem | MMIO aperture. |
[in] | MemAbove4G | MMIO aperture above 4G. |
[in] | PMem | Prefetchable MMIO aperture. |
[in] | PMemAbove4G | Prefetchable MMIO aperture above 4G. |
Definition at line 83 of file PciHostBridgeSupport.c.
PCI_ROOT_BRIDGE * RetrieveRootBridgeInfoFromHob | ( | IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES * | PciRootBridgeInfo, |
OUT UINTN * | NumberOfRootBridges | ||
) |
Scan for all root bridges from Universal Payload PciRootBridgeInfoHob
[in] | PciRootBridgeInfo | Pointer of Universal Payload PCI Root Bridge Info Hob |
[out] | NumberOfRootBridges | Number of root bridges detected |
Pointer | to the allocated PCI_ROOT_BRIDGE structure array. |
Definition at line 536 of file PciHostBridgeSupport.c.
PCI_ROOT_BRIDGE * ScanForRootBridges | ( | OUT UINTN * | NumberOfRootBridges | ) |
Scan for all root bridges in platform.
[out] | NumberOfRootBridges | Number of root bridges detected |
Pointer | to the allocated PCI_ROOT_BRIDGE structure array. |
Definition at line 208 of file PciHostBridgeSupport.c.
STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 } |
Definition at line 198 of file PciHostBridgeSupport.c.