2 Internal library declaration for PCI Bus module.
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _EFI_PCI_LIB_H_
10 #define _EFI_PCI_LIB_H_
15 } EFI_DEVICE_HANDLE_EXTENDED_DATA_PAYLOAD
;
19 UINT16 DevicePathSize
;
25 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA_PAYLOAD
;
29 Retrieve the PCI Card device BAR information via PciIo interface.
31 @param PciIoDevice PCI Card device instance.
36 IN PCI_IO_DEVICE
*PciIoDevice
40 Remove rejected pci device from specific root bridge
43 @param RootBridgeHandle Specific parent root bridge handle.
44 @param Bridge Bridge device instance.
48 RemoveRejectedPciDevices (
49 IN EFI_HANDLE RootBridgeHandle
,
50 IN PCI_IO_DEVICE
*Bridge
54 Submits the I/O and memory resource requirements for the specified PCI Host Bridge.
56 @param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
58 @retval EFI_SUCCESS Successfully finished resource allocation.
59 @retval EFI_NOT_FOUND Cannot get root bridge instance.
60 @retval EFI_OUT_OF_RESOURCES Platform failed to program the resources if no hot plug supported.
61 @retval other Some error occurred when allocating resources for the PCI Host Bridge.
63 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
67 PciHostBridgeResourceAllocator (
68 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc
72 Allocate NumberOfBuses buses and return the next available PCI bus number.
74 @param Bridge Bridge device instance.
75 @param StartBusNumber Current available PCI bus number.
76 @param NumberOfBuses Number of buses enumerated below the StartBusNumber.
77 @param NextBusNumber Next available PCI bus number.
79 @retval EFI_SUCCESS Available bus number resource is enough. Next available PCI bus number
80 is returned in NextBusNumber.
81 @retval EFI_OUT_OF_RESOURCES Available bus number resource is not enough for allocation.
85 PciAllocateBusNumber (
86 IN PCI_IO_DEVICE
*Bridge
,
87 IN UINT8 StartBusNumber
,
88 IN UINT8 NumberOfBuses
,
89 OUT UINT8
*NextBusNumber
93 Scan pci bus and assign bus number to the given PCI bus system.
95 @param Bridge Bridge device instance.
96 @param StartBusNumber start point.
97 @param SubBusNumber Point to sub bus number.
98 @param PaddedBusRange Customized bus number.
100 @retval EFI_SUCCESS Successfully scanned and assigned bus number.
101 @retval other Some error occurred when scanning pci bus.
103 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
108 IN PCI_IO_DEVICE
*Bridge
,
109 IN UINT8 StartBusNumber
,
110 OUT UINT8
*SubBusNumber
,
111 OUT UINT8
*PaddedBusRange
115 Process Option Rom on the specified root bridge.
117 @param Bridge Pci root bridge device instance.
119 @retval EFI_SUCCESS Success process.
120 @retval other Some error occurred when processing Option Rom on the root bridge.
124 PciRootBridgeP2CProcess (
125 IN PCI_IO_DEVICE
*Bridge
129 Process Option Rom on the specified host bridge.
131 @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
133 @retval EFI_SUCCESS Success process.
134 @retval EFI_NOT_FOUND Can not find the root bridge instance.
135 @retval other Some error occurred when processing Option Rom on the host bridge.
139 PciHostBridgeP2CProcess (
140 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc
144 This function is used to enumerate the entire host bridge
147 @param PciResAlloc A pointer to the PCI Host Resource Allocation protocol.
149 @retval EFI_SUCCESS Successfully enumerated the host bridge.
150 @retval EFI_OUT_OF_RESOURCES No enough memory available.
151 @retval other Some error occurred when enumerating the host bridge.
155 PciHostBridgeEnumerator (
156 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc