]> git.proxmox.com Git - mirror_edk2.git/blame - QuarkPlatformPkg/Pci/Dxe/PciHostBridge/PciRootBridge.h
QuarkPlatformPkg: Add new package for Galileo boards
[mirror_edk2.git] / QuarkPlatformPkg / Pci / Dxe / PciHostBridge / PciRootBridge.h
CommitLineData
b303605e
MK
1/** @file\r
2The PCI Root Bridge header file.\r
3\r
4Copyright (c) 2013-2015 Intel Corporation.\r
5\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\r
17#ifndef _PCI_ROOT_BRIDGE_H_\r
18#define _PCI_ROOT_BRIDGE_H_\r
19\r
20#include <PiDxe.h>\r
21#include <IndustryStandard/Acpi.h>\r
22#include <IndustryStandard/Pci.h>\r
23#include <PciHostResource.h>\r
24\r
25//\r
26// Driver Consumed Protocol Prototypes\r
27//\r
28#include <Protocol/Metronome.h>\r
29#include <Protocol/CpuIo2.h>\r
30#include <Protocol/DevicePath.h>\r
31#include <Protocol/Runtime.h>\r
32#include <Protocol/PciRootBridgeIo.h>\r
33#include <Library/UefiLib.h>\r
34#include <Library/DebugLib.h>\r
35#include <Library/DevicePathLib.h>\r
36#include <Library/BaseMemoryLib.h>\r
37#include <Library/DxeServicesTableLib.h>\r
38#include <Library/UefiBootServicesTableLib.h>\r
39#include <Library/BaseLib.h>\r
40\r
41\r
42//\r
43// Define the region of memory used for DMA memory\r
44//\r
45#define DMA_MEMORY_TOP 0x0000000001FFFFFFULL\r
46\r
47//\r
48// The number of PCI root bridges\r
49//\r
50#define ROOT_BRIDGE_COUNT 1\r
51\r
52//\r
53// The default latency for controllers\r
54//\r
55#define DEFAULT_PCI_LATENCY 0x20\r
56\r
57//\r
58// Define resource status constant\r
59//\r
60typedef struct {\r
61 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation;\r
62 UINTN NumberOfBytes;\r
63 UINTN NumberOfPages;\r
64 EFI_PHYSICAL_ADDRESS HostAddress;\r
65 EFI_PHYSICAL_ADDRESS MappedHostAddress;\r
66} MAP_INFO;\r
67\r
68typedef struct {\r
69 ACPI_HID_DEVICE_PATH AcpiDevicePath;\r
70 EFI_DEVICE_PATH_PROTOCOL EndDevicePath;\r
71} EFI_PCI_ROOT_BRIDGE_DEVICE_PATH;\r
72\r
73#define PCI_ROOT_BRIDGE_SIGNATURE SIGNATURE_32 ('e', '2', 'p', 'b')\r
74\r
75typedef struct {\r
76 UINT32 Signature;\r
77 EFI_LIST_ENTRY Link;\r
78 EFI_HANDLE Handle;\r
79 UINT64 RootBridgeAllocAttrib;\r
80 UINT64 Attributes;\r
81 UINT64 Supports;\r
82 PCI_RES_NODE ResAllocNode[6];\r
83 PCI_ROOT_BRIDGE_RESOURCE_APERTURE Aperture;\r
84 EFI_LOCK PciLock;\r
85 UINTN PciAddress;\r
86 UINTN PciData;\r
87 UINT32 HecBase;\r
88 UINT32 HecLen;\r
89 UINTN BusScanCount;\r
90 BOOLEAN BusNumberAssigned;\r
91 VOID *ConfigBuffer;\r
92 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
93 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL Io;\r
94} PCI_ROOT_BRIDGE_INSTANCE;\r
95\r
96//\r
97// Driver Instance Data Macros\r
98//\r
99#define DRIVER_INSTANCE_FROM_PCI_ROOT_BRIDGE_IO_THIS(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, Io, PCI_ROOT_BRIDGE_SIGNATURE)\r
100\r
101#define DRIVER_INSTANCE_FROM_LIST_ENTRY(a) CR (a, PCI_ROOT_BRIDGE_INSTANCE, Link, PCI_ROOT_BRIDGE_SIGNATURE)\r
102\r
103EFI_STATUS\r
104SimpleIioRootBridgeConstructor (\r
105 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *Protocol,\r
106 IN EFI_HANDLE HostBridgeHandle,\r
107 IN PCI_ROOT_BRIDGE_RESOURCE_APERTURE *ResAppeture,\r
108 IN UINT64 AllocAttributes\r
109 )\r
110/*++\r
111\r
112Routine Description:\r
113\r
114 Construct the Pci Root Bridge Io protocol.\r
115\r
116Arguments:\r
117\r
118 Protocol - Protocol to initialize.\r
119 HostBridgeHandle - Handle to the HostBridge.\r
120 ResAppeture - Resource apperture of the root bridge.\r
121 AllocAttributes - Attribute of resouce allocated.\r
122\r
123Returns:\r
124\r
125 EFI_SUCCESS - Success.\r
126 Others - Fail.\r
127\r
128--*/\r
129;\r
130\r
131//\r
132// Protocol Member Function Prototypes\r
133//\r
134EFI_STATUS\r
135EFIAPI\r
136RootBridgeIoPollMem (\r
137 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
138 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
139 IN UINT64 Address,\r
140 IN UINT64 Mask,\r
141 IN UINT64 Value,\r
142 IN UINT64 Delay,\r
143 OUT UINT64 *Result\r
144 )\r
145/*++\r
146\r
147Routine Description:\r
148\r
149 Poll an address in memory mapped space until an exit condition is met\r
150 or a timeout occurs.\r
151\r
152Arguments:\r
153\r
154 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
155 Width - Width of the memory operation.\r
156 Address - The base address of the memory operation.\r
157 Mask - Mask used for polling criteria.\r
158 Value - Comparison value used for polling exit criteria.\r
159 Delay - Number of 100ns units to poll.\r
160 Result - Pointer to the last value read from memory location.\r
161\r
162Returns:\r
163\r
164 EFI_SUCCESS - Success.\r
165 EFI_INVALID_PARAMETER - Invalid parameter found.\r
166 EFI_TIMEOUT - Delay expired before a match occurred.\r
167 EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
168\r
169--*/\r
170;\r
171\r
172EFI_STATUS\r
173EFIAPI\r
174RootBridgeIoPollIo (\r
175 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
176 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
177 IN UINT64 Address,\r
178 IN UINT64 Mask,\r
179 IN UINT64 Value,\r
180 IN UINT64 Delay,\r
181 OUT UINT64 *Result\r
182 )\r
183/*++\r
184\r
185Routine Description:\r
186\r
187 Poll an address in I/O space until an exit condition is met\r
188 or a timeout occurs.\r
189\r
190Arguments:\r
191\r
192 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
193 Width - Width of I/O operation.\r
194 Address - The base address of the I/O operation.\r
195 Mask - Mask used for polling criteria.\r
196 Value - Comparison value used for polling exit criteria.\r
197 Delay - Number of 100ns units to poll.\r
198 Result - Pointer to the last value read from memory location.\r
199\r
200Returns:\r
201\r
202 EFI_SUCCESS - Success.\r
203 EFI_INVALID_PARAMETER - Invalid parameter found.\r
204 EFI_TIMEOUT - Delay expired before a match occurred.\r
205 EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
206\r
207--*/\r
208;\r
209\r
210EFI_STATUS\r
211EFIAPI\r
212RootBridgeIoMemRead (\r
213 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
214 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
215 IN UINT64 Address,\r
216 IN UINTN Count,\r
217 IN OUT VOID *Buffer\r
218 )\r
219/*++\r
220\r
221Routine Description:\r
222\r
223 Allow read from memory mapped I/O space.\r
224\r
225Arguments:\r
226\r
227 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
228 Width - The width of memory operation.\r
229 Address - Base address of the memory operation.\r
230 Count - Number of memory opeartion to perform.\r
231 Buffer - The destination buffer to store data.\r
232\r
233Returns:\r
234\r
235 EFI_SUCCESS - Success.\r
236 EFI_INVALID_PARAMETER - Invalid parameter found.\r
237 EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
238\r
239--*/\r
240;\r
241\r
242EFI_STATUS\r
243EFIAPI\r
244RootBridgeIoMemWrite (\r
245 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
246 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
247 IN UINT64 Address,\r
248 IN UINTN Count,\r
249 IN OUT VOID *Buffer\r
250 )\r
251/*++\r
252\r
253Routine Description:\r
254\r
255 Allow write to memory mapped I/O space.\r
256\r
257Arguments:\r
258\r
259 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
260 Width - The width of memory operation.\r
261 Address - Base address of the memory operation.\r
262 Count - Number of memory opeartion to perform.\r
263 Buffer - The source buffer to write data from.\r
264\r
265Returns:\r
266\r
267 EFI_SUCCESS - Success.\r
268 EFI_INVALID_PARAMETER - Invalid parameter found.\r
269 EFI_OUT_OF_RESOURCES - Fail due to lack of resources.\r
270\r
271--*/\r
272;\r
273\r
274EFI_STATUS\r
275EFIAPI\r
276RootBridgeIoIoRead (\r
277 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
278 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
279 IN UINT64 UserAddress,\r
280 IN UINTN Count,\r
281 IN OUT VOID *UserBuffer\r
282 )\r
283/*++\r
284\r
285Routine Description:\r
286\r
287 Enable a PCI driver to read PCI controller registers in the\r
288 PCI root bridge I/O space.\r
289\r
290Arguments:\r
291\r
292 This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
293 Width - Signifies the width of the memory operation.\r
294 UserAddress - The base address of the I/O operation.\r
295 Count - The number of I/O operations to perform.\r
296 UserBuffer - The destination buffer to store the results.\r
297\r
298Returns:\r
299\r
300 EFI_SUCCESS - The data was read from the PCI root bridge.\r
301 EFI_INVALID_PARAMETER - Invalid parameters found.\r
302 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
303 resources.\r
304--*/\r
305;\r
306\r
307EFI_STATUS\r
308EFIAPI\r
309RootBridgeIoIoWrite (\r
310 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
311 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
312 IN UINT64 UserAddress,\r
313 IN UINTN Count,\r
314 IN OUT VOID *UserBuffer\r
315 )\r
316/*++\r
317\r
318Routine Description:\r
319\r
320 Enable a PCI driver to write to PCI controller registers in the\r
321 PCI root bridge I/O space.\r
322\r
323Arguments:\r
324\r
325 This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
326 Width - Signifies the width of the memory operation.\r
327 UserAddress - The base address of the I/O operation.\r
328 Count - The number of I/O operations to perform.\r
329 UserBuffer - The source buffer to write data from.\r
330\r
331Returns:\r
332\r
333 EFI_SUCCESS - The data was written to the PCI root bridge.\r
334 EFI_INVALID_PARAMETER - Invalid parameters found.\r
335 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
336 resources.\r
337--*/\r
338;\r
339\r
340EFI_STATUS\r
341EFIAPI\r
342RootBridgeIoCopyMem (\r
343 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
344 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
345 IN UINT64 DestAddress,\r
346 IN UINT64 SrcAddress,\r
347 IN UINTN Count\r
348 )\r
349/*++\r
350\r
351Routine Description:\r
352\r
353 Copy one region of PCI root bridge memory space to be copied to\r
354 another region of PCI root bridge memory space.\r
355\r
356Arguments:\r
357\r
358 This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
359 Width - Signifies the width of the memory operation.\r
360 DestAddress - Destination address of the memory operation.\r
361 SrcAddress - Source address of the memory operation.\r
362 Count - Number of memory operations to perform.\r
363\r
364Returns:\r
365\r
366 EFI_SUCCESS - The data was copied successfully.\r
367 EFI_INVALID_PARAMETER - Invalid parameters found.\r
368 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
369 resources.\r
370--*/\r
371;\r
372\r
373EFI_STATUS\r
374EFIAPI\r
375RootBridgeIoPciRead (\r
376 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
377 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
378 IN UINT64 Address,\r
379 IN UINTN Count,\r
380 IN OUT VOID *Buffer\r
381 )\r
382/*++\r
383\r
384Routine Description:\r
385\r
386 Allows read from PCI configuration space.\r
387\r
388Arguments:\r
389\r
390 This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
391 Width - Signifies the width of the memory operation.\r
392 Address - The address within the PCI configuration space\r
393 for the PCI controller.\r
394 Count - The number of PCI configuration operations\r
395 to perform.\r
396 Buffer - The destination buffer to store the results.\r
397\r
398Returns:\r
399\r
400 EFI_SUCCESS - The data was read from the PCI root bridge.\r
401 EFI_INVALID_PARAMETER - Invalid parameters found.\r
402 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
403 resources.\r
404--*/\r
405;\r
406\r
407EFI_STATUS\r
408EFIAPI\r
409RootBridgeIoPciWrite (\r
410 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
411 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
412 IN UINT64 Address,\r
413 IN UINTN Count,\r
414 IN OUT VOID *Buffer\r
415 )\r
416/*++\r
417\r
418Routine Description:\r
419\r
420 Allows write to PCI configuration space.\r
421\r
422Arguments:\r
423\r
424 This - A pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
425 Width - Signifies the width of the memory operation.\r
426 Address - The address within the PCI configuration space\r
427 for the PCI controller.\r
428 Count - The number of PCI configuration operations\r
429 to perform.\r
430 Buffer - The source buffer to get the results.\r
431\r
432Returns:\r
433\r
434 EFI_SUCCESS - The data was written to the PCI root bridge.\r
435 EFI_INVALID_PARAMETER - Invalid parameters found.\r
436 EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of\r
437 resources.\r
438--*/\r
439;\r
440\r
441EFI_STATUS\r
442EFIAPI\r
443RootBridgeIoMap (\r
444 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
445 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION Operation,\r
446 IN VOID *HostAddress,\r
447 IN OUT UINTN *NumberOfBytes,\r
448 OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,\r
449 OUT VOID **Mapping\r
450 )\r
451/*++\r
452\r
453Routine Description:\r
454\r
455 Provides the PCI controller-specific address needed to access\r
456 system memory for DMA.\r
457\r
458Arguments:\r
459\r
460 This - A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
461 Operation - Indicate if the bus master is going to read or write\r
462 to system memory.\r
463 HostAddress - The system memory address to map on the PCI controller.\r
464 NumberOfBytes - On input the number of bytes to map.\r
465 On output the number of bytes that were mapped.\r
466 DeviceAddress - The resulting map address for the bus master PCI\r
467 controller to use to access the system memory's HostAddress.\r
468 Mapping - The value to pass to Unmap() when the bus master DMA\r
469 operation is complete.\r
470\r
471Returns:\r
472\r
473 EFI_SUCCESS - Success.\r
474 EFI_INVALID_PARAMETER - Invalid parameters found.\r
475 EFI_UNSUPPORTED - The HostAddress cannot be mapped as a common\r
476 buffer.\r
477 EFI_DEVICE_ERROR - The System hardware could not map the requested\r
478 address.\r
479 EFI_OUT_OF_RESOURCES - The request could not be completed due to\r
480 lack of resources.\r
481\r
482--*/\r
483;\r
484\r
485EFI_STATUS\r
486EFIAPI\r
487RootBridgeIoUnmap (\r
488 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
489 IN VOID *Mapping\r
490 )\r
491/*++\r
492\r
493Routine Description:\r
494\r
495 Completes the Map() operation and releases any corresponding resources.\r
496\r
497Arguments:\r
498\r
499 This - Pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
500 Mapping - The value returned from Map() operation.\r
501\r
502Returns:\r
503\r
504 EFI_SUCCESS - The range was unmapped successfully.\r
505 EFI_INVALID_PARAMETER - Mapping is not a value that was returned\r
506 by Map operation.\r
507 EFI_DEVICE_ERROR - The data was not committed to the target\r
508 system memory.\r
509\r
510--*/\r
511;\r
512\r
513EFI_STATUS\r
514EFIAPI\r
515RootBridgeIoAllocateBuffer (\r
516 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
517 IN EFI_ALLOCATE_TYPE Type,\r
518 IN EFI_MEMORY_TYPE MemoryType,\r
519 IN UINTN Pages,\r
520 OUT VOID **HostAddress,\r
521 IN UINT64 Attributes\r
522 )\r
523/*++\r
524\r
525Routine Description:\r
526\r
527 Allocates pages that are suitable for a common buffer mapping.\r
528\r
529Arguments:\r
530\r
531 This - Pointer to EFI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
532 Type - Not used and can be ignored.\r
533 MemoryType - Type of memory to allocate.\r
534 Pages - Number of pages to allocate.\r
535 HostAddress - Pointer to store the base system memory address\r
536 of the allocated range.\r
537 Attributes - Requested bit mask of attributes of the allocated\r
538 range.\r
539\r
540Returns:\r
541\r
542 EFI_SUCCESS - The requested memory range were allocated.\r
543 EFI_INVALID_PARAMETER - Invalid parameter found.\r
544 EFI_UNSUPPORTED - Attributes is unsupported.\r
545\r
546--*/\r
547;\r
548\r
549EFI_STATUS\r
550EFIAPI\r
551RootBridgeIoFreeBuffer (\r
552 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
553 IN UINTN Pages,\r
554 OUT VOID *HostAddress\r
555 )\r
556/*++\r
557\r
558Routine Description:\r
559\r
560 Free memory allocated in AllocateBuffer.\r
561\r
562Arguments:\r
563\r
564 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
565 instance.\r
566 Pages - Number of pages to free.\r
567 HostAddress - The base system memory address of the\r
568 allocated range.\r
569\r
570Returns:\r
571\r
572 EFI_SUCCESS - Requested memory pages were freed.\r
573 EFI_INVALID_PARAMETER - Invalid parameter found.\r
574\r
575--*/\r
576;\r
577\r
578EFI_STATUS\r
579EFIAPI\r
580RootBridgeIoFlush (\r
581 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This\r
582 )\r
583/*++\r
584\r
585Routine Description:\r
586\r
587 Flushes all PCI posted write transactions from a PCI host\r
588 bridge to system memory.\r
589\r
590Arguments:\r
591\r
592 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
593\r
594Returns:\r
595\r
596 EFI_SUCCESS - PCI posted write transactions were flushed\r
597 from PCI host bridge to system memory.\r
598 EFI_DEVICE_ERROR - Fail due to hardware error.\r
599\r
600--*/\r
601;\r
602\r
603EFI_STATUS\r
604EFIAPI\r
605RootBridgeIoGetAttributes (\r
606 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
607 OUT UINT64 *Supported,\r
608 OUT UINT64 *Attributes\r
609 )\r
610/*++\r
611\r
612Routine Description:\r
613\r
614 Get the attributes that a PCI root bridge supports and\r
615 the attributes the PCI root bridge is currently using.\r
616\r
617Arguments:\r
618\r
619 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
620 instance.\r
621 Supports - A pointer to the mask of attributes that\r
622 this PCI root bridge supports.\r
623 Attributes - A pointer to the mask of attributes that\r
624 this PCI root bridge is currently using.\r
625Returns:\r
626\r
627 EFI_SUCCESS - Success.\r
628 EFI_INVALID_PARAMETER - Invalid parameter found.\r
629\r
630--*/\r
631\r
632// GC_TODO: Supported - add argument and description to function comment\r
633//\r
634// GC_TODO: Supported - add argument and description to function comment\r
635//\r
636// GC_TODO: Supported - add argument and description to function comment\r
637//\r
638;\r
639\r
640EFI_STATUS\r
641EFIAPI\r
642RootBridgeIoSetAttributes (\r
643 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
644 IN UINT64 Attributes,\r
645 IN OUT UINT64 *ResourceBase,\r
646 IN OUT UINT64 *ResourceLength\r
647 )\r
648/*++\r
649\r
650Routine Description:\r
651\r
652 Sets the attributes for a resource range on a PCI root bridge.\r
653\r
654Arguments:\r
655\r
656 This - Pointer to EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
657 Attributes - The mask of attributes to set.\r
658 ResourceBase - Pointer to the base address of the resource range\r
659 to be modified by the attributes specified by Attributes.\r
660 ResourceLength - Pointer to the length of the resource range to be modified.\r
661\r
662Returns:\r
663 EFI_SUCCESS - Success.\r
664 EFI_INVALID_PARAMETER - Invalid parameter found.\r
665 EFI_OUT_OF_RESOURCES - Not enough resources to set the attributes upon.\r
666\r
667--*/\r
668;\r
669\r
670EFI_STATUS\r
671EFIAPI\r
672RootBridgeIoConfiguration (\r
673 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *This,\r
674 OUT VOID **Resources\r
675 )\r
676/*++\r
677\r
678Routine Description:\r
679\r
680 Retrieves the current resource settings of this PCI root bridge\r
681 in the form of a set of ACPI 2.0 resource descriptor.\r
682\r
683Arguments:\r
684\r
685 This - Pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
686 Resources - Pointer to the ACPI 2.0 resource descriptor that\r
687 describe the current configuration of this PCI root\r
688 bridge.\r
689\r
690Returns:\r
691\r
692 EFI_SUCCESS - Success.\r
693 EFI_UNSUPPORTED - Current configuration of the PCI root bridge\r
694 could not be retrieved.\r
695\r
696--*/\r
697;\r
698\r
699#endif\r