TianoCore EDK2 master
Loading...
Searching...
No Matches
PciHostBridge.h File Reference

Go to the source code of this file.

Data Structures

struct  CB_PCI_ROOT_BRIDGE_DEVICE_PATH
 

Functions

PCI_ROOT_BRIDGEScanForRootBridges (OUT UINTN *NumberOfRootBridges)
 
PCI_ROOT_BRIDGERetrieveRootBridgeInfoFromHob (IN UNIVERSAL_PAYLOAD_PCI_ROOT_BRIDGES *PciRootBridgeInfo, OUT UINTN *NumberOfRootBridges)
 
EFI_STATUS InitRootBridge (IN UINT64 Supports, IN UINT64 Attributes, IN UINT64 AllocAttributes, IN UINT8 RootBusNumber, IN UINT8 MaxSubBusNumber, IN PCI_ROOT_BRIDGE_APERTURE *Io, IN PCI_ROOT_BRIDGE_APERTURE *Mem, IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G, IN PCI_ROOT_BRIDGE_APERTURE *PMem, IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G, OUT PCI_ROOT_BRIDGE *RootBus)
 
EFI_DEVICE_PATH_PROTOCOLCreateRootBridgeDevicePath (IN UINT32 HID, IN UINT32 UID)
 

Detailed Description

Header file of PciHostBridgeLib.

Copyright (C) 2016, Red Hat, Inc. Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PciHostBridge.h.

Function Documentation

◆ CreateRootBridgeDevicePath()

EFI_DEVICE_PATH_PROTOCOL * CreateRootBridgeDevicePath ( IN UINT32  HID,
IN UINT32  UID 
)

Initialize DevicePath for a PCI_ROOT_BRIDGE.

Parameters
[in]HIDHID for device path
[in]UIDUID for device path
Return values
Apointer to the new created device patch.

Definition at line 163 of file PciHostBridgeLib.c.

◆ InitRootBridge()

EFI_STATUS InitRootBridge ( IN UINT64  Supports,
IN UINT64  Attributes,
IN UINT64  AllocAttributes,
IN UINT8  RootBusNumber,
IN UINT8  MaxSubBusNumber,
IN PCI_ROOT_BRIDGE_APERTURE Io,
IN PCI_ROOT_BRIDGE_APERTURE Mem,
IN PCI_ROOT_BRIDGE_APERTURE MemAbove4G,
IN PCI_ROOT_BRIDGE_APERTURE PMem,
IN PCI_ROOT_BRIDGE_APERTURE PMemAbove4G,
OUT PCI_ROOT_BRIDGE RootBus 
)

Initialize a PCI_ROOT_BRIDGE structure.

Parameters
[in]SupportsSupported attributes.
[in]AttributesInitial attributes.
[in]AllocAttributesAllocation attributes.
[in]RootBusNumberThe bus number to store in RootBus.
[in]MaxSubBusNumberThe inclusive maximum bus number that can be assigned to any subordinate bus found behind any PCI bridge hanging off this root bus.

The caller is responsible for ensuring that RootBusNumber <= MaxSubBusNumber. If RootBusNumber equals MaxSubBusNumber, then the root bus has no room for subordinate buses.

Parameters
[in]IoIO aperture.
[in]MemMMIO aperture.
[in]MemAbove4GMMIO aperture above 4G.
[in]PMemPrefetchable MMIO aperture.
[in]PMemAbove4GPrefetchable MMIO aperture above 4G.
[out]RootBusThe PCI_ROOT_BRIDGE structure (allocated by the caller) that should be filled in by this function.
Return values
EFI_SUCCESSInitialization successful. A device path consisting of an ACPI device path node, with UID = RootBusNumber, has been allocated and linked into RootBus.
EFI_OUT_OF_RESOURCESMemory allocation failed.

Definition at line 94 of file PciHostBridgeLib.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.