]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Library/EdkIIGluePciLib.h
3 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 Public header file for Pci Lib
23 #ifndef __EDKII_GLUE_PCI_LIB_H__
24 #define __EDKII_GLUE_PCI_LIB_H__
27 Macro that converts PCI Bus, PCI Device, PCI Function and PCI Register to an
28 address that can be passed to the PCI Library functions.
30 @param Bus PCI Bus number. Range 0..255.
31 @param Device PCI Device number. Range 0..31.
32 @param Function PCI Function number. Range 0..7.
33 @param Register PCI Register number. Range 0..255 for PCI. Range 0..4095
36 @return The encoded PCI address.
39 #define PCI_LIB_ADDRESS(Bus,Device,Function,Offset) \
40 (((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20))
43 Reads an 8-bit PCI configuration register.
45 Reads and returns the 8-bit PCI configuration register specified by Address.
46 This function must guarantee that all PCI read and write operations are
49 If Address > 0x0FFFFFFF, then ASSERT().
51 @param Address Address that encodes the PCI Bus, Device, Function and
54 @return The read value from the PCI configuration register.
64 Writes an 8-bit PCI configuration register.
66 Writes the 8-bit PCI configuration register specified by Address with the
67 value specified by Value. Value is returned. This function must guarantee
68 that all PCI read and write operations are serialized.
70 If Address > 0x0FFFFFFF, then ASSERT().
72 @param Address Address that encodes the PCI Bus, Device, Function and
74 @param Value The value to write.
76 @return The value written to the PCI configuration register.
87 Performs a bitwise inclusive OR of an 8-bit PCI configuration register with
90 Reads the 8-bit PCI configuration register specified by Address, performs a
91 bitwise inclusive OR between the read result and the value specified by
92 OrData, and writes the result to the 8-bit PCI configuration register
93 specified by Address. The value written to the PCI configuration register is
94 returned. This function must guarantee that all PCI read and write operations
97 If Address > 0x0FFFFFFF, then ASSERT().
99 @param Address Address that encodes the PCI Bus, Device, Function and
101 @param OrData The value to OR with the PCI configuration register.
103 @return The value written back to the PCI configuration register.
114 Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit
117 Reads the 8-bit PCI configuration register specified by Address, performs a
118 bitwise AND between the read result and the value specified by AndData, and
119 writes the result to the 8-bit PCI configuration register specified by
120 Address. The value written to the PCI configuration register is returned.
121 This function must guarantee that all PCI read and write operations are
124 If Address > 0x0FFFFFFF, then ASSERT().
126 @param Address Address that encodes the PCI Bus, Device, Function and
128 @param AndData The value to AND with the PCI configuration register.
130 @return The value written back to the PCI configuration register.
141 Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit
142 value, followed a bitwise inclusive OR with another 8-bit value.
144 Reads the 8-bit PCI configuration register specified by Address, performs a
145 bitwise AND between the read result and the value specified by AndData,
146 performs a bitwise inclusive OR between the result of the AND operation and
147 the value specified by OrData, and writes the result to the 8-bit PCI
148 configuration register specified by Address. The value written to the PCI
149 configuration register is returned. This function must guarantee that all PCI
150 read and write operations are serialized.
152 If Address > 0x0FFFFFFF, then ASSERT().
154 @param Address Address that encodes the PCI Bus, Device, Function and
156 @param AndData The value to AND with the PCI configuration register.
157 @param OrData The value to OR with the result of the AND operation.
159 @return The value written back to the PCI configuration register.
171 Reads a bit field of a PCI configuration register.
173 Reads the bit field in an 8-bit PCI configuration register. The bit field is
174 specified by the StartBit and the EndBit. The value of the bit field is
177 If Address > 0x0FFFFFFF, then ASSERT().
178 If StartBit is greater than 7, then ASSERT().
179 If EndBit is greater than 7, then ASSERT().
180 If EndBit is less than StartBit, then ASSERT().
182 @param Address PCI configuration register to read.
183 @param StartBit The ordinal of the least significant bit in the bit field.
185 @param EndBit The ordinal of the most significant bit in the bit field.
188 @return The value of the bit field read from the PCI configuration register.
200 Writes a bit field to a PCI configuration register.
202 Writes Value to the bit field of the PCI configuration register. The bit
203 field is specified by the StartBit and the EndBit. All other bits in the
204 destination PCI configuration register are preserved. The new value of the
205 8-bit register is returned.
207 If Address > 0x0FFFFFFF, then ASSERT().
208 If StartBit is greater than 7, then ASSERT().
209 If EndBit is greater than 7, then ASSERT().
210 If EndBit is less than StartBit, then ASSERT().
212 @param Address PCI configuration register to write.
213 @param StartBit The ordinal of the least significant bit in the bit field.
215 @param EndBit The ordinal of the most significant bit in the bit field.
217 @param Value New value of the bit field.
219 @return The value written back to the PCI configuration register.
232 Reads a bit field in an 8-bit PCI configuration, performs a bitwise OR, and
233 writes the result back to the bit field in the 8-bit port.
235 Reads the 8-bit PCI configuration register specified by Address, performs a
236 bitwise inclusive OR between the read result and the value specified by
237 OrData, and writes the result to the 8-bit PCI configuration register
238 specified by Address. The value written to the PCI configuration register is
239 returned. This function must guarantee that all PCI read and write operations
240 are serialized. Extra left bits in OrData are stripped.
242 If Address > 0x0FFFFFFF, then ASSERT().
243 If StartBit is greater than 7, then ASSERT().
244 If EndBit is greater than 7, then ASSERT().
245 If EndBit is less than StartBit, then ASSERT().
247 @param Address PCI configuration register to write.
248 @param StartBit The ordinal of the least significant bit in the bit field.
250 @param EndBit The ordinal of the most significant bit in the bit field.
252 @param OrData The value to OR with the PCI configuration register.
254 @return The value written back to the PCI configuration register.
267 Reads a bit field in an 8-bit PCI configuration register, performs a bitwise
268 AND, and writes the result back to the bit field in the 8-bit register.
270 Reads the 8-bit PCI configuration register specified by Address, performs a
271 bitwise AND between the read result and the value specified by AndData, and
272 writes the result to the 8-bit PCI configuration register specified by
273 Address. The value written to the PCI configuration register is returned.
274 This function must guarantee that all PCI read and write operations are
275 serialized. Extra left bits in AndData are stripped.
277 If Address > 0x0FFFFFFF, then ASSERT().
278 If StartBit is greater than 7, then ASSERT().
279 If EndBit is greater than 7, then ASSERT().
280 If EndBit is less than StartBit, then ASSERT().
282 @param Address PCI configuration register to write.
283 @param StartBit The ordinal of the least significant bit in the bit field.
285 @param EndBit The ordinal of the most significant bit in the bit field.
287 @param AndData The value to AND with the PCI configuration register.
289 @return The value written back to the PCI configuration register.
302 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
303 bitwise inclusive OR, and writes the result back to the bit field in the
306 Reads the 8-bit PCI configuration register specified by Address, performs a
307 bitwise AND followed by a bitwise inclusive OR between the read result and
308 the value specified by AndData, and writes the result to the 8-bit PCI
309 configuration register specified by Address. The value written to the PCI
310 configuration register is returned. This function must guarantee that all PCI
311 read and write operations are serialized. Extra left bits in both AndData and
314 If Address > 0x0FFFFFFF, then ASSERT().
315 If StartBit is greater than 7, then ASSERT().
316 If EndBit is greater than 7, then ASSERT().
317 If EndBit is less than StartBit, then ASSERT().
319 @param Address PCI configuration register to write.
320 @param StartBit The ordinal of the least significant bit in the bit field.
322 @param EndBit The ordinal of the most significant bit in the bit field.
324 @param AndData The value to AND with the PCI configuration register.
325 @param OrData The value to OR with the result of the AND operation.
327 @return The value written back to the PCI configuration register.
332 PciBitFieldAndThenOr8 (
341 Reads a 16-bit PCI configuration register.
343 Reads and returns the 16-bit PCI configuration register specified by Address.
344 This function must guarantee that all PCI read and write operations are
347 If Address > 0x0FFFFFFF, then ASSERT().
348 If Address is not aligned on a 16-bit boundary, then ASSERT().
350 @param Address Address that encodes the PCI Bus, Device, Function and
353 @return The read value from the PCI configuration register.
363 Writes a 16-bit PCI configuration register.
365 Writes the 16-bit PCI configuration register specified by Address with the
366 value specified by Value. Value is returned. This function must guarantee
367 that all PCI read and write operations are serialized.
369 If Address > 0x0FFFFFFF, then ASSERT().
370 If Address is not aligned on a 16-bit boundary, then ASSERT().
372 @param Address Address that encodes the PCI Bus, Device, Function and
374 @param Value The value to write.
376 @return The value written to the PCI configuration register.
387 Performs a bitwise inclusive OR of a 16-bit PCI configuration register with
390 Reads the 16-bit PCI configuration register specified by Address, performs a
391 bitwise inclusive OR between the read result and the value specified by
392 OrData, and writes the result to the 16-bit PCI configuration register
393 specified by Address. The value written to the PCI configuration register is
394 returned. This function must guarantee that all PCI read and write operations
397 If Address > 0x0FFFFFFF, then ASSERT().
398 If Address is not aligned on a 16-bit boundary, then ASSERT().
400 @param Address Address that encodes the PCI Bus, Device, Function and
402 @param OrData The value to OR with the PCI configuration register.
404 @return The value written back to the PCI configuration register.
415 Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit
418 Reads the 16-bit PCI configuration register specified by Address, performs a
419 bitwise AND between the read result and the value specified by AndData, and
420 writes the result to the 16-bit PCI configuration register specified by
421 Address. The value written to the PCI configuration register is returned.
422 This function must guarantee that all PCI read and write operations are
425 If Address > 0x0FFFFFFF, then ASSERT().
426 If Address is not aligned on a 16-bit boundary, then ASSERT().
428 @param Address Address that encodes the PCI Bus, Device, Function and
430 @param AndData The value to AND with the PCI configuration register.
432 @return The value written back to the PCI configuration register.
443 Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit
444 value, followed a bitwise inclusive OR with another 16-bit value.
446 Reads the 16-bit PCI configuration register specified by Address, performs a
447 bitwise AND between the read result and the value specified by AndData,
448 performs a bitwise inclusive OR between the result of the AND operation and
449 the value specified by OrData, and writes the result to the 16-bit PCI
450 configuration register specified by Address. The value written to the PCI
451 configuration register is returned. This function must guarantee that all PCI
452 read and write operations are serialized.
454 If Address > 0x0FFFFFFF, then ASSERT().
455 If Address is not aligned on a 16-bit boundary, then ASSERT().
457 @param Address Address that encodes the PCI Bus, Device, Function and
459 @param AndData The value to AND with the PCI configuration register.
460 @param OrData The value to OR with the result of the AND operation.
462 @return The value written back to the PCI configuration register.
474 Reads a bit field of a PCI configuration register.
476 Reads the bit field in a 16-bit PCI configuration register. The bit field is
477 specified by the StartBit and the EndBit. The value of the bit field is
480 If Address > 0x0FFFFFFF, then ASSERT().
481 If Address is not aligned on a 16-bit boundary, then ASSERT().
482 If StartBit is greater than 15, then ASSERT().
483 If EndBit is greater than 15, then ASSERT().
484 If EndBit is less than StartBit, then ASSERT().
486 @param Address PCI configuration register to read.
487 @param StartBit The ordinal of the least significant bit in the bit field.
489 @param EndBit The ordinal of the most significant bit in the bit field.
492 @return The value of the bit field read from the PCI configuration register.
504 Writes a bit field to a PCI configuration register.
506 Writes Value to the bit field of the PCI configuration register. The bit
507 field is specified by the StartBit and the EndBit. All other bits in the
508 destination PCI configuration register are preserved. The new value of the
509 16-bit register is returned.
511 If Address > 0x0FFFFFFF, then ASSERT().
512 If Address is not aligned on a 16-bit boundary, then ASSERT().
513 If StartBit is greater than 15, then ASSERT().
514 If EndBit is greater than 15, then ASSERT().
515 If EndBit is less than StartBit, then ASSERT().
517 @param Address PCI configuration register to write.
518 @param StartBit The ordinal of the least significant bit in the bit field.
520 @param EndBit The ordinal of the most significant bit in the bit field.
522 @param Value New value of the bit field.
524 @return The value written back to the PCI configuration register.
537 Reads a bit field in a 16-bit PCI configuration, performs a bitwise OR, and
538 writes the result back to the bit field in the 16-bit port.
540 Reads the 16-bit PCI configuration register specified by Address, performs a
541 bitwise inclusive OR between the read result and the value specified by
542 OrData, and writes the result to the 16-bit PCI configuration register
543 specified by Address. The value written to the PCI configuration register is
544 returned. This function must guarantee that all PCI read and write operations
545 are serialized. Extra left bits in OrData are stripped.
547 If Address > 0x0FFFFFFF, then ASSERT().
548 If Address is not aligned on a 16-bit boundary, then ASSERT().
549 If StartBit is greater than 15, then ASSERT().
550 If EndBit is greater than 15, then ASSERT().
551 If EndBit is less than StartBit, then ASSERT().
553 @param Address PCI configuration register to write.
554 @param StartBit The ordinal of the least significant bit in the bit field.
556 @param EndBit The ordinal of the most significant bit in the bit field.
558 @param OrData The value to OR with the PCI configuration register.
560 @return The value written back to the PCI configuration register.
573 Reads a bit field in a 16-bit PCI configuration register, performs a bitwise
574 AND, and writes the result back to the bit field in the 16-bit register.
576 Reads the 16-bit PCI configuration register specified by Address, performs a
577 bitwise AND between the read result and the value specified by AndData, and
578 writes the result to the 16-bit PCI configuration register specified by
579 Address. The value written to the PCI configuration register is returned.
580 This function must guarantee that all PCI read and write operations are
581 serialized. Extra left bits in AndData are stripped.
583 If Address > 0x0FFFFFFF, then ASSERT().
584 If Address is not aligned on a 16-bit boundary, then ASSERT().
585 If StartBit is greater than 15, then ASSERT().
586 If EndBit is greater than 15, then ASSERT().
587 If EndBit is less than StartBit, then ASSERT().
589 @param Address PCI configuration register to write.
590 @param StartBit The ordinal of the least significant bit in the bit field.
592 @param EndBit The ordinal of the most significant bit in the bit field.
594 @param AndData The value to AND with the PCI configuration register.
596 @return The value written back to the PCI configuration register.
609 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
610 bitwise inclusive OR, and writes the result back to the bit field in the
613 Reads the 16-bit PCI configuration register specified by Address, performs a
614 bitwise AND followed by a bitwise inclusive OR between the read result and
615 the value specified by AndData, and writes the result to the 16-bit PCI
616 configuration register specified by Address. The value written to the PCI
617 configuration register is returned. This function must guarantee that all PCI
618 read and write operations are serialized. Extra left bits in both AndData and
621 If Address > 0x0FFFFFFF, then ASSERT().
622 If Address is not aligned on a 16-bit boundary, then ASSERT().
623 If StartBit is greater than 15, then ASSERT().
624 If EndBit is greater than 15, then ASSERT().
625 If EndBit is less than StartBit, then ASSERT().
627 @param Address PCI configuration register to write.
628 @param StartBit The ordinal of the least significant bit in the bit field.
630 @param EndBit The ordinal of the most significant bit in the bit field.
632 @param AndData The value to AND with the PCI configuration register.
633 @param OrData The value to OR with the result of the AND operation.
635 @return The value written back to the PCI configuration register.
640 PciBitFieldAndThenOr16 (
649 Reads a 32-bit PCI configuration register.
651 Reads and returns the 32-bit PCI configuration register specified by Address.
652 This function must guarantee that all PCI read and write operations are
655 If Address > 0x0FFFFFFF, then ASSERT().
656 If Address is not aligned on a 32-bit boundary, then ASSERT().
658 @param Address Address that encodes the PCI Bus, Device, Function and
661 @return The read value from the PCI configuration register.
671 Writes a 32-bit PCI configuration register.
673 Writes the 32-bit PCI configuration register specified by Address with the
674 value specified by Value. Value is returned. This function must guarantee
675 that all PCI read and write operations are serialized.
677 If Address > 0x0FFFFFFF, then ASSERT().
678 If Address is not aligned on a 32-bit boundary, then ASSERT().
680 @param Address Address that encodes the PCI Bus, Device, Function and
682 @param Value The value to write.
684 @return The value written to the PCI configuration register.
695 Performs a bitwise inclusive OR of a 32-bit PCI configuration register with
698 Reads the 32-bit PCI configuration register specified by Address, performs a
699 bitwise inclusive OR between the read result and the value specified by
700 OrData, and writes the result to the 32-bit PCI configuration register
701 specified by Address. The value written to the PCI configuration register is
702 returned. This function must guarantee that all PCI read and write operations
705 If Address > 0x0FFFFFFF, then ASSERT().
706 If Address is not aligned on a 32-bit boundary, then ASSERT().
708 @param Address Address that encodes the PCI Bus, Device, Function and
710 @param OrData The value to OR with the PCI configuration register.
712 @return The value written back to the PCI configuration register.
723 Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit
726 Reads the 32-bit PCI configuration register specified by Address, performs a
727 bitwise AND between the read result and the value specified by AndData, and
728 writes the result to the 32-bit PCI configuration register specified by
729 Address. The value written to the PCI configuration register is returned.
730 This function must guarantee that all PCI read and write operations are
733 If Address > 0x0FFFFFFF, then ASSERT().
734 If Address is not aligned on a 32-bit boundary, then ASSERT().
736 @param Address Address that encodes the PCI Bus, Device, Function and
738 @param AndData The value to AND with the PCI configuration register.
740 @return The value written back to the PCI configuration register.
751 Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit
752 value, followed a bitwise inclusive OR with another 32-bit value.
754 Reads the 32-bit PCI configuration register specified by Address, performs a
755 bitwise AND between the read result and the value specified by AndData,
756 performs a bitwise inclusive OR between the result of the AND operation and
757 the value specified by OrData, and writes the result to the 32-bit PCI
758 configuration register specified by Address. The value written to the PCI
759 configuration register is returned. This function must guarantee that all PCI
760 read and write operations are serialized.
762 If Address > 0x0FFFFFFF, then ASSERT().
763 If Address is not aligned on a 32-bit boundary, then ASSERT().
765 @param Address Address that encodes the PCI Bus, Device, Function and
767 @param AndData The value to AND with the PCI configuration register.
768 @param OrData The value to OR with the result of the AND operation.
770 @return The value written back to the PCI configuration register.
782 Reads a bit field of a PCI configuration register.
784 Reads the bit field in a 32-bit PCI configuration register. The bit field is
785 specified by the StartBit and the EndBit. The value of the bit field is
788 If Address > 0x0FFFFFFF, then ASSERT().
789 If Address is not aligned on a 32-bit boundary, then ASSERT().
790 If StartBit is greater than 31, then ASSERT().
791 If EndBit is greater than 31, then ASSERT().
792 If EndBit is less than StartBit, then ASSERT().
794 @param Address PCI configuration register to read.
795 @param StartBit The ordinal of the least significant bit in the bit field.
797 @param EndBit The ordinal of the most significant bit in the bit field.
800 @return The value of the bit field read from the PCI configuration register.
812 Writes a bit field to a PCI configuration register.
814 Writes Value to the bit field of the PCI configuration register. The bit
815 field is specified by the StartBit and the EndBit. All other bits in the
816 destination PCI configuration register are preserved. The new value of the
817 32-bit register is returned.
819 If Address > 0x0FFFFFFF, then ASSERT().
820 If Address is not aligned on a 32-bit boundary, then ASSERT().
821 If StartBit is greater than 31, then ASSERT().
822 If EndBit is greater than 31, then ASSERT().
823 If EndBit is less than StartBit, then ASSERT().
825 @param Address PCI configuration register to write.
826 @param StartBit The ordinal of the least significant bit in the bit field.
828 @param EndBit The ordinal of the most significant bit in the bit field.
830 @param Value New value of the bit field.
832 @return The value written back to the PCI configuration register.
845 Reads a bit field in a 32-bit PCI configuration, performs a bitwise OR, and
846 writes the result back to the bit field in the 32-bit port.
848 Reads the 32-bit PCI configuration register specified by Address, performs a
849 bitwise inclusive OR between the read result and the value specified by
850 OrData, and writes the result to the 32-bit PCI configuration register
851 specified by Address. The value written to the PCI configuration register is
852 returned. This function must guarantee that all PCI read and write operations
853 are serialized. Extra left bits in OrData are stripped.
855 If Address > 0x0FFFFFFF, then ASSERT().
856 If Address is not aligned on a 32-bit boundary, then ASSERT().
857 If StartBit is greater than 31, then ASSERT().
858 If EndBit is greater than 31, then ASSERT().
859 If EndBit is less than StartBit, then ASSERT().
861 @param Address PCI configuration register to write.
862 @param StartBit The ordinal of the least significant bit in the bit field.
864 @param EndBit The ordinal of the most significant bit in the bit field.
866 @param OrData The value to OR with the PCI configuration register.
868 @return The value written back to the PCI configuration register.
881 Reads a bit field in a 32-bit PCI configuration register, performs a bitwise
882 AND, and writes the result back to the bit field in the 32-bit register.
884 Reads the 32-bit PCI configuration register specified by Address, performs a
885 bitwise AND between the read result and the value specified by AndData, and
886 writes the result to the 32-bit PCI configuration register specified by
887 Address. The value written to the PCI configuration register is returned.
888 This function must guarantee that all PCI read and write operations are
889 serialized. Extra left bits in AndData are stripped.
891 If Address > 0x0FFFFFFF, then ASSERT().
892 If Address is not aligned on a 32-bit boundary, then ASSERT().
893 If StartBit is greater than 31, then ASSERT().
894 If EndBit is greater than 31, then ASSERT().
895 If EndBit is less than StartBit, then ASSERT().
897 @param Address PCI configuration register to write.
898 @param StartBit The ordinal of the least significant bit in the bit field.
900 @param EndBit The ordinal of the most significant bit in the bit field.
902 @param AndData The value to AND with the PCI configuration register.
904 @return The value written back to the PCI configuration register.
917 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
918 bitwise inclusive OR, and writes the result back to the bit field in the
921 Reads the 32-bit PCI configuration register specified by Address, performs a
922 bitwise AND followed by a bitwise inclusive OR between the read result and
923 the value specified by AndData, and writes the result to the 32-bit PCI
924 configuration register specified by Address. The value written to the PCI
925 configuration register is returned. This function must guarantee that all PCI
926 read and write operations are serialized. Extra left bits in both AndData and
929 If Address > 0x0FFFFFFF, then ASSERT().
930 If Address is not aligned on a 32-bit boundary, then ASSERT().
931 If StartBit is greater than 31, then ASSERT().
932 If EndBit is greater than 31, then ASSERT().
933 If EndBit is less than StartBit, then ASSERT().
935 @param Address PCI configuration register to write.
936 @param StartBit The ordinal of the least significant bit in the bit field.
938 @param EndBit The ordinal of the most significant bit in the bit field.
940 @param AndData The value to AND with the PCI configuration register.
941 @param OrData The value to OR with the result of the AND operation.
943 @return The value written back to the PCI configuration register.
948 PciBitFieldAndThenOr32 (
957 Reads a range of PCI configuration registers into a caller supplied buffer.
959 Reads the range of PCI configuration registers specified by StartAddress and
960 Size into the buffer specified by Buffer. This function only allows the PCI
961 configuration registers from a single PCI function to be read. Size is
962 returned. When possible 32-bit PCI configuration read cycles are used to read
963 from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
964 and 16-bit PCI configuration read cycles may be used at the beginning and the
967 If StartAddress > 0x0FFFFFFF, then ASSERT().
968 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
969 If Size > 0 and Buffer is NULL, then ASSERT().
971 @param StartAddress Starting address that encodes the PCI Bus, Device,
972 Function and Register.
973 @param Size Size in bytes of the transfer.
974 @param Buffer Pointer to a buffer receiving the data read.
982 IN UINTN StartAddress
,
988 Copies the data in a caller supplied buffer to a specified range of PCI
991 Writes the range of PCI configuration registers specified by StartAddress and
992 Size from the buffer specified by Buffer. This function only allows the PCI
993 configuration registers from a single PCI function to be written. Size is
994 returned. When possible 32-bit PCI configuration write cycles are used to
995 write from StartAdress to StartAddress + Size. Due to alignment restrictions,
996 8-bit and 16-bit PCI configuration write cycles may be used at the beginning
997 and the end of the range.
999 If StartAddress > 0x0FFFFFFF, then ASSERT().
1000 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
1001 If Size > 0 and Buffer is NULL, then ASSERT().
1003 @param StartAddress Starting address that encodes the PCI Bus, Device,
1004 Function and Register.
1005 @param Size Size in bytes of the transfer.
1006 @param Buffer Pointer to a buffer containing the data to write.
1014 IN UINTN StartAddress
,