2 PCI Library using PC Express access.
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Reads an 8-bit PCI configuration register.
20 Reads and returns the 8-bit PCI configuration register specified by Address.
21 This function must guarantee that all PCI read and write operations are
24 If Address > 0x0FFFFFFF, then ASSERT().
26 @param Address Address that encodes the PCI Bus, Device, Function and
29 @return The read value from the PCI configuration register.
38 return PciExpressRead8 (Address
);
42 Writes an 8-bit PCI configuration register.
44 Writes the 8-bit PCI configuration register specified by Address with the
45 value specified by Value. Value is returned. This function must guarantee
46 that all PCI read and write operations are serialized.
48 If Address > 0x0FFFFFFF, then ASSERT().
50 @param Address Address that encodes the PCI Bus, Device, Function and
52 @param Value The value to write.
54 @return The value written to the PCI configuration register.
64 return PciExpressWrite8 (Address
, Data
);
68 Performs a bitwise inclusive OR of an 8-bit PCI configuration register with
71 Reads the 8-bit PCI configuration register specified by Address, performs a
72 bitwise inclusive OR between the read result and the value specified by
73 OrData, and writes the result to the 8-bit PCI configuration register
74 specified by Address. The value written to the PCI configuration register is
75 returned. This function must guarantee that all PCI read and write operations
78 If Address > 0x0FFFFFFF, then ASSERT().
80 @param Address Address that encodes the PCI Bus, Device, Function and
82 @param OrData The value to OR with the PCI configuration register.
84 @return The value written back to the PCI configuration register.
94 return PciExpressOr8 (Address
, OrData
);
98 Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit
101 Reads the 8-bit PCI configuration register specified by Address, performs a
102 bitwise AND between the read result and the value specified by AndData, and
103 writes the result to the 8-bit PCI configuration register specified by
104 Address. The value written to the PCI configuration register is returned.
105 This function must guarantee that all PCI read and write operations are
108 If Address > 0x0FFFFFFF, then ASSERT().
110 @param Address Address that encodes the PCI Bus, Device, Function and
112 @param AndData The value to AND with the PCI configuration register.
114 @return The value written back to the PCI configuration register.
124 return PciExpressAnd8 (Address
, AndData
);
128 Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit
129 value, followed a bitwise inclusive OR with another 8-bit value.
131 Reads the 8-bit PCI configuration register specified by Address, performs a
132 bitwise AND between the read result and the value specified by AndData,
133 performs a bitwise inclusive OR between the result of the AND operation and
134 the value specified by OrData, and writes the result to the 8-bit PCI
135 configuration register specified by Address. The value written to the PCI
136 configuration register is returned. This function must guarantee that all PCI
137 read and write operations are serialized.
139 If Address > 0x0FFFFFFF, then ASSERT().
141 @param Address Address that encodes the PCI Bus, Device, Function and
143 @param AndData The value to AND with the PCI configuration register.
144 @param OrData The value to OR with the result of the AND operation.
146 @return The value written back to the PCI configuration register.
157 return PciExpressAndThenOr8 (Address
, AndData
, OrData
);
161 Reads a bit field of a PCI configuration register.
163 Reads the bit field in an 8-bit PCI configuration register. The bit field is
164 specified by the StartBit and the EndBit. The value of the bit field is
167 If Address > 0x0FFFFFFF, then ASSERT().
168 If StartBit is greater than 7, then ASSERT().
169 If EndBit is greater than 7, then ASSERT().
170 If EndBit is less than or equal to StartBit, then ASSERT().
172 @param Address PCI configuration register to read.
173 @param StartBit The ordinal of the least significant bit in the bit field.
175 @param EndBit The ordinal of the most significant bit in the bit field.
178 @return The value of the bit field read from the PCI configuration register.
189 return PciExpressBitFieldRead8 (Address
, StartBit
, EndBit
);
193 Writes a bit field to a PCI configuration register.
195 Writes Value to the bit field of the PCI configuration register. The bit
196 field is specified by the StartBit and the EndBit. All other bits in the
197 destination PCI configuration register are preserved. The new value of the
198 8-bit register is returned.
200 If Address > 0x0FFFFFFF, then ASSERT().
201 If StartBit is greater than 7, then ASSERT().
202 If EndBit is greater than 7, then ASSERT().
203 If EndBit is less than or equal to StartBit, then ASSERT().
205 @param Address PCI configuration register to write.
206 @param StartBit The ordinal of the least significant bit in the bit field.
208 @param EndBit The ordinal of the most significant bit in the bit field.
210 @param Value New value of the bit field.
212 @return The value written back to the PCI configuration register.
224 return PciExpressBitFieldWrite8 (Address
, StartBit
, EndBit
, Value
);
228 Reads a bit field in an 8-bit PCI configuration, performs a bitwise OR, and
229 writes the result back to the bit field in the 8-bit port.
231 Reads the 8-bit PCI configuration register specified by Address, performs a
232 bitwise inclusive OR between the read result and the value specified by
233 OrData, and writes the result to the 8-bit PCI configuration register
234 specified by Address. The value written to the PCI configuration register is
235 returned. This function must guarantee that all PCI read and write operations
236 are serialized. Extra left bits in OrData are stripped.
238 If Address > 0x0FFFFFFF, then ASSERT().
239 If StartBit is greater than 7, then ASSERT().
240 If EndBit is greater than 7, then ASSERT().
241 If EndBit is less than or equal to StartBit, then ASSERT().
243 @param Address PCI configuration register to write.
244 @param StartBit The ordinal of the least significant bit in the bit field.
246 @param EndBit The ordinal of the most significant bit in the bit field.
248 @param OrData The value to OR with the PCI configuration register.
250 @return The value written back to the PCI configuration register.
262 return PciExpressBitFieldOr8 (Address
, StartBit
, EndBit
, OrData
);
266 Reads a bit field in an 8-bit PCI configuration register, performs a bitwise
267 AND, and writes the result back to the bit field in the 8-bit register.
269 Reads the 8-bit PCI configuration register specified by Address, performs a
270 bitwise AND between the read result and the value specified by AndData, and
271 writes the result to the 8-bit PCI configuration register specified by
272 Address. The value written to the PCI configuration register is returned.
273 This function must guarantee that all PCI read and write operations are
274 serialized. Extra left bits in AndData are stripped.
276 If Address > 0x0FFFFFFF, then ASSERT().
277 If StartBit is greater than 7, then ASSERT().
278 If EndBit is greater than 7, then ASSERT().
279 If EndBit is less than or equal to StartBit, then ASSERT().
281 @param Address PCI configuration register to write.
282 @param StartBit The ordinal of the least significant bit in the bit field.
284 @param EndBit The ordinal of the most significant bit in the bit field.
286 @param AndData The value to AND with the PCI configuration register.
288 @return The value written back to the PCI configuration register.
300 return PciExpressBitFieldAnd8 (Address
, StartBit
, EndBit
, AndData
);
304 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
305 bitwise inclusive OR, and writes the result back to the bit field in the
308 Reads the 8-bit PCI configuration register specified by Address, performs a
309 bitwise AND followed by a bitwise inclusive OR between the read result and
310 the value specified by AndData, and writes the result to the 8-bit PCI
311 configuration register specified by Address. The value written to the PCI
312 configuration register is returned. This function must guarantee that all PCI
313 read and write operations are serialized. Extra left bits in both AndData and
316 If Address > 0x0FFFFFFF, then ASSERT().
317 If StartBit is greater than 7, then ASSERT().
318 If EndBit is greater than 7, then ASSERT().
319 If EndBit is less than or equal to StartBit, then ASSERT().
321 @param Address PCI configuration register to write.
322 @param StartBit The ordinal of the least significant bit in the bit field.
324 @param EndBit The ordinal of the most significant bit in the bit field.
326 @param AndData The value to AND with the PCI configuration register.
327 @param OrData The value to OR with the result of the AND operation.
329 @return The value written back to the PCI configuration register.
334 PciBitFieldAndThenOr8 (
342 return PciExpressBitFieldAndThenOr8 (Address
, StartBit
, EndBit
, AndData
, OrData
);
346 Reads a 16-bit PCI configuration register.
348 Reads and returns the 16-bit PCI configuration register specified by Address.
349 This function must guarantee that all PCI read and write operations are
352 If Address > 0x0FFFFFFF, then ASSERT().
354 @param Address Address that encodes the PCI Bus, Device, Function and
357 @return The read value from the PCI configuration register.
366 return PciExpressRead16 (Address
);
370 Writes a 16-bit PCI configuration register.
372 Writes the 16-bit PCI configuration register specified by Address with the
373 value specified by Value. Value is returned. This function must guarantee
374 that all PCI read and write operations are serialized.
376 If Address > 0x0FFFFFFF, then ASSERT().
378 @param Address Address that encodes the PCI Bus, Device, Function and
380 @param Value The value to write.
382 @return The value written to the PCI configuration register.
392 return PciExpressWrite16 (Address
, Data
);
396 Performs a bitwise inclusive OR of a 16-bit PCI configuration register with
399 Reads the 16-bit PCI configuration register specified by Address, performs a
400 bitwise inclusive OR between the read result and the value specified by
401 OrData, and writes the result to the 16-bit PCI configuration register
402 specified by Address. The value written to the PCI configuration register is
403 returned. This function must guarantee that all PCI read and write operations
406 If Address > 0x0FFFFFFF, then ASSERT().
408 @param Address Address that encodes the PCI Bus, Device, Function and
410 @param OrData The value to OR with the PCI configuration register.
412 @return The value written back to the PCI configuration register.
422 return PciExpressOr16 (Address
, OrData
);
426 Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit
429 Reads the 16-bit PCI configuration register specified by Address, performs a
430 bitwise AND between the read result and the value specified by AndData, and
431 writes the result to the 16-bit PCI configuration register specified by
432 Address. The value written to the PCI configuration register is returned.
433 This function must guarantee that all PCI read and write operations are
436 If Address > 0x0FFFFFFF, then ASSERT().
438 @param Address Address that encodes the PCI Bus, Device, Function and
440 @param AndData The value to AND with the PCI configuration register.
442 @return The value written back to the PCI configuration register.
452 return PciExpressAnd16 (Address
, AndData
);
456 Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit
457 value, followed a bitwise inclusive OR with another 16-bit value.
459 Reads the 16-bit PCI configuration register specified by Address, performs a
460 bitwise AND between the read result and the value specified by AndData,
461 performs a bitwise inclusive OR between the result of the AND operation and
462 the value specified by OrData, and writes the result to the 16-bit PCI
463 configuration register specified by Address. The value written to the PCI
464 configuration register is returned. This function must guarantee that all PCI
465 read and write operations are serialized.
467 If Address > 0x0FFFFFFF, then ASSERT().
469 @param Address Address that encodes the PCI Bus, Device, Function and
471 @param AndData The value to AND with the PCI configuration register.
472 @param OrData The value to OR with the result of the AND operation.
474 @return The value written back to the PCI configuration register.
485 return PciExpressAndThenOr16 (Address
, AndData
, OrData
);
489 Reads a bit field of a PCI configuration register.
491 Reads the bit field in a 16-bit PCI configuration register. The bit field is
492 specified by the StartBit and the EndBit. The value of the bit field is
495 If Address > 0x0FFFFFFF, then ASSERT().
496 If StartBit is greater than 15, then ASSERT().
497 If EndBit is greater than 15, then ASSERT().
498 If EndBit is less than or equal to StartBit, then ASSERT().
500 @param Address PCI configuration register to read.
501 @param StartBit The ordinal of the least significant bit in the bit field.
503 @param EndBit The ordinal of the most significant bit in the bit field.
506 @return The value of the bit field read from the PCI configuration register.
517 return PciExpressBitFieldRead16 (Address
, StartBit
, EndBit
);
521 Writes a bit field to a PCI configuration register.
523 Writes Value to the bit field of the PCI configuration register. The bit
524 field is specified by the StartBit and the EndBit. All other bits in the
525 destination PCI configuration register are preserved. The new value of the
526 16-bit register is returned.
528 If Address > 0x0FFFFFFF, then ASSERT().
529 If StartBit is greater than 15, then ASSERT().
530 If EndBit is greater than 15, then ASSERT().
531 If EndBit is less than or equal to StartBit, then ASSERT().
533 @param Address PCI configuration register to write.
534 @param StartBit The ordinal of the least significant bit in the bit field.
536 @param EndBit The ordinal of the most significant bit in the bit field.
538 @param Value New value of the bit field.
540 @return The value written back to the PCI configuration register.
552 return PciExpressBitFieldWrite16 (Address
, StartBit
, EndBit
, Value
);
556 Reads a bit field in a 16-bit PCI configuration, performs a bitwise OR, and
557 writes the result back to the bit field in the 16-bit port.
559 Reads the 16-bit PCI configuration register specified by Address, performs a
560 bitwise inclusive OR between the read result and the value specified by
561 OrData, and writes the result to the 16-bit PCI configuration register
562 specified by Address. The value written to the PCI configuration register is
563 returned. This function must guarantee that all PCI read and write operations
564 are serialized. Extra left bits in OrData are stripped.
566 If Address > 0x0FFFFFFF, then ASSERT().
567 If StartBit is greater than 15, then ASSERT().
568 If EndBit is greater than 15, then ASSERT().
569 If EndBit is less than or equal to StartBit, then ASSERT().
571 @param Address PCI configuration register to write.
572 @param StartBit The ordinal of the least significant bit in the bit field.
574 @param EndBit The ordinal of the most significant bit in the bit field.
576 @param OrData The value to OR with the PCI configuration register.
578 @return The value written back to the PCI configuration register.
590 return PciExpressBitFieldOr16 (Address
, StartBit
, EndBit
, OrData
);
594 Reads a bit field in a 16-bit PCI configuration register, performs a bitwise
595 AND, and writes the result back to the bit field in the 16-bit register.
597 Reads the 16-bit PCI configuration register specified by Address, performs a
598 bitwise AND between the read result and the value specified by AndData, and
599 writes the result to the 16-bit PCI configuration register specified by
600 Address. The value written to the PCI configuration register is returned.
601 This function must guarantee that all PCI read and write operations are
602 serialized. Extra left bits in AndData are stripped.
604 If Address > 0x0FFFFFFF, then ASSERT().
605 If StartBit is greater than 15, then ASSERT().
606 If EndBit is greater than 15, then ASSERT().
607 If EndBit is less than or equal to StartBit, then ASSERT().
609 @param Address PCI configuration register to write.
610 @param StartBit The ordinal of the least significant bit in the bit field.
612 @param EndBit The ordinal of the most significant bit in the bit field.
614 @param AndData The value to AND with the PCI configuration register.
616 @return The value written back to the PCI configuration register.
628 return PciExpressBitFieldAnd16 (Address
, StartBit
, EndBit
, AndData
);
632 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
633 bitwise inclusive OR, and writes the result back to the bit field in the
636 Reads the 16-bit PCI configuration register specified by Address, performs a
637 bitwise AND followed by a bitwise inclusive OR between the read result and
638 the value specified by AndData, and writes the result to the 16-bit PCI
639 configuration register specified by Address. The value written to the PCI
640 configuration register is returned. This function must guarantee that all PCI
641 read and write operations are serialized. Extra left bits in both AndData and
644 If Address > 0x0FFFFFFF, then ASSERT().
645 If StartBit is greater than 15, then ASSERT().
646 If EndBit is greater than 15, then ASSERT().
647 If EndBit is less than or equal to StartBit, then ASSERT().
649 @param Address PCI configuration register to write.
650 @param StartBit The ordinal of the least significant bit in the bit field.
652 @param EndBit The ordinal of the most significant bit in the bit field.
654 @param AndData The value to AND with the PCI configuration register.
655 @param OrData The value to OR with the result of the AND operation.
657 @return The value written back to the PCI configuration register.
662 PciBitFieldAndThenOr16 (
670 return PciExpressBitFieldAndThenOr16 (Address
, StartBit
, EndBit
, AndData
, OrData
);
674 Reads a 32-bit PCI configuration register.
676 Reads and returns the 32-bit PCI configuration register specified by Address.
677 This function must guarantee that all PCI read and write operations are
680 If Address > 0x0FFFFFFF, then ASSERT().
682 @param Address Address that encodes the PCI Bus, Device, Function and
685 @return The read value from the PCI configuration register.
694 return PciExpressRead32 (Address
);
698 Writes a 32-bit PCI configuration register.
700 Writes the 32-bit PCI configuration register specified by Address with the
701 value specified by Value. Value is returned. This function must guarantee
702 that all PCI read and write operations are serialized.
704 If Address > 0x0FFFFFFF, then ASSERT().
706 @param Address Address that encodes the PCI Bus, Device, Function and
708 @param Value The value to write.
710 @return The value written to the PCI configuration register.
720 return PciExpressWrite32 (Address
, Data
);
724 Performs a bitwise inclusive OR of a 32-bit PCI configuration register with
727 Reads the 32-bit PCI configuration register specified by Address, performs a
728 bitwise inclusive OR between the read result and the value specified by
729 OrData, and writes the result to the 32-bit PCI configuration register
730 specified by Address. The value written to the PCI configuration register is
731 returned. This function must guarantee that all PCI read and write operations
734 If Address > 0x0FFFFFFF, then ASSERT().
736 @param Address Address that encodes the PCI Bus, Device, Function and
738 @param OrData The value to OR with the PCI configuration register.
740 @return The value written back to the PCI configuration register.
750 return PciExpressOr32 (Address
, OrData
);
754 Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit
757 Reads the 32-bit PCI configuration register specified by Address, performs a
758 bitwise AND between the read result and the value specified by AndData, and
759 writes the result to the 32-bit PCI configuration register specified by
760 Address. The value written to the PCI configuration register is returned.
761 This function must guarantee that all PCI read and write operations are
764 If Address > 0x0FFFFFFF, then ASSERT().
766 @param Address Address that encodes the PCI Bus, Device, Function and
768 @param AndData The value to AND with the PCI configuration register.
770 @return The value written back to the PCI configuration register.
780 return PciExpressAnd32 (Address
, AndData
);
784 Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit
785 value, followed a bitwise inclusive OR with another 32-bit value.
787 Reads the 32-bit PCI configuration register specified by Address, performs a
788 bitwise AND between the read result and the value specified by AndData,
789 performs a bitwise inclusive OR between the result of the AND operation and
790 the value specified by OrData, and writes the result to the 32-bit PCI
791 configuration register specified by Address. The value written to the PCI
792 configuration register is returned. This function must guarantee that all PCI
793 read and write operations are serialized.
795 If Address > 0x0FFFFFFF, then ASSERT().
797 @param Address Address that encodes the PCI Bus, Device, Function and
799 @param AndData The value to AND with the PCI configuration register.
800 @param OrData The value to OR with the result of the AND operation.
802 @return The value written back to the PCI configuration register.
813 return PciExpressAndThenOr32 (Address
, AndData
, OrData
);
817 Reads a bit field of a PCI configuration register.
819 Reads the bit field in a 32-bit PCI configuration register. The bit field is
820 specified by the StartBit and the EndBit. The value of the bit field is
823 If Address > 0x0FFFFFFF, then ASSERT().
824 If StartBit is greater than 31, then ASSERT().
825 If EndBit is greater than 31, then ASSERT().
826 If EndBit is less than or equal to StartBit, then ASSERT().
828 @param Address PCI configuration register to read.
829 @param StartBit The ordinal of the least significant bit in the bit field.
831 @param EndBit The ordinal of the most significant bit in the bit field.
834 @return The value of the bit field read from the PCI configuration register.
845 return PciExpressBitFieldRead32 (Address
, StartBit
, EndBit
);
849 Writes a bit field to a PCI configuration register.
851 Writes Value to the bit field of the PCI configuration register. The bit
852 field is specified by the StartBit and the EndBit. All other bits in the
853 destination PCI configuration register are preserved. The new value of the
854 32-bit register is returned.
856 If Address > 0x0FFFFFFF, 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 or equal to 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 Value New value of the bit field.
868 @return The value written back to the PCI configuration register.
880 return PciExpressBitFieldWrite32 (Address
, StartBit
, EndBit
, Value
);
884 Reads a bit field in a 32-bit PCI configuration, performs a bitwise OR, and
885 writes the result back to the bit field in the 32-bit port.
887 Reads the 32-bit PCI configuration register specified by Address, performs a
888 bitwise inclusive OR between the read result and the value specified by
889 OrData, and writes the result to the 32-bit PCI configuration register
890 specified by Address. The value written to the PCI configuration register is
891 returned. This function must guarantee that all PCI read and write operations
892 are serialized. Extra left bits in OrData are stripped.
894 If Address > 0x0FFFFFFF, then ASSERT().
895 If StartBit is greater than 31, then ASSERT().
896 If EndBit is greater than 31, then ASSERT().
897 If EndBit is less than or equal to StartBit, then ASSERT().
899 @param Address PCI configuration register to write.
900 @param StartBit The ordinal of the least significant bit in the bit field.
902 @param EndBit The ordinal of the most significant bit in the bit field.
904 @param OrData The value to OR with the PCI configuration register.
906 @return The value written back to the PCI configuration register.
918 return PciExpressBitFieldOr32 (Address
, StartBit
, EndBit
, OrData
);
922 Reads a bit field in a 32-bit PCI configuration register, performs a bitwise
923 AND, and writes the result back to the bit field in the 32-bit register.
925 Reads the 32-bit PCI configuration register specified by Address, performs a
926 bitwise AND between the read result and the value specified by AndData, and
927 writes the result to the 32-bit PCI configuration register specified by
928 Address. The value written to the PCI configuration register is returned.
929 This function must guarantee that all PCI read and write operations are
930 serialized. Extra left bits in AndData are stripped.
932 If Address > 0x0FFFFFFF, then ASSERT().
933 If StartBit is greater than 31, then ASSERT().
934 If EndBit is greater than 31, then ASSERT().
935 If EndBit is less than or equal to StartBit, then ASSERT().
937 @param Address PCI configuration register to write.
938 @param StartBit The ordinal of the least significant bit in the bit field.
940 @param EndBit The ordinal of the most significant bit in the bit field.
942 @param AndData The value to AND with the PCI configuration register.
944 @return The value written back to the PCI configuration register.
956 return PciExpressBitFieldAnd32 (Address
, StartBit
, EndBit
, AndData
);
960 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
961 bitwise inclusive OR, and writes the result back to the bit field in the
964 Reads the 32-bit PCI configuration register specified by Address, performs a
965 bitwise AND followed by a bitwise inclusive OR between the read result and
966 the value specified by AndData, and writes the result to the 32-bit PCI
967 configuration register specified by Address. The value written to the PCI
968 configuration register is returned. This function must guarantee that all PCI
969 read and write operations are serialized. Extra left bits in both AndData and
972 If Address > 0x0FFFFFFF, then ASSERT().
973 If StartBit is greater than 31, then ASSERT().
974 If EndBit is greater than 31, then ASSERT().
975 If EndBit is less than or equal to StartBit, then ASSERT().
977 @param Address PCI configuration register to write.
978 @param StartBit The ordinal of the least significant bit in the bit field.
980 @param EndBit The ordinal of the most significant bit in the bit field.
982 @param AndData The value to AND with the PCI configuration register.
983 @param OrData The value to OR with the result of the AND operation.
985 @return The value written back to the PCI configuration register.
990 PciBitFieldAndThenOr32 (
998 return PciExpressBitFieldAndThenOr32 (Address
, StartBit
, EndBit
, AndData
, OrData
);
1002 Reads a range of PCI configuration registers into a caller supplied buffer.
1004 Reads the range of PCI configuration registers specified by StartAddress and
1005 Size into the buffer specified by Buffer. This function only allows the PCI
1006 configuration registers from a single PCI function to be read. Size is
1007 returned. When possible 32-bit PCI configuration read cycles are used to read
1008 from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
1009 and 16-bit PCI configuration read cycles may be used at the beginning and the
1012 If StartAddress > 0x0FFFFFFF, then ASSERT().
1013 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
1014 If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
1015 If Buffer is NULL, then ASSERT().
1017 @param StartAddress Starting address that encodes the PCI Bus, Device,
1018 Function and Register.
1019 @param Size Size in bytes of the transfer.
1020 @param Buffer Pointer to a buffer receiving the data read.
1028 IN UINTN StartAddress
,
1033 return PciExpressReadBuffer (StartAddress
, Size
, Buffer
);
1037 Copies the data in a caller supplied buffer to a specified range of PCI
1038 configuration space.
1040 Writes the range of PCI configuration registers specified by StartAddress and
1041 Size from the buffer specified by Buffer. This function only allows the PCI
1042 configuration registers from a single PCI function to be written. Size is
1043 returned. When possible 32-bit PCI configuration write cycles are used to
1044 write from StartAdress to StartAddress + Size. Due to alignment restrictions,
1045 8-bit and 16-bit PCI configuration write cycles may be used at the beginning
1046 and the end of the range.
1048 If StartAddress > 0x0FFFFFFF, then ASSERT().
1049 If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().
1050 If (StartAddress + Size - 1) > 0x0FFFFFFF, then ASSERT().
1051 If Buffer is NULL, then ASSERT().
1053 @param StartAddress Starting address that encodes the PCI Bus, Device,
1054 Function and Register.
1055 @param Size Size in bytes of the transfer.
1056 @param Buffer Pointer to a buffer containing the data to write.
1064 IN UINTN StartAddress
,
1069 return PciExpressWriteBuffer (StartAddress
, Size
, Buffer
);