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