]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciLib.h
CommitLineData
9060e3ec 1/** @file\r
2 Internal library declaration for PCI Bus module.\r
3\r
cd5ebaa0
HT
4Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
9060e3ec 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _EFI_PCI_LIB_H_\r
16#define _EFI_PCI_LIB_H_\r
17\r
18\r
19typedef struct {\r
20 EFI_HANDLE Handle;\r
21} EFI_DEVICE_HANDLE_EXTENDED_DATA_PAYLOAD;\r
22\r
23typedef struct {\r
24 UINT32 Bar;\r
25 UINT16 DevicePathSize;\r
26 UINT16 ReqResSize;\r
27 UINT16 AllocResSize;\r
28 UINT8 *DevicePath;\r
29 UINT8 *ReqRes;\r
30 UINT8 *AllocRes;\r
31} EFI_RESOURCE_ALLOC_FAILURE_ERROR_DATA_PAYLOAD;\r
32\r
33\r
34/**\r
35 Retrieve the PCI Card device BAR information via PciIo interface.\r
36\r
37 @param PciIoDevice PCI Card device instance.\r
38\r
39**/\r
40VOID\r
41GetBackPcCardBar (\r
42 IN PCI_IO_DEVICE *PciIoDevice\r
43 );\r
44\r
45/**\r
46 Remove rejected pci device from specific root bridge\r
47 handle.\r
48\r
49 @param RootBridgeHandle Specific parent root bridge handle.\r
50 @param Bridge Bridge device instance.\r
51\r
52**/\r
53VOID\r
54RemoveRejectedPciDevices (\r
55 IN EFI_HANDLE RootBridgeHandle,\r
56 IN PCI_IO_DEVICE *Bridge\r
57 );\r
58\r
59/**\r
60 Submits the I/O and memory resource requirements for the specified PCI Host Bridge.\r
61\r
62 @param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
63\r
64 @retval EFI_SUCCESS Successfully finished resource allocation.\r
65 @retval EFI_NOT_FOUND Cannot get root bridge instance.\r
66 @retval EFI_OUT_OF_RESOURCES Platform failed to program the resources if no hot plug supported.\r
67 @retval other Some error occurred when allocating resources for the PCI Host Bridge.\r
68\r
69 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.\r
70\r
71**/\r
72EFI_STATUS\r
73PciHostBridgeResourceAllocator (\r
74 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
75 );\r
76\r
77/**\r
78 Scan pci bus and assign bus number to the given PCI bus system.\r
79\r
80 @param Bridge Bridge device instance.\r
81 @param StartBusNumber start point.\r
82 @param SubBusNumber Point to sub bus number.\r
83 @param PaddedBusRange Customized bus number.\r
84\r
85 @retval EFI_SUCCESS Successfully scanned and assigned bus number.\r
86 @retval other Some error occurred when scanning pci bus.\r
87\r
88 @note Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.\r
89\r
90**/\r
91EFI_STATUS\r
92PciScanBus (\r
93 IN PCI_IO_DEVICE *Bridge,\r
94 IN UINT8 StartBusNumber,\r
95 OUT UINT8 *SubBusNumber,\r
96 OUT UINT8 *PaddedBusRange\r
97 );\r
98\r
99/**\r
100 Process Option Rom on the specified root bridge.\r
101\r
102 @param Bridge Pci root bridge device instance.\r
103\r
104 @retval EFI_SUCCESS Success process.\r
105 @retval other Some error occurred when processing Option Rom on the root bridge.\r
106\r
107**/\r
108EFI_STATUS\r
109PciRootBridgeP2CProcess (\r
110 IN PCI_IO_DEVICE *Bridge\r
111 );\r
112\r
113/**\r
114 Process Option Rom on the specified host bridge.\r
115\r
116 @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
117\r
118 @retval EFI_SUCCESS Success process.\r
119 @retval EFI_NOT_FOUND Can not find the root bridge instance.\r
120 @retval other Some error occurred when processing Option Rom on the host bridge.\r
121\r
122**/\r
123EFI_STATUS\r
124PciHostBridgeP2CProcess (\r
125 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
126 );\r
127\r
128/**\r
129 This function is used to enumerate the entire host bridge\r
130 in a given platform.\r
131\r
132 @param PciResAlloc A pointer to the PCI Host Resource Allocation protocol.\r
133\r
134 @retval EFI_SUCCESS Successfully enumerated the host bridge.\r
135 @retval EFI_OUT_OF_RESOURCES No enough memory available.\r
136 @retval other Some error occurred when enumerating the host bridge.\r
137\r
138**/\r
139EFI_STATUS\r
140PciHostBridgeEnumerator (\r
141 IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
142 );\r
143\r
144#endif\r