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

Go to the source code of this file.

Data Structures

struct  EFI_PCI_ROOT_BRIDGE_DEVICE_PATH
 

Functions

PCI_ROOT_BRIDGE *EFIAPI PciHostBridgeUtilityGetRootBridges (OUT UINTN *Count, IN UINT64 Attributes, IN UINT64 AllocationAttributes, IN BOOLEAN DmaAbove4G, IN BOOLEAN NoExtendedConfigSpace, IN UINTN BusMin, IN UINTN BusMax, 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)
 
VOID EFIAPI PciHostBridgeUtilityFreeRootBridges (IN PCI_ROOT_BRIDGE *Bridges, IN UINTN Count)
 
VOID EFIAPI PciHostBridgeUtilityResourceConflict (IN VOID *Configuration)
 

Variables

GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 * mPciHostBridgeAcpiAddressSpaceTypeStr []
 
STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath
 
GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 * mPciHostBridgeLibAcpiAddressSpaceTypeStr []
 
STATIC PCI_ROOT_BRIDGE mRootBridge
 

Detailed Description

PCI Host Bridge utility functions for ArmVirt.

Copyright (c) 2021, Arm Limited. All rights reserved.

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

Definition in file ArmVirtPciHostBridgeUtilityLib.c.

Function Documentation

◆ PciHostBridgeUtilityFreeRootBridges()

VOID EFIAPI PciHostBridgeUtilityFreeRootBridges ( IN PCI_ROOT_BRIDGE Bridges,
IN UINTN  Count 
)

Utility function to free root bridge instances array from PciHostBridgeUtilityGetRootBridges().

Parameters
[in]BridgesThe root bridge instances array.
[in]CountThe count of the array.

Definition at line 150 of file ArmVirtPciHostBridgeUtilityLib.c.

◆ PciHostBridgeUtilityGetRootBridges()

PCI_ROOT_BRIDGE *EFIAPI PciHostBridgeUtilityGetRootBridges ( OUT UINTN Count,
IN UINT64  Attributes,
IN UINT64  AllocationAttributes,
IN BOOLEAN  DmaAbove4G,
IN BOOLEAN  NoExtendedConfigSpace,
IN UINTN  BusMin,
IN UINTN  BusMax,
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 
)

Utility function to return all the root bridge instances in an array.

Parameters
[out]CountThe number of root bridge instances.
[in]AttributesInitial attributes.
[in]AllocationAttributesAllocation attributes.
[in]DmaAbove4GDMA above 4GB memory.
[in]NoExtendedConfigSpaceNo Extended Config Space.
[in]BusMinMinimum Bus number, inclusive.
[in]BusMaxMaximum Bus number, inclusive.
[in]IoIO aperture.
[in]MemMMIO aperture.
[in]MemAbove4GMMIO aperture above 4G.
[in]PMemPrefetchable MMIO aperture.
[in]PMemAbove4GPrefetchable MMIO aperture above 4G.
Returns
All the root bridge instances in an array.

Definition at line 85 of file ArmVirtPciHostBridgeUtilityLib.c.

◆ PciHostBridgeUtilityResourceConflict()

VOID EFIAPI PciHostBridgeUtilityResourceConflict ( IN VOID *  Configuration)

Utility function to inform the platform that the resource conflict happens.

Parameters
[in]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 174 of file ArmVirtPciHostBridgeUtilityLib.c.

Variable Documentation

◆ mEfiPciRootBridgeDevicePath

STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath
Initial value:
= {
{
{
{
(UINT8)(sizeof (ACPI_HID_DEVICE_PATH)),
(UINT8)((sizeof (ACPI_HID_DEVICE_PATH)) >> 8)
}
},
EISA_PNP_ID (0x0A03),
0
},
{
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
{
END_DEVICE_PATH_LENGTH,
0
}
}
}
#define ACPI_DEVICE_PATH
Definition: DevicePath.h:190
#define ACPI_DP
Definition: DevicePath.h:195

Definition at line 34 of file ArmVirtPciHostBridgeUtilityLib.c.

◆ mPciHostBridgeAcpiAddressSpaceTypeStr

GLOBAL_REMOVE_IF_UNREFERENCED CHAR16* mPciHostBridgeAcpiAddressSpaceTypeStr[]
Initial value:
= {
L"Mem",
L"I/O",
L"Bus"
}

Definition at line 28 of file ArmVirtPciHostBridgeUtilityLib.c.

◆ mPciHostBridgeLibAcpiAddressSpaceTypeStr

GLOBAL_REMOVE_IF_UNREFERENCED CHAR16* mPciHostBridgeLibAcpiAddressSpaceTypeStr[]
Initial value:
= {
L"Mem", L"I/O", L"Bus"
}

Definition at line 59 of file ArmVirtPciHostBridgeUtilityLib.c.

◆ mRootBridge

STATIC PCI_ROOT_BRIDGE mRootBridge

Definition at line 63 of file ArmVirtPciHostBridgeUtilityLib.c.