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

Go to the source code of this file.

Data Structures

struct  DTB_PCI_HOST_RANGE_RECORD
 

Macros

#define DTB_PCI_HOST_RANGE_RELOCATABLE   BIT31
 
#define DTB_PCI_HOST_RANGE_PREFETCHABLE   BIT30
 
#define DTB_PCI_HOST_RANGE_ALIASED   BIT29
 
#define DTB_PCI_HOST_RANGE_MMIO32   BIT25
 
#define DTB_PCI_HOST_RANGE_MMIO64   (BIT25 | BIT24)
 
#define DTB_PCI_HOST_RANGE_IO   BIT24
 
#define DTB_PCI_HOST_RANGE_TYPEMASK   (BIT31 | BIT30 | BIT29 | BIT25 | BIT24)
 

Functions

STATIC EFI_STATUS MapGcdMmioSpace (IN UINT64 Base, IN UINT64 Size)
 
STATIC EFI_STATUS ProcessPciHost (OUT UINT64 *IoBase, OUT UINT64 *IoSize, OUT UINT64 *Mmio32Base, OUT UINT64 *Mmio32Size, OUT UINT64 *Mmio64Base, OUT UINT64 *Mmio64Size, OUT UINT32 *BusMin, OUT UINT32 *BusMax)
 
PCI_ROOT_BRIDGE *EFIAPI PciHostBridgeGetRootBridges (UINTN *Count)
 
VOID EFIAPI PciHostBridgeFreeRootBridges (PCI_ROOT_BRIDGE *Bridges, UINTN Count)
 
VOID EFIAPI PciHostBridgeResourceConflict (EFI_HANDLE HostBridgeHandle, VOID *Configuration)
 

Detailed Description

PCI Host Bridge Library instance for pci-ecam-generic DT nodes

Copyright (c) 2016, Linaro Ltd. All rights reserved.

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

Definition in file FdtPciHostBridgeLib.c.

Macro Definition Documentation

◆ DTB_PCI_HOST_RANGE_ALIASED

#define DTB_PCI_HOST_RANGE_ALIASED   BIT29

Definition at line 39 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_IO

#define DTB_PCI_HOST_RANGE_IO   BIT24

Definition at line 42 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_MMIO32

#define DTB_PCI_HOST_RANGE_MMIO32   BIT25

Definition at line 40 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_MMIO64

#define DTB_PCI_HOST_RANGE_MMIO64   (BIT25 | BIT24)

Definition at line 41 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_PREFETCHABLE

#define DTB_PCI_HOST_RANGE_PREFETCHABLE   BIT30

Definition at line 38 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_RELOCATABLE

#define DTB_PCI_HOST_RANGE_RELOCATABLE   BIT31

Definition at line 37 of file FdtPciHostBridgeLib.c.

◆ DTB_PCI_HOST_RANGE_TYPEMASK

#define DTB_PCI_HOST_RANGE_TYPEMASK   (BIT31 | BIT30 | BIT29 | BIT25 | BIT24)

Definition at line 43 of file FdtPciHostBridgeLib.c.

Function Documentation

◆ MapGcdMmioSpace()

STATIC EFI_STATUS MapGcdMmioSpace ( IN UINT64  Base,
IN UINT64  Size 
)

Definition at line 47 of file FdtPciHostBridgeLib.c.

◆ PciHostBridgeFreeRootBridges()

VOID EFIAPI PciHostBridgeFreeRootBridges ( PCI_ROOT_BRIDGE Bridges,
UINTN  Count 
)

Free the root bridge instances array returned from PciHostBridgeGetRootBridges().

Parameters
BridgesThe root bridge instances array.
CountThe count of the array.

Definition at line 472 of file FdtPciHostBridgeLib.c.

◆ PciHostBridgeGetRootBridges()

PCI_ROOT_BRIDGE *EFIAPI PciHostBridgeGetRootBridges ( UINTN Count)

Return all the root bridge instances in an array.

Parameters
CountReturn the count of root bridge instances.
Returns
All the root bridge instances in an array. The array should be passed into PciHostBridgeFreeRootBridges() when it's not used.

Definition at line 355 of file FdtPciHostBridgeLib.c.

◆ PciHostBridgeResourceConflict()

VOID EFIAPI PciHostBridgeResourceConflict ( EFI_HANDLE  HostBridgeHandle,
VOID *  Configuration 
)

Inform the platform that the resource conflict happens.

Parameters
HostBridgeHandleHandle of the Host Bridge.
ConfigurationPointer to PCI I/O and PCI memory resource descriptors. The Configuration contains the resources for all the root bridges. The resource for each root bridge is terminated with END descriptor and an additional END is appended indicating the end of the entire resources. The resource descriptor field values follow the description in EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL .SubmitResources().

Definition at line 496 of file FdtPciHostBridgeLib.c.

◆ ProcessPciHost()

STATIC EFI_STATUS ProcessPciHost ( OUT UINT64 *  IoBase,
OUT UINT64 *  IoSize,
OUT UINT64 *  Mmio32Base,
OUT UINT64 *  Mmio32Size,
OUT UINT64 *  Mmio64Base,
OUT UINT64 *  Mmio64Size,
OUT UINT32 *  BusMin,
OUT UINT32 *  BusMax 
)

Definition at line 87 of file FdtPciHostBridgeLib.c.