2 Internal library declaration for PCI Bus module.
4 Copyright (c) 2006 - 2009, 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 Scan pci bus and assign bus number to the given PCI bus system.
80 @param Bridge Bridge device instance.
81 @param StartBusNumber start point.
82 @param SubBusNumber Point to sub bus number.
83 @param PaddedBusRange Customized bus number.
85 @retval EFI_SUCCESS Successfully scanned and assigned bus number.
86 @retval other Some error occurred when scanning pci bus.
88 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
93 IN PCI_IO_DEVICE
*Bridge
,
94 IN UINT8 StartBusNumber
,
95 OUT UINT8
*SubBusNumber
,
96 OUT UINT8
*PaddedBusRange
100 Process Option Rom on the specified root bridge.
102 @param Bridge Pci root bridge device instance.
104 @retval EFI_SUCCESS Success process.
105 @retval other Some error occurred when processing Option Rom on the root bridge.
109 PciRootBridgeP2CProcess (
110 IN PCI_IO_DEVICE
*Bridge
114 Process Option Rom on the specified host bridge.
116 @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
118 @retval EFI_SUCCESS Success process.
119 @retval EFI_NOT_FOUND Can not find the root bridge instance.
120 @retval other Some error occurred when processing Option Rom on the host bridge.
124 PciHostBridgeP2CProcess (
125 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc
129 This function is used to enumerate the entire host bridge
132 @param PciResAlloc A pointer to the PCI Host Resource Allocation protocol.
134 @retval EFI_SUCCESS Successfully enumerated the host bridge.
135 @retval EFI_OUT_OF_RESOURCES No enough memory available.
136 @retval other Some error occurred when enumerating the host bridge.
140 PciHostBridgeEnumerator (
141 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
*PciResAlloc