2 Internal library declaration for PCI Bus module.
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _EFI_PCI_LIB_H_
16 #define _EFI_PCI_LIB_H_
21 } EFI_DEVICE_HANDLE_EXTENDED_DATA_PAYLOAD
;
25 UINT16 DevicePathSize
;
31 } EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA_PAYLOAD
;
35 Retrieve the PCI Card device BAR information via PciIo interface.
37 @param PciIoDevice PCI Card device instance.
42 IN PCI_IO_DEVICE
*PciIoDevice
46 Remove rejected pci device from specific root bridge
49 @param RootBridgeHandle Specific parent root bridge handle.
50 @param Bridge Bridge device instance.
54 RemoveRejectedPciDevices (
55 IN EFI_HANDLE RootBridgeHandle
,
56 IN PCI_IO_DEVICE
*Bridge
60 Submits the I/O and memory resource requirements for the specified PCI Host Bridge.
62 @param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
64 @retval EFI_SUCCESS Successfully finished resource allocation.
65 @retval EFI_NOT_FOUND Cannot get root bridge instance.
66 @retval EFI_OUT_OF_RESOURCES Platform failed to program the resources if no hot plug supported.
67 @retval other Some error occurred when allocating resources for the PCI Host Bridge.
69 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
73 PciHostBridgeResourceAllocator (
74 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc
78 Allocate NumberOfBuses buses and return the next available PCI bus number.
80 @param Bridge Bridge device instance.
81 @param StartBusNumber Current available PCI bus number.
82 @param NumberOfBuses Number of buses enumerated below the StartBusNumber.
83 @param NextBusNumber Next available PCI bus number.
85 @retval EFI_SUCCESS Available bus number resource is enough. Next available PCI bus number
86 is returned in NextBusNumber.
87 @retval EFI_OUT_OF_RESOURCES Available bus number resource is not enough for allocation.
91 PciAllocateBusNumber (
92 IN PCI_IO_DEVICE
*Bridge
,
93 IN UINT8 StartBusNumber
,
94 IN UINT8 NumberOfBuses
,
95 OUT UINT8
*NextBusNumber
99 Scan pci bus and assign bus number to the given PCI bus system.
101 @param Bridge Bridge device instance.
102 @param StartBusNumber start point.
103 @param SubBusNumber Point to sub bus number.
104 @param PaddedBusRange Customized bus number.
106 @retval EFI_SUCCESS Successfully scanned and assigned bus number.
107 @retval other Some error occurred when scanning pci bus.
109 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
114 IN PCI_IO_DEVICE
*Bridge
,
115 IN UINT8 StartBusNumber
,
116 OUT UINT8
*SubBusNumber
,
117 OUT UINT8
*PaddedBusRange
121 Process Option Rom on the specified root bridge.
123 @param Bridge Pci root bridge device instance.
125 @retval EFI_SUCCESS Success process.
126 @retval other Some error occurred when processing Option Rom on the root bridge.
130 PciRootBridgeP2CProcess (
131 IN PCI_IO_DEVICE
*Bridge
135 Process Option Rom on the specified host bridge.
137 @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
139 @retval EFI_SUCCESS Success process.
140 @retval EFI_NOT_FOUND Can not find the root bridge instance.
141 @retval other Some error occurred when processing Option Rom on the host bridge.
145 PciHostBridgeP2CProcess (
146 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc
150 This function is used to enumerate the entire host bridge
153 @param PciResAlloc A pointer to the PCI Host Resource Allocation protocol.
155 @retval EFI_SUCCESS Successfully enumerated the host bridge.
156 @retval EFI_OUT_OF_RESOURCES No enough memory available.
157 @retval other Some error occurred when enumerating the host bridge.
161 PciHostBridgeEnumerator (
162 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc