]>
Commit | Line | Data |
---|---|---|
97404058 | 1 | /** @file\r |
a3b8e257 | 2 | Header file declares all logic function for PCI bus enumeration.\r |
3 | \r | |
ead42efc | 4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
3db51098 | 13 | **/\r |
ead42efc | 14 | \r |
ead42efc | 15 | \r |
eeefcb9d | 16 | #ifndef _EFI_PCI_ENUMERATOR_H_\r |
17 | #define _EFI_PCI_ENUMERATOR_H_\r | |
ead42efc | 18 | \r |
19 | #include "PciResourceSupport.h"\r | |
20 | \r | |
a3b8e257 | 21 | /**\r |
22 | This routine is used to enumerate entire pci bus system\r | |
23 | in a given platform\r | |
24 | \r | |
97404058 | 25 | @param Controller Parent controller handle.\r |
a3b8e257 | 26 | \r |
97404058 | 27 | @return Status of enumerating.\r |
a3b8e257 | 28 | **/\r |
ead42efc | 29 | EFI_STATUS\r |
30 | PciEnumerator (\r | |
31 | IN EFI_HANDLE Controller\r | |
ed66e1bc | 32 | );\r |
ead42efc | 33 | \r |
a3b8e257 | 34 | /**\r |
35 | Enumerate PCI root bridge\r | |
36 | \r | |
37 | @param PciResAlloc Pointer to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r | |
97404058 | 38 | @param RootBridgeDev Instance of root bridge device.\r |
a3b8e257 | 39 | \r |
97404058 | 40 | @retval EFI_SUCCESS Success to enumerate root bridge.\r |
41 | @retval Others Fail to enumerate root bridge.\r | |
a3b8e257 | 42 | \r |
43 | **/\r | |
ead42efc | 44 | EFI_STATUS\r |
45 | PciRootBridgeEnumerator (\r | |
46 | IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,\r | |
47 | IN PCI_IO_DEVICE *RootBridgeDev\r | |
ed66e1bc | 48 | );\r |
ead42efc | 49 | \r |
a3b8e257 | 50 | /**\r |
51 | This routine is used to process option rom on a certain root bridge\r | |
52 | \r | |
97404058 | 53 | @param Bridge Given parent's root bridge.\r |
54 | @param RomBase Base address of ROM driver loaded from.\r | |
55 | @param MaxLength Max rom size.\r | |
a3b8e257 | 56 | \r |
57 | @retval EFI_SUCCESS Success to process option rom image.\r | |
58 | **/\r | |
ead42efc | 59 | EFI_STATUS\r |
60 | ProcessOptionRom (\r | |
61 | IN PCI_IO_DEVICE *Bridge,\r | |
62 | IN UINT64 RomBase,\r | |
63 | IN UINT64 MaxLength\r | |
ed66e1bc | 64 | );\r |
ead42efc | 65 | \r |
a3b8e257 | 66 | /**\r |
67 | This routine is used to assign bus number to the given PCI bus system\r | |
68 | \r | |
97404058 | 69 | @param Bridge Parent root bridge instance.\r |
70 | @param StartBusNumber Number of beginning.\r | |
71 | @param SubBusNumber the number of sub bus.\r | |
a3b8e257 | 72 | \r |
97404058 | 73 | @retval EFI_SUCCESS Success to assign bus number.\r |
a3b8e257 | 74 | **/\r |
ead42efc | 75 | EFI_STATUS\r |
76 | PciAssignBusNumber (\r | |
77 | IN PCI_IO_DEVICE *Bridge,\r | |
78 | IN UINT8 StartBusNumber,\r | |
79 | OUT UINT8 *SubBusNumber\r | |
ed66e1bc | 80 | );\r |
ead42efc | 81 | \r |
a3b8e257 | 82 | /**\r |
83 | This routine is used to determine the root bridge attribute by interfacing\r | |
84 | the host bridge resource allocation protocol.\r | |
85 | \r | |
97404058 | 86 | @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r |
87 | @param RootBridgeDev Root bridge instance.\r | |
a3b8e257 | 88 | \r |
97404058 | 89 | @retval EFI_SUCCESS Success to get root bridge's attribute.\r |
90 | @retval Others Fail to get attribute.\r | |
a3b8e257 | 91 | **/\r |
ead42efc | 92 | EFI_STATUS\r |
93 | DetermineRootBridgeAttributes (\r | |
94 | IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,\r | |
95 | IN PCI_IO_DEVICE *RootBridgeDev\r | |
ed66e1bc | 96 | );\r |
ead42efc | 97 | \r |
a3b8e257 | 98 | /**\r |
99 | Get Max Option Rom size on this bridge\r | |
100 | \r | |
97404058 | 101 | @param Bridge Bridge device instance.\r |
102 | @return Max size of option rom.\r | |
a3b8e257 | 103 | **/\r |
ead42efc | 104 | UINT64\r |
105 | GetMaxOptionRomSize (\r | |
106 | IN PCI_IO_DEVICE *Bridge\r | |
ed66e1bc | 107 | );\r |
ead42efc | 108 | \r |
a3b8e257 | 109 | /**\r |
110 | Process attributes of devices on this host bridge\r | |
111 | \r | |
112 | @param PciResAlloc Protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r | |
113 | \r | |
97404058 | 114 | @retval EFI_NOT_FOUND Can not find the specific root bridge device.\r |
115 | @retval EFI_SUCCESS Success Process attribute.\r | |
116 | @retval Others Can not determine the root bridge device's attribute.\r | |
a3b8e257 | 117 | **/\r |
ead42efc | 118 | EFI_STATUS\r |
119 | PciHostBridgeDeviceAttribute (\r | |
120 | IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r | |
ed66e1bc | 121 | );\r |
ead42efc | 122 | \r |
a3b8e257 | 123 | /**\r |
124 | Get resource allocation status from the ACPI pointer\r | |
125 | \r | |
97404058 | 126 | @param AcpiConfig Point to Acpi configuration table.\r |
127 | @param IoResStatus Return the status of I/O resource.\r | |
128 | @param Mem32ResStatus Return the status of 32-bit Memory resource.\r | |
129 | @param PMem32ResStatus Return the status of 32-bit PMemory resource.\r | |
130 | @param Mem64ResStatus Return the status of 64-bit Memory resource.\r | |
131 | @param PMem64ResStatus Return the status of 64-bit PMemory resource.\r | |
a3b8e257 | 132 | \r |
133 | @retval EFI_SUCCESS Success to get resource allocation status from ACPI configuration table.\r | |
134 | **/\r | |
ead42efc | 135 | EFI_STATUS\r |
136 | GetResourceAllocationStatus (\r | |
137 | VOID *AcpiConfig,\r | |
138 | OUT UINT64 *IoResStatus,\r | |
139 | OUT UINT64 *Mem32ResStatus,\r | |
140 | OUT UINT64 *PMem32ResStatus,\r | |
141 | OUT UINT64 *Mem64ResStatus,\r | |
142 | OUT UINT64 *PMem64ResStatus\r | |
ed66e1bc | 143 | );\r |
ead42efc | 144 | \r |
a3b8e257 | 145 | /**\r |
146 | Remove a PCI device from device pool and mark its bar\r | |
147 | \r | |
97404058 | 148 | @param PciDevice Instance of Pci device.\r |
a3b8e257 | 149 | \r |
97404058 | 150 | @retval EFI_SUCCESS Success Operation.\r |
151 | @retval EFI_ABORTED Pci device is a root bridge.\r | |
a3b8e257 | 152 | **/\r |
ead42efc | 153 | EFI_STATUS\r |
154 | RejectPciDevice (\r | |
155 | IN PCI_IO_DEVICE *PciDevice\r | |
ed66e1bc | 156 | );\r |
ead42efc | 157 | \r |
a3b8e257 | 158 | /**\r |
159 | Determine whethter a PCI device can be rejected\r | |
160 | \r | |
97404058 | 161 | @param PciResNode Pointer to Pci resource node instance.\r |
a3b8e257 | 162 | \r |
97404058 | 163 | @return whethter a PCI device can be rejected.\r |
a3b8e257 | 164 | **/\r |
ead42efc | 165 | BOOLEAN\r |
166 | IsRejectiveDevice (\r | |
167 | IN PCI_RESOURCE_NODE *PciResNode\r | |
ed66e1bc | 168 | );\r |
ead42efc | 169 | \r |
a3b8e257 | 170 | /**\r |
171 | Compare two resource node and get the larger resource consumer\r | |
172 | \r | |
97404058 | 173 | @param PciResNode1 resource node 1 want to be compared.\r |
174 | @param PciResNode2 resource node 2 want to be compared.\r | |
a3b8e257 | 175 | \r |
176 | @return Larger resource consumer.\r | |
177 | **/\r | |
ead42efc | 178 | PCI_RESOURCE_NODE *\r |
179 | GetLargerConsumerDevice (\r | |
180 | IN PCI_RESOURCE_NODE *PciResNode1,\r | |
181 | IN PCI_RESOURCE_NODE *PciResNode2\r | |
ed66e1bc | 182 | );\r |
ead42efc | 183 | \r |
a3b8e257 | 184 | /**\r |
185 | Get the max resource consumer in the host resource pool\r | |
186 | \r | |
97404058 | 187 | @param ResPool Pointer to resource pool node.\r |
a3b8e257 | 188 | \r |
97404058 | 189 | @return the max resource consumer in the host resource pool.\r |
a3b8e257 | 190 | **/\r |
ead42efc | 191 | PCI_RESOURCE_NODE *\r |
192 | GetMaxResourceConsumerDevice (\r | |
193 | IN PCI_RESOURCE_NODE *ResPool\r | |
ed66e1bc | 194 | );\r |
ead42efc | 195 | \r |
a3b8e257 | 196 | /**\r |
197 | Adjust host bridge allocation so as to reduce resource requirement\r | |
198 | \r | |
97404058 | 199 | @param IoPool Pointer to instance of I/O resource Node.\r |
200 | @param Mem32Pool Pointer to instance of 32-bit memory resource Node.\r | |
201 | @param PMem32Pool Pointer to instance of 32-bit Pmemory resource node.\r | |
202 | @param Mem64Pool Pointer to instance of 64-bit memory resource node.\r | |
203 | @param PMem64Pool Pointer to instance of 64-bit Pmemory resource node.\r | |
204 | @param IoResStatus Status of I/O resource Node.\r | |
205 | @param Mem32ResStatus Status of 32-bit memory resource Node.\r | |
206 | @param PMem32ResStatus Status of 32-bit Pmemory resource node.\r | |
207 | @param Mem64ResStatus Status of 64-bit memory resource node.\r | |
208 | @param PMem64ResStatus Status of 64-bit Pmemory resource node.\r | |
a3b8e257 | 209 | **/\r |
ead42efc | 210 | EFI_STATUS\r |
211 | PciHostBridgeAdjustAllocation (\r | |
212 | IN PCI_RESOURCE_NODE *IoPool,\r | |
213 | IN PCI_RESOURCE_NODE *Mem32Pool,\r | |
214 | IN PCI_RESOURCE_NODE *PMem32Pool,\r | |
215 | IN PCI_RESOURCE_NODE *Mem64Pool,\r | |
216 | IN PCI_RESOURCE_NODE *PMem64Pool,\r | |
217 | IN UINT64 IoResStatus,\r | |
218 | IN UINT64 Mem32ResStatus,\r | |
219 | IN UINT64 PMem32ResStatus,\r | |
220 | IN UINT64 Mem64ResStatus,\r | |
221 | IN UINT64 PMem64ResStatus\r | |
ed66e1bc | 222 | );\r |
ead42efc | 223 | \r |
a3b8e257 | 224 | /**\r |
225 | Summary requests for all resource type, and contruct ACPI resource\r | |
226 | requestor instance.\r | |
227 | \r | |
97404058 | 228 | @param Bridge detecting bridge.\r |
229 | @param IoNode Pointer to instance of I/O resource Node.\r | |
230 | @param Mem32Node Pointer to instance of 32-bit memory resource Node.\r | |
231 | @param PMem32Node Pointer to instance of 32-bit Pmemory resource node.\r | |
232 | @param Mem64Node Pointer to instance of 64-bit memory resource node.\r | |
233 | @param PMem64Node Pointer to instance of 64-bit Pmemory resource node.\r | |
234 | @param pConfig outof buffer holding new constructed APCI resource requestor.\r | |
a3b8e257 | 235 | **/\r |
ead42efc | 236 | EFI_STATUS\r |
237 | ConstructAcpiResourceRequestor (\r | |
238 | IN PCI_IO_DEVICE *Bridge,\r | |
239 | IN PCI_RESOURCE_NODE *IoNode,\r | |
240 | IN PCI_RESOURCE_NODE *Mem32Node,\r | |
241 | IN PCI_RESOURCE_NODE *PMem32Node,\r | |
242 | IN PCI_RESOURCE_NODE *Mem64Node,\r | |
243 | IN PCI_RESOURCE_NODE *PMem64Node,\r | |
244 | OUT VOID **pConfig\r | |
ed66e1bc | 245 | );\r |
ead42efc | 246 | \r |
a3b8e257 | 247 | /**\r |
248 | Get resource base from a acpi configuration descriptor.\r | |
249 | \r | |
250 | @param pConfig an acpi configuration descriptor.\r | |
97404058 | 251 | @param IoBase output of I/O resource base address.\r |
252 | @param Mem32Base output of 32-bit memory base address.\r | |
253 | @param PMem32Base output of 32-bit pmemory base address.\r | |
254 | @param Mem64Base output of 64-bit memory base address.\r | |
255 | @param PMem64Base output of 64-bit pmemory base address.\r | |
a3b8e257 | 256 | \r |
97404058 | 257 | @return EFI_SUCCESS Success operation.\r |
a3b8e257 | 258 | **/\r |
ead42efc | 259 | EFI_STATUS\r |
260 | GetResourceBase (\r | |
261 | IN VOID *pConfig,\r | |
262 | OUT UINT64 *IoBase,\r | |
263 | OUT UINT64 *Mem32Base,\r | |
264 | OUT UINT64 *PMem32Base,\r | |
265 | OUT UINT64 *Mem64Base,\r | |
266 | OUT UINT64 *PMem64Base\r | |
ed66e1bc | 267 | );\r |
ead42efc | 268 | \r |
a3b8e257 | 269 | /**\r |
270 | Enumerate pci bridge, allocate resource and determine attribute\r | |
271 | for devices on this bridge\r | |
272 | \r | |
97404058 | 273 | @param BridgeDev Pointer to instance of bridge device.\r |
a3b8e257 | 274 | \r |
97404058 | 275 | @retval EFI_SUCCESS Success operation.\r |
276 | @retval Others Fail to enumerate.\r | |
a3b8e257 | 277 | **/\r |
ead42efc | 278 | EFI_STATUS\r |
279 | PciBridgeEnumerator (\r | |
280 | IN PCI_IO_DEVICE *BridgeDev\r | |
ed66e1bc | 281 | );\r |
ead42efc | 282 | \r |
a3b8e257 | 283 | /**\r |
284 | Allocate all kinds of resource for bridge\r | |
285 | \r | |
97404058 | 286 | @param Bridge Pointer to bridge instance.\r |
a3b8e257 | 287 | \r |
288 | @retval EFI_SUCCESS Success operation.\r | |
97404058 | 289 | @retval Others Fail to allocate resource for bridge.\r |
a3b8e257 | 290 | **/\r |
ead42efc | 291 | EFI_STATUS\r |
292 | PciBridgeResourceAllocator (\r | |
293 | IN PCI_IO_DEVICE *Bridge\r | |
ed66e1bc | 294 | );\r |
ead42efc | 295 | \r |
a3b8e257 | 296 | /**\r |
297 | Get resource base address for a pci bridge device\r | |
298 | \r | |
97404058 | 299 | @param Bridge Given Pci driver instance.\r |
300 | @param IoBase output for base address of I/O type resource.\r | |
301 | @param Mem32Base output for base address of 32-bit memory type resource.\r | |
302 | @param PMem32Base output for base address of 32-bit Pmemory type resource.\r | |
303 | @param Mem64Base output for base address of 64-bit memory type resource.\r | |
304 | @param PMem64Base output for base address of 64-bit Pmemory type resource.\r | |
a3b8e257 | 305 | \r |
97404058 | 306 | @retval EFI_SUCCESS Succes to get resource base address.\r |
a3b8e257 | 307 | **/\r |
ead42efc | 308 | EFI_STATUS\r |
309 | GetResourceBaseFromBridge (\r | |
310 | IN PCI_IO_DEVICE *Bridge,\r | |
311 | OUT UINT64 *IoBase,\r | |
312 | OUT UINT64 *Mem32Base,\r | |
313 | OUT UINT64 *PMem32Base,\r | |
314 | OUT UINT64 *Mem64Base,\r | |
315 | OUT UINT64 *PMem64Base\r | |
ed66e1bc | 316 | );\r |
ead42efc | 317 | \r |
a3b8e257 | 318 | /**\r |
319 | Process Option Rom on this host bridge\r | |
320 | \r | |
97404058 | 321 | @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r |
a3b8e257 | 322 | \r |
97404058 | 323 | @retval EFI_NOT_FOUND Can not find the root bridge instance.\r |
324 | @retval EFI_SUCCESS Success process.\r | |
a3b8e257 | 325 | **/\r |
ead42efc | 326 | EFI_STATUS\r |
327 | PciHostBridgeP2CProcess (\r | |
328 | IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r | |
ed66e1bc | 329 | );\r |
ead42efc | 330 | \r |
a3b8e257 | 331 | /**\r |
332 | These are the notifications from the PCI bus driver that it is about to enter a certain \r | |
333 | phase of the PCI enumeration process.\r | |
334 | \r | |
335 | This member function can be used to notify the host bridge driver to perform specific actions,\r | |
336 | including any chipset-specific initialization, so that the chipset is ready to enter the next phase.\r | |
337 | Eight notification points are defined at this time. See belows:\r | |
338 | EfiPciHostBridgeBeginEnumeration - Resets the host bridge PCI apertures and internal data\r | |
339 | structures. The PCI enumerator should issue this notification\r | |
340 | before starting a fresh enumeration process. Enumeration cannot\r | |
341 | be restarted after sending any other notification such as\r | |
342 | EfiPciHostBridgeBeginBusAllocation.\r | |
343 | EfiPciHostBridgeBeginBusAllocation - The bus allocation phase is about to begin. No specific action is\r | |
344 | required here. This notification can be used to perform any\r | |
345 | chipset-specific programming.\r | |
346 | EfiPciHostBridgeEndBusAllocation - The bus allocation and bus programming phase is complete. No\r | |
347 | specific action is required here. This notification can be used to\r | |
348 | perform any chipset-specific programming.\r | |
349 | EfiPciHostBridgeBeginResourceAllocation - The resource allocation phase is about to begin. No specific\r | |
350 | action is required here. This notification can be used to perform\r | |
351 | any chipset-specific programming.\r | |
352 | EfiPciHostBridgeAllocateResources - Allocates resources per previously submitted requests for all the PCI\r | |
353 | root bridges. These resource settings are returned on the next call to\r | |
354 | GetProposedResources(). Before calling NotifyPhase() with a Phase of\r | |
355 | EfiPciHostBridgeAllocateResource, the PCI bus enumerator is responsible for gathering I/O and memory requests for\r | |
356 | all the PCI root bridges and submitting these requests using\r | |
357 | SubmitResources(). This function pads the resource amount\r | |
358 | to suit the root bridge hardware, takes care of dependencies between\r | |
359 | the PCI root bridges, and calls the Global Coherency Domain (GCD)\r | |
360 | with the allocation request. In the case of padding, the allocated range\r | |
361 | could be bigger than what was requested.\r | |
362 | EfiPciHostBridgeSetResources - Programs the host bridge hardware to decode previously allocated\r | |
363 | resources (proposed resources) for all the PCI root bridges. After the\r | |
364 | hardware is programmed, reassigning resources will not be supported.\r | |
365 | The bus settings are not affected.\r | |
366 | EfiPciHostBridgeFreeResources - Deallocates resources that were previously allocated for all the PCI\r | |
367 | root bridges and resets the I/O and memory apertures to their initial\r | |
368 | state. The bus settings are not affected. If the request to allocate\r | |
369 | resources fails, the PCI enumerator can use this notification to\r | |
370 | deallocate previous resources, adjust the requests, and retry\r | |
371 | allocation.\r | |
372 | EfiPciHostBridgeEndResourceAllocation- The resource allocation phase is completed. No specific action is\r | |
373 | required here. This notification can be used to perform any chipsetspecific\r | |
374 | programming.\r | |
375 | \r | |
97404058 | 376 | @param[in] PciResAlloc The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r |
a3b8e257 | 377 | @param[in] Phase The phase during enumeration\r |
378 | \r | |
379 | @retval EFI_NOT_READY This phase cannot be entered at this time. For example, this error\r | |
380 | is valid for a Phase of EfiPciHostBridgeAllocateResources if\r | |
381 | SubmitResources() has not been called for one or more\r | |
382 | PCI root bridges before this call\r | |
383 | @retval EFI_DEVICE_ERROR Programming failed due to a hardware error. This error is valid\r | |
384 | for a Phase of EfiPciHostBridgeSetResources.\r | |
385 | @retval EFI_INVALID_PARAMETER Invalid phase parameter\r | |
386 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
387 | This error is valid for a Phase of EfiPciHostBridgeAllocateResources if the\r | |
388 | previously submitted resource requests cannot be fulfilled or\r | |
389 | were only partially fulfilled.\r | |
390 | @retval EFI_SUCCESS The notification was accepted without any errors.\r | |
ead42efc | 391 | \r |
bcd70414 | 392 | **/\r |
ead42efc | 393 | EFI_STATUS\r |
394 | NotifyPhase (\r | |
395 | IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc,\r | |
396 | EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase\r | |
ed66e1bc | 397 | );\r |
ead42efc | 398 | \r |
a3b8e257 | 399 | /**\r |
400 | Provides the hooks from the PCI bus driver to every PCI controller (device/function) at various\r | |
401 | stages of the PCI enumeration process that allow the host bridge driver to preinitialize individual\r | |
402 | PCI controllers before enumeration.\r | |
403 | \r | |
404 | This function is called during the PCI enumeration process. No specific action is expected from this\r | |
405 | member function. It allows the host bridge driver to preinitialize individual PCI controllers before\r | |
406 | enumeration.\r | |
407 | \r | |
eeefcb9d | 408 | @param Bridge Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.\r |
409 | @param Bus The bus number of the pci device. \r | |
410 | @param Device The device number of the pci device. \r | |
411 | @param Func The function number of the pci device. \r | |
a3b8e257 | 412 | @param Phase The phase of the PCI device enumeration. \r |
413 | \r | |
414 | @retval EFI_SUCCESS The requested parameters were returned.\r | |
415 | @retval EFI_INVALID_PARAMETER RootBridgeHandle is not a valid root bridge handle.\r | |
416 | @retval EFI_INVALID_PARAMETER Phase is not a valid phase that is defined in\r | |
417 | EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE.\r | |
418 | @retval EFI_DEVICE_ERROR Programming failed due to a hardware error. The PCI enumerator should\r | |
419 | not enumerate this device, including its child devices if it is a PCI-to-PCI\r | |
420 | bridge.\r | |
ead42efc | 421 | \r |
bcd70414 | 422 | **/\r |
ead42efc | 423 | EFI_STATUS\r |
424 | PreprocessController (\r | |
425 | IN PCI_IO_DEVICE *Bridge,\r | |
426 | IN UINT8 Bus,\r | |
427 | IN UINT8 Device,\r | |
428 | IN UINT8 Func,\r | |
429 | IN EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE Phase\r | |
ed66e1bc | 430 | );\r |
ead42efc | 431 | \r |
a3b8e257 | 432 | /**\r |
433 | Hot plug request notify.\r | |
434 | \r | |
435 | @param This - A pointer to the hot plug request protocol.\r | |
436 | @param Operation - The operation.\r | |
437 | @param Controller - A pointer to the controller.\r | |
97404058 | 438 | @param RemainingDevicePath - A pointer to the device path.\r |
a3b8e257 | 439 | @param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.\r |
440 | @param ChildHandleBuffer - A pointer to the array contain the child handle.\r | |
441 | \r | |
97404058 | 442 | @retval EFI_NOT_FOUND Can not find bridge according to controller handle.\r |
443 | @retval EFI_SUCCESS Success operating.\r | |
a3b8e257 | 444 | **/\r |
ead42efc | 445 | EFI_STATUS\r |
446 | EFIAPI\r | |
447 | PciHotPlugRequestNotify (\r | |
448 | IN EFI_PCI_HOTPLUG_REQUEST_PROTOCOL * This,\r | |
449 | IN EFI_PCI_HOTPLUG_OPERATION Operation,\r | |
450 | IN EFI_HANDLE Controller,\r | |
451 | IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL,\r | |
452 | IN OUT UINT8 *NumberOfChildren,\r | |
453 | IN OUT EFI_HANDLE * ChildHandleBuffer\r | |
ed66e1bc | 454 | );\r |
ead42efc | 455 | \r |
a3b8e257 | 456 | /**\r |
457 | Search hostbridge according to given handle\r | |
458 | \r | |
eeefcb9d | 459 | @param RootBridgeHandle - Host bridge handle.\r |
460 | \r | |
461 | @return TRUE Found.\r | |
462 | @return FALSE Not found.\r | |
a3b8e257 | 463 | **/\r |
ead42efc | 464 | BOOLEAN\r |
465 | SearchHostBridgeHandle (\r | |
466 | IN EFI_HANDLE RootBridgeHandle\r | |
ed66e1bc | 467 | );\r |
ead42efc | 468 | \r |
a3b8e257 | 469 | /**\r |
470 | Add host bridge handle to global variable for enumating.\r | |
471 | \r | |
97404058 | 472 | @param HostBridgeHandle host bridge handle.\r |
a3b8e257 | 473 | **/\r |
ead42efc | 474 | EFI_STATUS\r |
475 | AddHostBridgeEnumerator (\r | |
476 | IN EFI_HANDLE HostBridgeHandle\r | |
ed66e1bc | 477 | );\r |
ead42efc | 478 | \r |
479 | #endif\r |