]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridge.h
MdeModulePkg: PciHostBridgeDxe: insert horizontal whitespace
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciHostBridgeDxe / PciRootBridge.h
CommitLineData
4a50cf4e
RN
1/** @file\r
2\r
3 The PCI Root Bridge header file.\r
4\r
5Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _PCI_ROOT_BRIDGE_H_\r
17#define _PCI_ROOT_BRIDGE_H_\r
18\r
19#include <PiDxe.h>\r
20#include <IndustryStandard/Acpi.h>\r
21#include <IndustryStandard/Pci.h>\r
22\r
23//\r
24// Driver Consumed Protocol Prototypes\r
25//\r
26#include <Protocol/Metronome.h>\r
27#include <Protocol/CpuIo2.h>\r
28#include <Protocol/DevicePath.h>\r
29#include <Protocol/PciRootBridgeIo.h>\r
30#include <Library/DebugLib.h>\r
31#include <Library/DevicePathLib.h>\r
32#include <Library/BaseMemoryLib.h>\r
33#include <Library/DxeServicesTableLib.h>\r
34#include <Library/UefiBootServicesTableLib.h>\r
35#include <Library/BaseLib.h>\r
36#include <Library/PciSegmentLib.h>\r
37#include "PciHostResource.h"\r
38\r
39\r
40typedef enum {\r
41 IoOperation,\r
42 MemOperation,\r
43 PciOperation\r
44} OPERATION_TYPE;\r
45\r
46#define MAP_INFO_SIGNATURE SIGNATURE_32 ('_', 'm', 'a', 'p')\r
47typedef struct {\r
48 UINT32 Signature;\r
49 LIST_ENTRY Link;\r
50 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation;\r
51 UINTN NumberOfBytes;\r
52 UINTN NumberOfPages;\r
53 EFI_PHYSICAL_ADDRESS HostAddress;\r
54 EFI_PHYSICAL_ADDRESS MappedHostAddress;\r
55} MAP_INFO;\r
56#define MAP_INFO_FROM_LINK(a) CR (a, MAP_INFO, Link, MAP_INFO_SIGNATURE)\r
57\r
58#define PCI_ROOT_BRIDGE_SIGNATURE SIGNATURE_32 ('_', 'p', 'r', 'b')\r
59\r
60typedef struct {\r
61 UINT32 Signature;\r
62 LIST_ENTRY Link;\r
63 EFI_HANDLE Handle;\r
64 UINT64 AllocationAttributes;\r
65 UINT64 Attributes;\r
66 UINT64 Supports;\r
67 PCI_RES_NODE ResAllocNode[TypeMax];\r
68 PCI_ROOT_BRIDGE_APERTURE Bus;\r
69 PCI_ROOT_BRIDGE_APERTURE Io;\r
70 PCI_ROOT_BRIDGE_APERTURE Mem;\r
71 PCI_ROOT_BRIDGE_APERTURE PMem;\r
72 PCI_ROOT_BRIDGE_APERTURE MemAbove4G;\r
73 PCI_ROOT_BRIDGE_APERTURE PMemAbove4G;\r
74 BOOLEAN DmaAbove4G;\r
75 VOID *ConfigBuffer;\r
76 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
77 CHAR16 *DevicePathStr;\r
78 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL RootBridgeIo;\r
79\r
80 BOOLEAN ResourceSubmitted;\r
81 LIST_ENTRY Maps;\r
82} PCI_ROOT_BRIDGE_INSTANCE;\r
83\r
84#define ROOT_BRIDGE_FROM_THIS(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, RootBridgeIo, PCI_ROOT_BRIDGE_SIGNATURE)\r
85\r
86#define ROOT_BRIDGE_FROM_LINK(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, Link, PCI_ROOT_BRIDGE_SIGNATURE)\r
87\r
88/**\r
63b90643 89 Construct the Pci Root Bridge instance.\r
4a50cf4e 90\r
63b90643
RN
91 @param Bridge The root bridge instance.\r
92 @param HostBridgeHandle Handle to the HostBridge.\r
4a50cf4e 93\r
63b90643
RN
94 @return The pointer to PCI_ROOT_BRIDGE_INSTANCE just created\r
95 or NULL if creation fails.\r
4a50cf4e
RN
96**/\r
97PCI_ROOT_BRIDGE_INSTANCE *\r
98CreateRootBridge (\r
99 IN PCI_ROOT_BRIDGE *Bridge,\r
100 IN EFI_HANDLE HostBridgeHandle\r
101 );\r
102\r
103//\r
104// Protocol Member Function Prototypes\r
105//\r
106/**\r
107\r
108 Poll an address in memory mapped space until an exit condition is met\r
109 or a timeout occurs.\r
110\r
111 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
112 @param Width - Width of the memory operation.\r
113 @param Address - The base address of the memory operation.\r
114 @param Mask - Mask used for polling criteria.\r
115 @param Value - Comparison value used for polling exit criteria.\r
116 @param Delay - Number of 100ns units to poll.\r
117 @param Result - Pointer to the last value read from memory location.\r
118\r
119 @retval EFI_SUCCESS - Success.\r
120 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
121 @retval EFI_TIMEOUT - Delay expired before a match occurred.\r
122 @retval EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
123\r
124**/\r
125EFI_STATUS\r
126EFIAPI\r
127RootBridgeIoPollMem (\r
128 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
129 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
130 IN UINT64 Address,\r
131 IN UINT64 Mask,\r
132 IN UINT64 Value,\r
133 IN UINT64 Delay,\r
134 OUT UINT64 *Result\r
135 )\r
136;\r
137\r
138/**\r
139\r
140 Poll an address in I/O space until an exit condition is met\r
141 or a timeout occurs.\r
142\r
143 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
144 @param Width - Width of I/O operation.\r
145 @param Address - The base address of the I/O operation.\r
146 @param Mask - Mask used for polling criteria.\r
147 @param Value - Comparison value used for polling exit criteria.\r
148 @param Delay - Number of 100ns units to poll.\r
149 @param Result - Pointer to the last value read from memory location.\r
150\r
151 @retval EFI_SUCCESS - Success.\r
152 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
153 @retval EFI_TIMEOUT - Delay expired before a match occurred.\r
154 @retval EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
155\r
156**/\r
157EFI_STATUS\r
158EFIAPI\r
159RootBridgeIoPollIo (\r
160 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
161 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
162 IN UINT64 Address,\r
163 IN UINT64 Mask,\r
164 IN UINT64 Value,\r
165 IN UINT64 Delay,\r
166 OUT UINT64 *Result\r
167 )\r
168;\r
169\r
170/**\r
171\r
172 Allow read from memory mapped I/O space.\r
173\r
174 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
175 @param Width - The width of memory operation.\r
176 @param Address - Base address of the memory operation.\r
177 @param Count - Number of memory opeartion to perform.\r
178 @param Buffer - The destination buffer to store data.\r
179\r
180 @retval EFI_SUCCESS - Success.\r
181 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
182 @retval EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
183\r
184**/\r
185EFI_STATUS\r
186EFIAPI\r
187RootBridgeIoMemRead (\r
188 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
189 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
190 IN UINT64 Address,\r
191 IN UINTN Count,\r
192 IN OUT VOID *Buffer\r
193 )\r
194;\r
195\r
196/**\r
197\r
198 Allow write to memory mapped I/O space.\r
199\r
200 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
201 @param Width - The width of memory operation.\r
202 @param Address - Base address of the memory operation.\r
203 @param Count - Number of memory opeartion to perform.\r
204 @param Buffer - The source buffer to write data from.\r
205\r
206 @retval EFI_SUCCESS - Success.\r
207 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
208 @retval EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
209\r
210**/\r
211EFI_STATUS\r
212EFIAPI\r
213RootBridgeIoMemWrite (\r
214 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
215 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
216 IN UINT64 Address,\r
217 IN UINTN Count,\r
218 IN OUT VOID *Buffer\r
219 )\r
220;\r
221\r
222/**\r
223\r
224 Enable a PCI driver to read PCI controller registers in the\r
225 PCI root bridge I/O space.\r
226\r
227 @param This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
228 @param Width - Signifies the width of the memory operation.\r
229 @param UserAddress - The base address of the I/O operation.\r
230 @param Count - The number of I/O operations to perform.\r
231 @param UserBuffer - The destination buffer to store the results.\r
232\r
233 @retval EFI_SUCCESS - The data was read from the PCI root bridge.\r
234 @retval EFI_INVALID_PARAMETER - Invalid parameters found.\r
235 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
236 @retval resources.\r
237**/\r
238EFI_STATUS\r
239EFIAPI\r
240RootBridgeIoIoRead (\r
241 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
242 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
243 IN UINT64 UserAddress,\r
244 IN UINTN Count,\r
245 IN OUT VOID *UserBuffer\r
246 )\r
247;\r
248\r
249/**\r
250\r
251 Enable a PCI driver to write to PCI controller registers in the\r
252 PCI root bridge I/O space.\r
253\r
254 @param This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
255 @param Width - Signifies the width of the memory operation.\r
256 @param UserAddress - The base address of the I/O operation.\r
257 @param Count - The number of I/O operations to perform.\r
258 @param UserBuffer - The source buffer to write data from.\r
259\r
260 @retval EFI_SUCCESS - The data was written to the PCI root bridge.\r
261 @retval EFI_INVALID_PARAMETER - Invalid parameters found.\r
262 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
263 @retval resources.\r
264**/\r
265EFI_STATUS\r
266EFIAPI\r
267RootBridgeIoIoWrite (\r
268 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
269 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
270 IN UINT64 UserAddress,\r
271 IN UINTN Count,\r
272 IN OUT VOID *UserBuffer\r
273 )\r
274;\r
275\r
276/**\r
277\r
278 Copy one region of PCI root bridge memory space to be copied to\r
279 another region of PCI root bridge memory space.\r
280\r
281 @param This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
282 @param Width - Signifies the width of the memory operation.\r
283 @param DestAddress - Destination address of the memory operation.\r
284 @param SrcAddress - Source address of the memory operation.\r
285 @param Count - Number of memory operations to perform.\r
286\r
287 @retval EFI_SUCCESS - The data was copied successfully.\r
288 @retval EFI_INVALID_PARAMETER - Invalid parameters found.\r
289 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
290 @retval resources.\r
291**/\r
292EFI_STATUS\r
293EFIAPI\r
294RootBridgeIoCopyMem (\r
295 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
296 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
297 IN UINT64 DestAddress,\r
298 IN UINT64 SrcAddress,\r
299 IN UINTN Count\r
300 )\r
301;\r
302\r
303/**\r
304\r
305 Allows read from PCI configuration space.\r
306\r
307 @param This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
308 @param Width - Signifies the width of the memory operation.\r
309 @param Address - The address within the PCI configuration space\r
310 for the PCI controller.\r
311 @param Count - The number of PCI configuration operations\r
312 to perform.\r
313 @param Buffer - The destination buffer to store the results.\r
314\r
315 @retval EFI_SUCCESS - The data was read from the PCI root bridge.\r
316 @retval EFI_INVALID_PARAMETER - Invalid parameters found.\r
317 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
318 @retval resources.\r
319**/\r
320EFI_STATUS\r
321EFIAPI\r
322RootBridgeIoPciRead (\r
323 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
324 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
325 IN UINT64 Address,\r
326 IN UINTN Count,\r
327 IN OUT VOID *Buffer\r
328 )\r
329;\r
330\r
331/**\r
332\r
333 Allows write to PCI configuration space.\r
334\r
335 @param This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
336 @param Width - Signifies the width of the memory operation.\r
337 @param Address - The address within the PCI configuration space\r
338 for the PCI controller.\r
339 @param Count - The number of PCI configuration operations\r
340 to perform.\r
341 @param Buffer - The source buffer to get the results.\r
342\r
343 @retval EFI_SUCCESS - The data was written to the PCI root bridge.\r
344 @retval EFI_INVALID_PARAMETER - Invalid parameters found.\r
345 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
346 @retval resources.\r
347**/\r
348EFI_STATUS\r
349EFIAPI\r
350RootBridgeIoPciWrite (\r
351 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
352 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
353 IN UINT64 Address,\r
354 IN UINTN Count,\r
355 IN OUT VOID *Buffer\r
356 )\r
357;\r
358\r
359/**\r
4a50cf4e
RN
360 Provides the PCI controller-specific address needed to access\r
361 system memory for DMA.\r
362\r
63b90643
RN
363 @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
364 @param Operation Indicate if the bus master is going to read or write\r
365 to system memory.\r
366 @param HostAddress The system memory address to map on the PCI controller.\r
367 @param NumberOfBytes On input the number of bytes to map.\r
368 On output the number of bytes that were mapped.\r
369 @param DeviceAddress The resulting map address for the bus master PCI\r
370 controller to use to access the system memory's HostAddress.\r
371 @param Mapping The value to pass to Unmap() when the bus master DMA\r
372 operation is complete.\r
373\r
374 @retval EFI_SUCCESS Success.\r
375 @retval EFI_INVALID_PARAMETER Invalid parameters found.\r
376 @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer.\r
377 @retval EFI_DEVICE_ERROR The System hardware could not map the requested address.\r
378 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to lack of resources.\r
4a50cf4e
RN
379**/\r
380EFI_STATUS\r
381EFIAPI\r
382RootBridgeIoMap (\r
383 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
384 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation,\r
385 IN VOID *HostAddress,\r
386 IN OUT UINTN *NumberOfBytes,\r
387 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,\r
388 OUT VOID **Mapping\r
389 )\r
390;\r
391\r
392/**\r
4a50cf4e
RN
393 Completes the Map() operation and releases any corresponding resources.\r
394\r
63b90643
RN
395 The Unmap() function completes the Map() operation and releases any\r
396 corresponding resources.\r
397 If the operation was an EfiPciOperationBusMasterWrite or\r
398 EfiPciOperationBusMasterWrite64, the data is committed to the target system\r
399 memory.\r
400 Any resources used for the mapping are freed.\r
4a50cf4e 401\r
63b90643
RN
402 @param[in] This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
403 @param[in] Mapping The mapping value returned from Map().\r
4a50cf4e 404\r
63b90643
RN
405 @retval EFI_SUCCESS The range was unmapped.\r
406 @retval EFI_INVALID_PARAMETER Mapping is not a value that was returned by Map().\r
407 @retval EFI_DEVICE_ERROR The data was not committed to the target system memory.\r
4a50cf4e
RN
408**/\r
409EFI_STATUS\r
410EFIAPI\r
411RootBridgeIoUnmap (\r
412 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
413 IN VOID *Mapping\r
414 )\r
415;\r
416\r
417/**\r
63b90643
RN
418 Allocates pages that are suitable for an EfiPciOperationBusMasterCommonBuffer\r
419 or EfiPciOperationBusMasterCommonBuffer64 mapping.\r
420\r
421 @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
422 @param Type This parameter is not used and must be ignored.\r
423 @param MemoryType The type of memory to allocate, EfiBootServicesData or\r
424 EfiRuntimeServicesData.\r
425 @param Pages The number of pages to allocate.\r
426 @param HostAddress A pointer to store the base system memory address of the\r
427 allocated range.\r
428 @param Attributes The requested bit mask of attributes for the allocated\r
429 range. Only the attributes\r
430 EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE,\r
431 EFI_PCI_ATTRIBUTE_MEMORY_CACHED, and\r
432 EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE may be used with this\r
433 function.\r
434\r
435 @retval EFI_SUCCESS The requested memory pages were allocated.\r
436 @retval EFI_INVALID_PARAMETER MemoryType is invalid.\r
437 @retval EFI_INVALID_PARAMETER HostAddress is NULL.\r
438 @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal\r
439 attribute bits are MEMORY_WRITE_COMBINE,\r
440 MEMORY_CACHED, and DUAL_ADDRESS_CYCLE.\r
441 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.\r
4a50cf4e
RN
442**/\r
443EFI_STATUS\r
444EFIAPI\r
445RootBridgeIoAllocateBuffer (\r
446 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
447 IN EFI_ALLOCATE_TYPE Type,\r
448 IN EFI_MEMORY_TYPE MemoryType,\r
449 IN UINTN Pages,\r
450 OUT VOID **HostAddress,\r
451 IN UINT64 Attributes\r
452 )\r
453;\r
454\r
455/**\r
456\r
457 Free memory allocated in AllocateBuffer.\r
458\r
459 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
460 instance.\r
461 @param Pages - Number of pages to free.\r
462 @param HostAddress - The base system memory address of the\r
463 allocated range.\r
464\r
465 @retval EFI_SUCCESS - Requested memory pages were freed.\r
466 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
467\r
468**/\r
469EFI_STATUS\r
470EFIAPI\r
471RootBridgeIoFreeBuffer (\r
472 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
473 IN UINTN Pages,\r
474 OUT VOID *HostAddress\r
475 )\r
476;\r
477\r
478/**\r
479\r
480 Flushes all PCI posted write transactions from a PCI host\r
481 bridge to system memory.\r
482\r
483 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
484\r
485 @retval EFI_SUCCESS - PCI posted write transactions were flushed\r
486 @retval from PCI host bridge to system memory.\r
487 @retval EFI_DEVICE_ERROR - Fail due to hardware error.\r
488\r
489**/\r
490EFI_STATUS\r
491EFIAPI\r
492RootBridgeIoFlush (\r
493 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This\r
494 )\r
495;\r
496\r
497/**\r
63b90643
RN
498 Gets the attributes that a PCI root bridge supports setting with\r
499 SetAttributes(), and the attributes that a PCI root bridge is currently\r
500 using.\r
501\r
502 The GetAttributes() function returns the mask of attributes that this PCI\r
503 root bridge supports and the mask of attributes that the PCI root bridge is\r
504 currently using.\r
505\r
506 @param This A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
507 @param Supported A pointer to the mask of attributes that this PCI root\r
508 bridge supports setting with SetAttributes().\r
509 @param Attributes A pointer to the mask of attributes that this PCI root\r
510 bridge is currently using.\r
511\r
512 @retval EFI_SUCCESS If Supports is not NULL, then the attributes\r
513 that the PCI root bridge supports is returned\r
514 in Supports. If Attributes is not NULL, then\r
515 the attributes that the PCI root bridge is\r
516 currently using is returned in Attributes.\r
517 @retval EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.\r
4a50cf4e
RN
518**/\r
519EFI_STATUS\r
520EFIAPI\r
521RootBridgeIoGetAttributes (\r
522 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
523 OUT UINT64 *Supported,\r
524 OUT UINT64 *Attributes\r
525 )\r
526;\r
527\r
528/**\r
529\r
530 Sets the attributes for a resource range on a PCI root bridge.\r
531\r
532 @param This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
533 @param Attributes - The mask of attributes to set.\r
534 @param ResourceBase - Pointer to the base address of the resource range\r
535 to be modified by the attributes specified by Attributes.\r
536 @param ResourceLength - Pointer to the length of the resource range to be modified.\r
537\r
538 @retval EFI_SUCCESS - Success.\r
539 @retval EFI_INVALID_PARAMETER - Invalid parameter found.\r
540 @retval EFI_OUT_OF_RESOURCES - Not enough resources to set the attributes upon.\r
541\r
542**/\r
543EFI_STATUS\r
544EFIAPI\r
545RootBridgeIoSetAttributes (\r
546 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
547 IN UINT64 Attributes,\r
548 IN OUT UINT64 *ResourceBase,\r
549 IN OUT UINT64 *ResourceLength\r
550 )\r
551;\r
552\r
553/**\r
554\r
555 Retrieves the current resource settings of this PCI root bridge\r
556 in the form of a set of ACPI 2.0 resource descriptor.\r
557\r
558 @param This - Pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
559 @param Resources - Pointer to the ACPI 2.0 resource descriptor that\r
560 describe the current configuration of this PCI root\r
561 bridge.\r
562\r
563 @retval EFI_SUCCESS - Success.\r
564 @retval EFI_UNSUPPORTED - Current configuration of the PCI root bridge\r
565 @retval could not be retrieved.\r
566\r
567**/\r
568EFI_STATUS\r
569EFIAPI\r
570RootBridgeIoConfiguration (\r
571 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
572 OUT VOID **Resources\r
573 )\r
574;\r
575\r
576\r
577extern EFI_METRONOME_ARCH_PROTOCOL *mMetronome;\r
578extern EFI_CPU_IO2_PROTOCOL *mCpuIo;\r
579#endif\r