TianoCore EDK2 master
Loading...
Searching...
No Matches
PciHostBridgeSupport.c File Reference

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_BRIDGEScanForRootBridges (OUT UINTN *NumberOfRootBridges)
 
PCI_ROOT_BRIDGERetrieveRootBridgeInfoFromHob (IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, OUT UINTN *NumberOfRootBridges)
 

Variables

STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 }
 

Detailed Description

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.

Function Documentation

◆ PcatPciRootBridgeBarExisted()

STATIC VOID PcatPciRootBridgeBarExisted ( IN UINTN  Address,
OUT UINT32 *  OriginalValue,
OUT UINT32 *  Value 
)

Probe a bar is existed or not.

Parameters
[in]AddressPCI address for the BAR.
[out]OriginalValueThe original bar value returned.
[out]ValueThe probed bar value returned.

Definition at line 30 of file PciHostBridgeSupport.c.

◆ PcatPciRootBridgeParseBars()

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.

Parameters
[in]CommandSupported attributes.
[in]BusPCI bus number.
[in]DevicePCI device number.
[in]FunctionPCI function number.
[in]BarOffsetBasePCI bar start offset.
[in]BarOffsetEndPCI bar end offset.
[in]IoIO aperture.
[in]MemMMIO aperture.
[in]MemAbove4GMMIO aperture above 4G.
[in]PMemPrefetchable MMIO aperture.
[in]PMemAbove4GPrefetchable MMIO aperture above 4G.

Definition at line 83 of file PciHostBridgeSupport.c.

◆ RetrieveRootBridgeInfoFromHob()

PCI_ROOT_BRIDGE * RetrieveRootBridgeInfoFromHob ( IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES PciRootBridgeInfo,
OUT UINTN NumberOfRootBridges 
)

Scan for all root bridges from Universal Payload PciRootBridgeInfoHob

Parameters
[in]PciRootBridgeInfoPointer of Universal Payload PCI Root Bridge Info Hob
[out]NumberOfRootBridgesNumber of root bridges detected
Return values
Pointerto the allocated PCI_ROOT_BRIDGE structure array.

Definition at line 536 of file PciHostBridgeSupport.c.

◆ ScanForRootBridges()

PCI_ROOT_BRIDGE * ScanForRootBridges ( OUT UINTN NumberOfRootBridges)

Scan for all root bridges in platform.

Parameters
[out]NumberOfRootBridgesNumber of root bridges detected
Return values
Pointerto the allocated PCI_ROOT_BRIDGE structure array.

Definition at line 208 of file PciHostBridgeSupport.c.

Variable Documentation

◆ mNonExistAperture

STATIC PCI_ROOT_BRIDGE_APERTURE mNonExistAperture = { MAX_UINT64, 0 }

Definition at line 198 of file PciHostBridgeSupport.c.