2 I/O and MMIO Library Services
4 Copyright (c) 2006, Intel Corporation
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.
20 #define IO_LIB_ADDRESS(Segment,Port) \
21 ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) )
24 Reads an 8-bit I/O port.
26 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
27 This function must guarantee that all I/O read and write operations are
30 If 8-bit I/O port operations are not supported, then ASSERT().
32 @param Port The I/O port to read.
34 @return The value read.
44 Writes an 8-bit I/O port.
46 Writes the 8-bit I/O port specified by Port with the value specified by Value
47 and returns Value. This function must guarantee that all I/O read and write
48 operations are serialized.
50 If 8-bit I/O port operations are not supported, then ASSERT().
52 @param Port The I/O port to write.
53 @param Value The value to write to the I/O port.
55 @return The value written the I/O port.
66 Reads an 8-bit I/O port, performs a bitwise inclusive OR, and writes the
67 result back to the 8-bit I/O port.
69 Reads the 8-bit I/O port specified by Port, performs a bitwise inclusive OR
70 between the read result and the value specified by OrData, and writes the
71 result to the 8-bit I/O port specified by Port. The value written to the I/O
72 port is returned. This function must guarantee that all I/O read and write
73 operations are serialized.
75 If 8-bit I/O port operations are not supported, then ASSERT().
77 @param Port The I/O port to write.
78 @param OrData The value to OR with the read value from the I/O port.
80 @return The value written back to the I/O port.
91 Reads an 8-bit I/O port, performs a bitwise AND, and writes the result back
92 to the 8-bit I/O port.
94 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
95 the read result and the value specified by AndData, and writes the result to
96 the 8-bit I/O port specified by Port. The value written to the I/O port is
97 returned. This function must guarantee that all I/O read and write operations
100 If 8-bit I/O port operations are not supported, then ASSERT().
102 @param Port The I/O port to write.
103 @param AndData The value to AND with the read value from the I/O port.
105 @return The value written back to the I/O port.
116 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
117 inclusive OR, and writes the result back to the 8-bit I/O port.
119 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
120 the read result and the value specified by AndData, performs a bitwise OR
121 between the result of the AND operation and the value specified by OrData,
122 and writes the result to the 8-bit I/O port specified by Port. The value
123 written to the I/O port is returned. This function must guarantee that all
124 I/O read and write operations are serialized.
126 If 8-bit I/O port operations are not supported, then ASSERT().
128 @param Port The I/O port to write.
129 @param AndData The value to AND with the read value from the I/O port.
130 @param OrData The value to OR with the result of the AND operation.
132 @return The value written back to the I/O port.
144 Reads a bit field of an I/O register.
146 Reads the bit field in an 8-bit I/O register. The bit field is specified by
147 the StartBit and the EndBit. The value of the bit field is returned.
149 If 8-bit I/O port operations are not supported, then ASSERT().
150 If StartBit is greater than 7, then ASSERT().
151 If EndBit is greater than 7, then ASSERT().
152 If EndBit is less than or equal to StartBit, then ASSERT().
154 @param Port The I/O port to read.
155 @param StartBit The ordinal of the least significant bit in the bit field.
157 @param EndBit The ordinal of the most significant bit in the bit field.
160 @return The value read.
172 Writes a bit field to an I/O register.
174 Writes Value to the bit field of the I/O register. The bit field is specified
175 by the StartBit and the EndBit. All other bits in the destination I/O
176 register are preserved. The value written to the I/O port is returned. Extra
177 left bits in Value are stripped.
179 If 8-bit I/O port operations are not supported, then ASSERT().
180 If StartBit is greater than 7, then ASSERT().
181 If EndBit is greater than 7, then ASSERT().
182 If EndBit is less than or equal to StartBit, then ASSERT().
184 @param Port The I/O port to write.
185 @param StartBit The ordinal of the least significant bit in the bit field.
187 @param EndBit The ordinal of the most significant bit in the bit field.
189 @param Value New value of the bit field.
191 @return The value written back to the I/O port.
204 Reads a bit field in an 8-bit port, performs a bitwise OR, and writes the
205 result back to the bit field in the 8-bit port.
207 Reads the 8-bit I/O port specified by Port, performs a bitwise inclusive OR
208 between the read result and the value specified by OrData, and writes the
209 result to the 8-bit I/O port specified by Port. The value written to the I/O
210 port is returned. This function must guarantee that all I/O read and write
211 operations are serialized. Extra left bits in OrData are stripped.
213 If 8-bit I/O port operations are not supported, then ASSERT().
214 If StartBit is greater than 7, then ASSERT().
215 If EndBit is greater than 7, then ASSERT().
216 If EndBit is less than or equal to StartBit, then ASSERT().
218 @param Port The I/O port to write.
219 @param StartBit The ordinal of the least significant bit in the bit field.
221 @param EndBit The ordinal of the most significant bit in the bit field.
223 @param OrData The value to OR with the read value from the I/O port.
225 @return The value written back to the I/O port.
238 Reads a bit field in an 8-bit port, performs a bitwise AND, and writes the
239 result back to the bit field in the 8-bit port.
241 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
242 the read result and the value specified by AndData, and writes the result to
243 the 8-bit I/O port specified by Port. The value written to the I/O port is
244 returned. This function must guarantee that all I/O read and write operations
245 are serialized. Extra left bits in AndData are stripped.
247 If 8-bit I/O port operations are not supported, then ASSERT().
248 If StartBit is greater than 7, then ASSERT().
249 If EndBit is greater than 7, then ASSERT().
250 If EndBit is less than or equal to StartBit, then ASSERT().
252 @param Port The I/O port to write.
253 @param StartBit The ordinal of the least significant bit in the bit field.
255 @param EndBit The ordinal of the most significant bit in the bit field.
257 @param AndData The value to AND with the read value from the I/O port.
259 @return The value written back to the I/O port.
272 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
273 bitwise inclusive OR, and writes the result back to the bit field in the
276 Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed
277 by a bitwise inclusive OR between the read result and the value specified by
278 AndData, and writes the result to the 8-bit I/O port specified by Port. The
279 value written to the I/O port is returned. This function must guarantee that
280 all I/O read and write operations are serialized. Extra left bits in both
281 AndData and OrData are stripped.
283 If 8-bit I/O port operations are not supported, then ASSERT().
284 If StartBit is greater than 7, then ASSERT().
285 If EndBit is greater than 7, then ASSERT().
286 If EndBit is less than or equal to StartBit, then ASSERT().
288 @param Port The I/O port to write.
289 @param StartBit The ordinal of the least significant bit in the bit field.
291 @param EndBit The ordinal of the most significant bit in the bit field.
293 @param AndData The value to AND with the read value from the I/O port.
294 @param OrData The value to OR with the result of the AND operation.
296 @return The value written back to the I/O port.
301 IoBitFieldAndThenOr8 (
310 Reads a 16-bit I/O port.
312 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
313 This function must guarantee that all I/O read and write operations are
316 If 16-bit I/O port operations are not supported, then ASSERT().
318 @param Port The I/O port to read.
320 @return The value read.
330 Writes a 16-bit I/O port.
332 Writes the 16-bit I/O port specified by Port with the value specified by Value
333 and returns Value. This function must guarantee that all I/O read and write
334 operations are serialized.
336 If 16-bit I/O port operations are not supported, then ASSERT().
338 @param Port The I/O port to write.
339 @param Value The value to write to the I/O port.
341 @return The value written the I/O port.
352 Reads a 16-bit I/O port, performs a bitwise inclusive OR, and writes the
353 result back to the 16-bit I/O port.
355 Reads the 16-bit I/O port specified by Port, performs a bitwise inclusive OR
356 between the read result and the value specified by OrData, and writes the
357 result to the 16-bit I/O port specified by Port. The value written to the I/O
358 port is returned. This function must guarantee that all I/O read and write
359 operations are serialized.
361 If 16-bit I/O port operations are not supported, then ASSERT().
363 @param Port The I/O port to write.
364 @param OrData The value to OR with the read value from the I/O port.
366 @return The value written back to the I/O port.
377 Reads a 16-bit I/O port, performs a bitwise AND, and writes the result back
378 to the 16-bit I/O port.
380 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
381 the read result and the value specified by AndData, and writes the result to
382 the 16-bit I/O port specified by Port. The value written to the I/O port is
383 returned. This function must guarantee that all I/O read and write operations
386 If 16-bit I/O port operations are not supported, then ASSERT().
388 @param Port The I/O port to write.
389 @param AndData The value to AND with the read value from the I/O port.
391 @return The value written back to the I/O port.
402 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
403 inclusive OR, and writes the result back to the 16-bit I/O port.
405 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
406 the read result and the value specified by AndData, performs a bitwise OR
407 between the result of the AND operation and the value specified by OrData,
408 and writes the result to the 16-bit I/O port specified by Port. The value
409 written to the I/O port is returned. This function must guarantee that all
410 I/O read and write operations are serialized.
412 If 16-bit I/O port operations are not supported, then ASSERT().
414 @param Port The I/O port to write.
415 @param AndData The value to AND with the read value from the I/O port.
416 @param OrData The value to OR with the result of the AND operation.
418 @return The value written back to the I/O port.
430 Reads a bit field of an I/O register.
432 Reads the bit field in a 16-bit I/O register. The bit field is specified by
433 the StartBit and the EndBit. The value of the bit field is returned.
435 If 16-bit I/O port operations are not supported, then ASSERT().
436 If StartBit is greater than 15, then ASSERT().
437 If EndBit is greater than 15, then ASSERT().
438 If EndBit is less than or equal to StartBit, then ASSERT().
440 @param Port The I/O port to read.
441 @param StartBit The ordinal of the least significant bit in the bit field.
443 @param EndBit The ordinal of the most significant bit in the bit field.
446 @return The value read.
458 Writes a bit field to an I/O register.
460 Writes Value to the bit field of the I/O register. The bit field is specified
461 by the StartBit and the EndBit. All other bits in the destination I/O
462 register are preserved. The value written to the I/O port is returned. Extra
463 left bits in Value are stripped.
465 If 16-bit I/O port operations are not supported, then ASSERT().
466 If StartBit is greater than 15, then ASSERT().
467 If EndBit is greater than 15, then ASSERT().
468 If EndBit is less than or equal to StartBit, then ASSERT().
470 @param Port The I/O port to write.
471 @param StartBit The ordinal of the least significant bit in the bit field.
473 @param EndBit The ordinal of the most significant bit in the bit field.
475 @param Value New value of the bit field.
477 @return The value written back to the I/O port.
490 Reads a bit field in a 16-bit port, performs a bitwise OR, and writes the
491 result back to the bit field in the 16-bit port.
493 Reads the 16-bit I/O port specified by Port, performs a bitwise inclusive OR
494 between the read result and the value specified by OrData, and writes the
495 result to the 16-bit I/O port specified by Port. The value written to the I/O
496 port is returned. This function must guarantee that all I/O read and write
497 operations are serialized. Extra left bits in OrData are stripped.
499 If 16-bit I/O port operations are not supported, then ASSERT().
500 If StartBit is greater than 15, then ASSERT().
501 If EndBit is greater than 15, then ASSERT().
502 If EndBit is less than or equal to StartBit, then ASSERT().
504 @param Port The I/O port to write.
505 @param StartBit The ordinal of the least significant bit in the bit field.
507 @param EndBit The ordinal of the most significant bit in the bit field.
509 @param OrData The value to OR with the read value from the I/O port.
511 @return The value written back to the I/O port.
524 Reads a bit field in a 16-bit port, performs a bitwise AND, and writes the
525 result back to the bit field in the 16-bit port.
527 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
528 the read result and the value specified by AndData, and writes the result to
529 the 16-bit I/O port specified by Port. The value written to the I/O port is
530 returned. This function must guarantee that all I/O read and write operations
531 are serialized. Extra left bits in AndData are stripped.
533 If 16-bit I/O port operations are not supported, then ASSERT().
534 If StartBit is greater than 15, then ASSERT().
535 If EndBit is greater than 15, then ASSERT().
536 If EndBit is less than or equal to StartBit, then ASSERT().
538 @param Port The I/O port to write.
539 @param StartBit The ordinal of the least significant bit in the bit field.
541 @param EndBit The ordinal of the most significant bit in the bit field.
543 @param AndData The value to AND with the read value from the I/O port.
545 @return The value written back to the I/O port.
558 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
559 bitwise inclusive OR, and writes the result back to the bit field in the
562 Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed
563 by a bitwise inclusive OR between the read result and the value specified by
564 AndData, and writes the result to the 16-bit I/O port specified by Port. The
565 value written to the I/O port is returned. This function must guarantee that
566 all I/O read and write operations are serialized. Extra left bits in both
567 AndData and OrData are stripped.
569 If 16-bit I/O port operations are not supported, then ASSERT().
570 If StartBit is greater than 15, then ASSERT().
571 If EndBit is greater than 15, then ASSERT().
572 If EndBit is less than or equal to StartBit, then ASSERT().
574 @param Port The I/O port to write.
575 @param StartBit The ordinal of the least significant bit in the bit field.
577 @param EndBit The ordinal of the most significant bit in the bit field.
579 @param AndData The value to AND with the read value from the I/O port.
580 @param OrData The value to OR with the result of the AND operation.
582 @return The value written back to the I/O port.
587 IoBitFieldAndThenOr16 (
596 Reads a 32-bit I/O port.
598 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
599 This function must guarantee that all I/O read and write operations are
602 If 32-bit I/O port operations are not supported, then ASSERT().
604 @param Port The I/O port to read.
606 @return The value read.
616 Writes a 32-bit I/O port.
618 Writes the 32-bit I/O port specified by Port with the value specified by Value
619 and returns Value. This function must guarantee that all I/O read and write
620 operations are serialized.
622 If 32-bit I/O port operations are not supported, then ASSERT().
624 @param Port The I/O port to write.
625 @param Value The value to write to the I/O port.
627 @return The value written the I/O port.
638 Reads a 32-bit I/O port, performs a bitwise inclusive OR, and writes the
639 result back to the 32-bit I/O port.
641 Reads the 32-bit I/O port specified by Port, performs a bitwise inclusive OR
642 between the read result and the value specified by OrData, and writes the
643 result to the 32-bit I/O port specified by Port. The value written to the I/O
644 port is returned. This function must guarantee that all I/O read and write
645 operations are serialized.
647 If 32-bit I/O port operations are not supported, then ASSERT().
649 @param Port The I/O port to write.
650 @param OrData The value to OR with the read value from the I/O port.
652 @return The value written back to the I/O port.
663 Reads a 32-bit I/O port, performs a bitwise AND, and writes the result back
664 to the 32-bit I/O port.
666 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
667 the read result and the value specified by AndData, and writes the result to
668 the 32-bit I/O port specified by Port. The value written to the I/O port is
669 returned. This function must guarantee that all I/O read and write operations
672 If 32-bit I/O port operations are not supported, then ASSERT().
674 @param Port The I/O port to write.
675 @param AndData The value to AND with the read value from the I/O port.
677 @return The value written back to the I/O port.
688 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
689 inclusive OR, and writes the result back to the 32-bit I/O port.
691 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
692 the read result and the value specified by AndData, performs a bitwise OR
693 between the result of the AND operation and the value specified by OrData,
694 and writes the result to the 32-bit I/O port specified by Port. The value
695 written to the I/O port is returned. This function must guarantee that all
696 I/O read and write operations are serialized.
698 If 32-bit I/O port operations are not supported, then ASSERT().
700 @param Port The I/O port to write.
701 @param AndData The value to AND with the read value from the I/O port.
702 @param OrData The value to OR with the result of the AND operation.
704 @return The value written back to the I/O port.
716 Reads a bit field of an I/O register.
718 Reads the bit field in a 32-bit I/O register. The bit field is specified by
719 the StartBit and the EndBit. The value of the bit field is returned.
721 If 32-bit I/O port operations are not supported, then ASSERT().
722 If StartBit is greater than 31, then ASSERT().
723 If EndBit is greater than 31, then ASSERT().
724 If EndBit is less than or equal to StartBit, then ASSERT().
726 @param Port The I/O port to read.
727 @param StartBit The ordinal of the least significant bit in the bit field.
729 @param EndBit The ordinal of the most significant bit in the bit field.
732 @return The value read.
744 Writes a bit field to an I/O register.
746 Writes Value to the bit field of the I/O register. The bit field is specified
747 by the StartBit and the EndBit. All other bits in the destination I/O
748 register are preserved. The value written to the I/O port is returned. Extra
749 left bits in Value are stripped.
751 If 32-bit I/O port operations are not supported, then ASSERT().
752 If StartBit is greater than 31, then ASSERT().
753 If EndBit is greater than 31, then ASSERT().
754 If EndBit is less than or equal to StartBit, then ASSERT().
756 @param Port The I/O port to write.
757 @param StartBit The ordinal of the least significant bit in the bit field.
759 @param EndBit The ordinal of the most significant bit in the bit field.
761 @param Value New value of the bit field.
763 @return The value written back to the I/O port.
776 Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the
777 result back to the bit field in the 32-bit port.
779 Reads the 32-bit I/O port specified by Port, performs a bitwise inclusive OR
780 between the read result and the value specified by OrData, and writes the
781 result to the 32-bit I/O port specified by Port. The value written to the I/O
782 port is returned. This function must guarantee that all I/O read and write
783 operations are serialized. Extra left bits in OrData are stripped.
785 If 32-bit I/O port operations are not supported, then ASSERT().
786 If StartBit is greater than 31, then ASSERT().
787 If EndBit is greater than 31, then ASSERT().
788 If EndBit is less than or equal to StartBit, then ASSERT().
790 @param Port The I/O port to write.
791 @param StartBit The ordinal of the least significant bit in the bit field.
793 @param EndBit The ordinal of the most significant bit in the bit field.
795 @param OrData The value to OR with the read value from the I/O port.
797 @return The value written back to the I/O port.
810 Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the
811 result back to the bit field in the 32-bit port.
813 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
814 the read result and the value specified by AndData, and writes the result to
815 the 32-bit I/O port specified by Port. The value written to the I/O port is
816 returned. This function must guarantee that all I/O read and write operations
817 are serialized. Extra left bits in AndData are stripped.
819 If 32-bit I/O port operations are not supported, then ASSERT().
820 If StartBit is greater than 31, then ASSERT().
821 If EndBit is greater than 31, then ASSERT().
822 If EndBit is less than or equal to StartBit, then ASSERT().
824 @param Port The I/O port to write.
825 @param StartBit The ordinal of the least significant bit in the bit field.
827 @param EndBit The ordinal of the most significant bit in the bit field.
829 @param AndData The value to AND with the read value from the I/O port.
831 @return The value written back to the I/O port.
844 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
845 bitwise inclusive OR, and writes the result back to the bit field in the
848 Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
849 by a bitwise inclusive OR between the read result and the value specified by
850 AndData, and writes the result to the 32-bit I/O port specified by Port. The
851 value written to the I/O port is returned. This function must guarantee that
852 all I/O read and write operations are serialized. Extra left bits in both
853 AndData and OrData are stripped.
855 If 32-bit I/O port operations are not supported, then ASSERT().
856 If StartBit is greater than 31, then ASSERT().
857 If EndBit is greater than 31, then ASSERT().
858 If EndBit is less than or equal to StartBit, then ASSERT().
860 @param Port The I/O port to write.
861 @param StartBit The ordinal of the least significant bit in the bit field.
863 @param EndBit The ordinal of the most significant bit in the bit field.
865 @param AndData The value to AND with the read value from the I/O port.
866 @param OrData The value to OR with the result of the AND operation.
868 @return The value written back to the I/O port.
873 IoBitFieldAndThenOr32 (
882 Reads a 64-bit I/O port.
884 Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
885 This function must guarantee that all I/O read and write operations are
888 If 64-bit I/O port operations are not supported, then ASSERT().
890 @param Port The I/O port to read.
892 @return The value read.
902 Writes a 64-bit I/O port.
904 Writes the 64-bit I/O port specified by Port with the value specified by Value
905 and returns Value. This function must guarantee that all I/O read and write
906 operations are serialized.
908 If 64-bit I/O port operations are not supported, then ASSERT().
910 @param Port The I/O port to write.
911 @param Value The value to write to the I/O port.
913 @return The value written the I/O port.
924 Reads a 64-bit I/O port, performs a bitwise inclusive OR, and writes the
925 result back to the 64-bit I/O port.
927 Reads the 64-bit I/O port specified by Port, performs a bitwise inclusive OR
928 between the read result and the value specified by OrData, and writes the
929 result to the 64-bit I/O port specified by Port. The value written to the I/O
930 port is returned. This function must guarantee that all I/O read and write
931 operations are serialized.
933 If 64-bit I/O port operations are not supported, then ASSERT().
935 @param Port The I/O port to write.
936 @param OrData The value to OR with the read value from the I/O port.
938 @return The value written back to the I/O port.
949 Reads a 64-bit I/O port, performs a bitwise AND, and writes the result back
950 to the 64-bit I/O port.
952 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
953 the read result and the value specified by AndData, and writes the result to
954 the 64-bit I/O port specified by Port. The value written to the I/O port is
955 returned. This function must guarantee that all I/O read and write operations
958 If 64-bit I/O port operations are not supported, then ASSERT().
960 @param Port The I/O port to write.
961 @param AndData The value to AND with the read value from the I/O port.
963 @return The value written back to the I/O port.
974 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
975 inclusive OR, and writes the result back to the 64-bit I/O port.
977 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
978 the read result and the value specified by AndData, performs a bitwise OR
979 between the result of the AND operation and the value specified by OrData,
980 and writes the result to the 64-bit I/O port specified by Port. The value
981 written to the I/O port is returned. This function must guarantee that all
982 I/O read and write operations are serialized.
984 If 64-bit I/O port operations are not supported, then ASSERT().
986 @param Port The I/O port to write.
987 @param AndData The value to AND with the read value from the I/O port.
988 @param OrData The value to OR with the result of the AND operation.
990 @return The value written back to the I/O port.
1002 Reads a bit field of an I/O register.
1004 Reads the bit field in a 64-bit I/O register. The bit field is specified by
1005 the StartBit and the EndBit. The value of the bit field is returned.
1007 If 64-bit I/O port operations are not supported, then ASSERT().
1008 If StartBit is greater than 63, then ASSERT().
1009 If EndBit is greater than 63, then ASSERT().
1010 If EndBit is less than or equal to StartBit, then ASSERT().
1012 @param Port The I/O port to read.
1013 @param StartBit The ordinal of the least significant bit in the bit field.
1015 @param EndBit The ordinal of the most significant bit in the bit field.
1018 @return The value read.
1030 Writes a bit field to an I/O register.
1032 Writes Value to the bit field of the I/O register. The bit field is specified
1033 by the StartBit and the EndBit. All other bits in the destination I/O
1034 register are preserved. The value written to the I/O port is returned. Extra
1035 left bits in Value are stripped.
1037 If 64-bit I/O port operations are not supported, then ASSERT().
1038 If StartBit is greater than 63, then ASSERT().
1039 If EndBit is greater than 63, then ASSERT().
1040 If EndBit is less than or equal to StartBit, then ASSERT().
1042 @param Port The I/O port to write.
1043 @param StartBit The ordinal of the least significant bit in the bit field.
1045 @param EndBit The ordinal of the most significant bit in the bit field.
1047 @param Value New value of the bit field.
1049 @return The value written back to the I/O port.
1062 Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the
1063 result back to the bit field in the 64-bit port.
1065 Reads the 64-bit I/O port specified by Port, performs a bitwise inclusive OR
1066 between the read result and the value specified by OrData, and writes the
1067 result to the 64-bit I/O port specified by Port. The value written to the I/O
1068 port is returned. This function must guarantee that all I/O read and write
1069 operations are serialized. Extra left bits in OrData are stripped.
1071 If 64-bit I/O port operations are not supported, then ASSERT().
1072 If StartBit is greater than 63, then ASSERT().
1073 If EndBit is greater than 63, then ASSERT().
1074 If EndBit is less than or equal to StartBit, then ASSERT().
1076 @param Port The I/O port to write.
1077 @param StartBit The ordinal of the least significant bit in the bit field.
1079 @param EndBit The ordinal of the most significant bit in the bit field.
1081 @param OrData The value to OR with the read value from the I/O port.
1083 @return The value written back to the I/O port.
1096 Reads a bit field in a 64-bit port, performs a bitwise AND, and writes the
1097 result back to the bit field in the 64-bit port.
1099 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1100 the read result and the value specified by AndData, and writes the result to
1101 the 64-bit I/O port specified by Port. The value written to the I/O port is
1102 returned. This function must guarantee that all I/O read and write operations
1103 are serialized. Extra left bits in AndData are stripped.
1105 If 64-bit I/O port operations are not supported, then ASSERT().
1106 If StartBit is greater than 63, then ASSERT().
1107 If EndBit is greater than 63, then ASSERT().
1108 If EndBit is less than or equal to StartBit, then ASSERT().
1110 @param Port The I/O port to write.
1111 @param StartBit The ordinal of the least significant bit in the bit field.
1113 @param EndBit The ordinal of the most significant bit in the bit field.
1115 @param AndData The value to AND with the read value from the I/O port.
1117 @return The value written back to the I/O port.
1130 Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
1131 bitwise inclusive OR, and writes the result back to the bit field in the
1134 Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed
1135 by a bitwise inclusive OR between the read result and the value specified by
1136 AndData, and writes the result to the 64-bit I/O port specified by Port. The
1137 value written to the I/O port is returned. This function must guarantee that
1138 all I/O read and write operations are serialized. Extra left bits in both
1139 AndData and OrData are stripped.
1141 If 64-bit I/O port operations are not supported, then ASSERT().
1142 If StartBit is greater than 63, then ASSERT().
1143 If EndBit is greater than 63, then ASSERT().
1144 If EndBit is less than or equal to StartBit, then ASSERT().
1146 @param Port The I/O port to write.
1147 @param StartBit The ordinal of the least significant bit in the bit field.
1149 @param EndBit The ordinal of the most significant bit in the bit field.
1151 @param AndData The value to AND with the read value from the I/O port.
1152 @param OrData The value to OR with the result of the AND operation.
1154 @return The value written back to the I/O port.
1159 IoBitFieldAndThenOr64 (
1168 Reads an 8-bit MMIO register.
1170 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
1171 returned. This function must guarantee that all MMIO read and write
1172 operations are serialized.
1174 If 8-bit MMIO register operations are not supported, then ASSERT().
1176 @param Address The MMIO register to read.
1178 @return The value read.
1188 Writes an 8-bit MMIO register.
1190 Writes the 8-bit MMIO register specified by Address with the value specified
1191 by Value and returns Value. This function must guarantee that all MMIO read
1192 and write operations are serialized.
1194 If 8-bit MMIO register operations are not supported, then ASSERT().
1196 @param Address The MMIO register to write.
1197 @param Value The value to write to the MMIO register.
1208 Reads an 8-bit MMIO register, performs a bitwise inclusive OR, and writes the
1209 result back to the 8-bit MMIO register.
1211 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1212 inclusive OR between the read result and the value specified by OrData, and
1213 writes the result to the 8-bit MMIO register specified by Address. The value
1214 written to the MMIO register is returned. This function must guarantee that
1215 all MMIO read and write operations are serialized.
1217 If 8-bit MMIO register operations are not supported, then ASSERT().
1219 @param Address The MMIO register to write.
1220 @param OrData The value to OR with the read value from the MMIO register.
1222 @return The value written back to the MMIO register.
1233 Reads an 8-bit MMIO register, performs a bitwise AND, and writes the result
1234 back to the 8-bit MMIO register.
1236 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1237 between the read result and the value specified by AndData, and writes the
1238 result to the 8-bit MMIO register specified by Address. The value written to
1239 the MMIO register is returned. This function must guarantee that all MMIO
1240 read and write operations are serialized.
1242 If 8-bit MMIO register operations are not supported, then ASSERT().
1244 @param Address The MMIO register to write.
1245 @param AndData The value to AND with the read value from the MMIO register.
1247 @return The value written back to the MMIO register.
1258 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
1259 inclusive OR, and writes the result back to the 8-bit MMIO register.
1261 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1262 between the read result and the value specified by AndData, performs a
1263 bitwise OR between the result of the AND operation and the value specified by
1264 OrData, and writes the result to the 8-bit MMIO register specified by
1265 Address. The value written to the MMIO register is returned. This function
1266 must guarantee that all MMIO read and write operations are serialized.
1268 If 8-bit MMIO register operations are not supported, then ASSERT().
1271 @param Address The MMIO register to write.
1272 @param AndData The value to AND with the read value from the MMIO register.
1273 @param OrData The value to OR with the result of the AND operation.
1275 @return The value written back to the MMIO register.
1287 Reads a bit field of a MMIO register.
1289 Reads the bit field in an 8-bit MMIO register. The bit field is specified by
1290 the StartBit and the EndBit. The value of the bit field is returned.
1292 If 8-bit MMIO register operations are not supported, then ASSERT().
1293 If StartBit is greater than 7, then ASSERT().
1294 If EndBit is greater than 7, then ASSERT().
1295 If EndBit is less than or equal to StartBit, then ASSERT().
1297 @param Address MMIO register to read.
1298 @param StartBit The ordinal of the least significant bit in the bit field.
1300 @param EndBit The ordinal of the most significant bit in the bit field.
1303 @return The value read.
1315 Writes a bit field to a MMIO register.
1317 Writes Value to the bit field of the MMIO register. The bit field is
1318 specified by the StartBit and the EndBit. All other bits in the destination
1319 MMIO register are preserved. The new value of the 8-bit register is returned.
1321 If 8-bit MMIO register operations are not supported, then ASSERT().
1322 If StartBit is greater than 7, then ASSERT().
1323 If EndBit is greater than 7, then ASSERT().
1324 If EndBit is less than or equal to StartBit, then ASSERT().
1326 @param Address MMIO register to write.
1327 @param StartBit The ordinal of the least significant bit in the bit field.
1329 @param EndBit The ordinal of the most significant bit in the bit field.
1331 @param Value New value of the bit field.
1333 @return The value written back to the MMIO register.
1338 MmioBitFieldWrite8 (
1346 Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and
1347 writes the result back to the bit field in the 8-bit MMIO register.
1349 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1350 inclusive OR between the read result and the value specified by OrData, and
1351 writes the result to the 8-bit MMIO register specified by Address. The value
1352 written to the MMIO register is returned. This function must guarantee that
1353 all MMIO read and write operations are serialized. Extra left bits in OrData
1356 If 8-bit MMIO register operations are not supported, then ASSERT().
1357 If StartBit is greater than 7, then ASSERT().
1358 If EndBit is greater than 7, then ASSERT().
1359 If EndBit is less than or equal to StartBit, then ASSERT().
1361 @param Address MMIO register to write.
1362 @param StartBit The ordinal of the least significant bit in the bit field.
1364 @param EndBit The ordinal of the most significant bit in the bit field.
1366 @param OrData The value to OR with read value from the MMIO register.
1368 @return The value written back to the MMIO register.
1381 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and
1382 writes the result back to the bit field in the 8-bit MMIO register.
1384 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1385 between the read result and the value specified by AndData, and writes the
1386 result to the 8-bit MMIO register specified by Address. The value written to
1387 the MMIO register is returned. This function must guarantee that all MMIO
1388 read and write operations are serialized. Extra left bits in AndData are
1391 If 8-bit MMIO register operations are not supported, then ASSERT().
1392 If StartBit is greater than 7, then ASSERT().
1393 If EndBit is greater than 7, then ASSERT().
1394 If EndBit is less than or equal to StartBit, then ASSERT().
1396 @param Address MMIO register to write.
1397 @param StartBit The ordinal of the least significant bit in the bit field.
1399 @param EndBit The ordinal of the most significant bit in the bit field.
1401 @param AndData The value to AND with read value from the MMIO register.
1403 @return The value written back to the MMIO register.
1416 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed
1417 by a bitwise inclusive OR, and writes the result back to the bit field in the
1418 8-bit MMIO register.
1420 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1421 followed by a bitwise inclusive OR between the read result and the value
1422 specified by AndData, and writes the result to the 8-bit MMIO register
1423 specified by Address. The value written to the MMIO register is returned.
1424 This function must guarantee that all MMIO read and write operations are
1425 serialized. Extra left bits in both AndData and OrData are stripped.
1427 If 8-bit MMIO register operations are not supported, then ASSERT().
1428 If StartBit is greater than 7, then ASSERT().
1429 If EndBit is greater than 7, then ASSERT().
1430 If EndBit is less than or equal to StartBit, then ASSERT().
1432 @param Address MMIO register to write.
1433 @param StartBit The ordinal of the least significant bit in the bit field.
1435 @param EndBit The ordinal of the most significant bit in the bit field.
1437 @param AndData The value to AND with read value from the MMIO register.
1438 @param OrData The value to OR with the result of the AND operation.
1440 @return The value written back to the MMIO register.
1445 MmioBitFieldAndThenOr8 (
1454 Reads a 16-bit MMIO register.
1456 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
1457 returned. This function must guarantee that all MMIO read and write
1458 operations are serialized.
1460 If 16-bit MMIO register operations are not supported, then ASSERT().
1462 @param Address The MMIO register to read.
1464 @return The value read.
1474 Writes a 16-bit MMIO register.
1476 Writes the 16-bit MMIO register specified by Address with the value specified
1477 by Value and returns Value. This function must guarantee that all MMIO read
1478 and write operations are serialized.
1480 If 16-bit MMIO register operations are not supported, then ASSERT().
1482 @param Address The MMIO register to write.
1483 @param Value The value to write to the MMIO register.
1494 Reads a 16-bit MMIO register, performs a bitwise inclusive OR, and writes the
1495 result back to the 16-bit MMIO register.
1497 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1498 inclusive OR between the read result and the value specified by OrData, and
1499 writes the result to the 16-bit MMIO register specified by Address. The value
1500 written to the MMIO register is returned. This function must guarantee that
1501 all MMIO read and write operations are serialized.
1503 If 16-bit MMIO register operations are not supported, then ASSERT().
1505 @param Address The MMIO register to write.
1506 @param OrData The value to OR with the read value from the MMIO register.
1508 @return The value written back to the MMIO register.
1519 Reads a 16-bit MMIO register, performs a bitwise AND, and writes the result
1520 back to the 16-bit MMIO register.
1522 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1523 between the read result and the value specified by AndData, and writes the
1524 result to the 16-bit MMIO register specified by Address. The value written to
1525 the MMIO register is returned. This function must guarantee that all MMIO
1526 read and write operations are serialized.
1528 If 16-bit MMIO register operations are not supported, then ASSERT().
1530 @param Address The MMIO register to write.
1531 @param AndData The value to AND with the read value from the MMIO register.
1533 @return The value written back to the MMIO register.
1544 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
1545 inclusive OR, and writes the result back to the 16-bit MMIO register.
1547 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1548 between the read result and the value specified by AndData, performs a
1549 bitwise OR between the result of the AND operation and the value specified by
1550 OrData, and writes the result to the 16-bit MMIO register specified by
1551 Address. The value written to the MMIO register is returned. This function
1552 must guarantee that all MMIO read and write operations are serialized.
1554 If 16-bit MMIO register operations are not supported, then ASSERT().
1557 @param Address The MMIO register to write.
1558 @param AndData The value to AND with the read value from the MMIO register.
1559 @param OrData The value to OR with the result of the AND operation.
1561 @return The value written back to the MMIO register.
1573 Reads a bit field of a MMIO register.
1575 Reads the bit field in a 16-bit MMIO register. The bit field is specified by
1576 the StartBit and the EndBit. The value of the bit field is returned.
1578 If 16-bit MMIO register operations are not supported, then ASSERT().
1579 If StartBit is greater than 15, then ASSERT().
1580 If EndBit is greater than 15, then ASSERT().
1581 If EndBit is less than or equal to StartBit, then ASSERT().
1583 @param Address MMIO register to read.
1584 @param StartBit The ordinal of the least significant bit in the bit field.
1586 @param EndBit The ordinal of the most significant bit in the bit field.
1589 @return The value read.
1594 MmioBitFieldRead16 (
1601 Writes a bit field to a MMIO register.
1603 Writes Value to the bit field of the MMIO register. The bit field is
1604 specified by the StartBit and the EndBit. All other bits in the destination
1605 MMIO register are preserved. The new value of the 16-bit register is returned.
1607 If 16-bit MMIO register operations are not supported, then ASSERT().
1608 If StartBit is greater than 15, then ASSERT().
1609 If EndBit is greater than 15, then ASSERT().
1610 If EndBit is less than or equal to StartBit, then ASSERT().
1612 @param Address MMIO register to write.
1613 @param StartBit The ordinal of the least significant bit in the bit field.
1615 @param EndBit The ordinal of the most significant bit in the bit field.
1617 @param Value New value of the bit field.
1619 @return The value written back to the MMIO register.
1624 MmioBitFieldWrite16 (
1632 Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
1633 writes the result back to the bit field in the 16-bit MMIO register.
1635 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1636 inclusive OR between the read result and the value specified by OrData, and
1637 writes the result to the 16-bit MMIO register specified by Address. The value
1638 written to the MMIO register is returned. This function must guarantee that
1639 all MMIO read and write operations are serialized. Extra left bits in OrData
1642 If 16-bit MMIO register operations are not supported, then ASSERT().
1643 If StartBit is greater than 15, then ASSERT().
1644 If EndBit is greater than 15, then ASSERT().
1645 If EndBit is less than or equal to StartBit, then ASSERT().
1647 @param Address MMIO register to write.
1648 @param StartBit The ordinal of the least significant bit in the bit field.
1650 @param EndBit The ordinal of the most significant bit in the bit field.
1652 @param OrData The value to OR with read value from the MMIO register.
1654 @return The value written back to the MMIO register.
1667 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
1668 writes the result back to the bit field in the 16-bit MMIO register.
1670 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1671 between the read result and the value specified by AndData, and writes the
1672 result to the 16-bit MMIO register specified by Address. The value written to
1673 the MMIO register is returned. This function must guarantee that all MMIO
1674 read and write operations are serialized. Extra left bits in AndData are
1677 If 16-bit MMIO register operations are not supported, then ASSERT().
1678 If StartBit is greater than 15, then ASSERT().
1679 If EndBit is greater than 15, then ASSERT().
1680 If EndBit is less than or equal to StartBit, then ASSERT().
1682 @param Address MMIO register to write.
1683 @param StartBit The ordinal of the least significant bit in the bit field.
1685 @param EndBit The ordinal of the most significant bit in the bit field.
1687 @param AndData The value to AND with read value from the MMIO register.
1689 @return The value written back to the MMIO register.
1702 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed
1703 by a bitwise inclusive OR, and writes the result back to the bit field in the
1704 16-bit MMIO register.
1706 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1707 followed by a bitwise inclusive OR between the read result and the value
1708 specified by AndData, and writes the result to the 16-bit MMIO register
1709 specified by Address. The value written to the MMIO register is returned.
1710 This function must guarantee that all MMIO read and write operations are
1711 serialized. Extra left bits in both AndData and OrData are stripped.
1713 If 16-bit MMIO register operations are not supported, then ASSERT().
1714 If StartBit is greater than 15, then ASSERT().
1715 If EndBit is greater than 15, then ASSERT().
1716 If EndBit is less than or equal to StartBit, then ASSERT().
1718 @param Address MMIO register to write.
1719 @param StartBit The ordinal of the least significant bit in the bit field.
1721 @param EndBit The ordinal of the most significant bit in the bit field.
1723 @param AndData The value to AND with read value from the MMIO register.
1724 @param OrData The value to OR with the result of the AND operation.
1726 @return The value written back to the MMIO register.
1731 MmioBitFieldAndThenOr16 (
1740 Reads a 32-bit MMIO register.
1742 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
1743 returned. This function must guarantee that all MMIO read and write
1744 operations are serialized.
1746 If 32-bit MMIO register operations are not supported, then ASSERT().
1748 @param Address The MMIO register to read.
1750 @return The value read.
1760 Writes a 32-bit MMIO register.
1762 Writes the 32-bit MMIO register specified by Address with the value specified
1763 by Value and returns Value. This function must guarantee that all MMIO read
1764 and write operations are serialized.
1766 If 32-bit MMIO register operations are not supported, then ASSERT().
1768 @param Address The MMIO register to write.
1769 @param Value The value to write to the MMIO register.
1780 Reads a 32-bit MMIO register, performs a bitwise inclusive OR, and writes the
1781 result back to the 32-bit MMIO register.
1783 Reads the 32-bit MMIO register specified by Address, performs a bitwise
1784 inclusive OR between the read result and the value specified by OrData, and
1785 writes the result to the 32-bit MMIO register specified by Address. The value
1786 written to the MMIO register is returned. This function must guarantee that
1787 all MMIO read and write operations are serialized.
1789 If 32-bit MMIO register operations are not supported, then ASSERT().
1791 @param Address The MMIO register to write.
1792 @param OrData The value to OR with the read value from the MMIO register.
1794 @return The value written back to the MMIO register.
1805 Reads a 32-bit MMIO register, performs a bitwise AND, and writes the result
1806 back to the 32-bit MMIO register.
1808 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1809 between the read result and the value specified by AndData, and writes the
1810 result to the 32-bit MMIO register specified by Address. The value written to
1811 the MMIO register is returned. This function must guarantee that all MMIO
1812 read and write operations are serialized.
1814 If 32-bit MMIO register operations are not supported, then ASSERT().
1816 @param Address The MMIO register to write.
1817 @param AndData The value to AND with the read value from the MMIO register.
1819 @return The value written back to the MMIO register.
1830 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
1831 inclusive OR, and writes the result back to the 32-bit MMIO register.
1833 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1834 between the read result and the value specified by AndData, performs a
1835 bitwise OR between the result of the AND operation and the value specified by
1836 OrData, and writes the result to the 32-bit MMIO register specified by
1837 Address. The value written to the MMIO register is returned. This function
1838 must guarantee that all MMIO read and write operations are serialized.
1840 If 32-bit MMIO register operations are not supported, then ASSERT().
1843 @param Address The MMIO register to write.
1844 @param AndData The value to AND with the read value from the MMIO register.
1845 @param OrData The value to OR with the result of the AND operation.
1847 @return The value written back to the MMIO register.
1859 Reads a bit field of a MMIO register.
1861 Reads the bit field in a 32-bit MMIO register. The bit field is specified by
1862 the StartBit and the EndBit. The value of the bit field is returned.
1864 If 32-bit MMIO register operations are not supported, then ASSERT().
1865 If StartBit is greater than 31, then ASSERT().
1866 If EndBit is greater than 31, then ASSERT().
1867 If EndBit is less than or equal to StartBit, then ASSERT().
1869 @param Address MMIO register to read.
1870 @param StartBit The ordinal of the least significant bit in the bit field.
1872 @param EndBit The ordinal of the most significant bit in the bit field.
1875 @return The value read.
1880 MmioBitFieldRead32 (
1887 Writes a bit field to a MMIO register.
1889 Writes Value to the bit field of the MMIO register. The bit field is
1890 specified by the StartBit and the EndBit. All other bits in the destination
1891 MMIO register are preserved. The new value of the 32-bit register is returned.
1893 If 32-bit MMIO register operations are not supported, then ASSERT().
1894 If StartBit is greater than 31, then ASSERT().
1895 If EndBit is greater than 31, then ASSERT().
1896 If EndBit is less than or equal to StartBit, then ASSERT().
1898 @param Address MMIO register to write.
1899 @param StartBit The ordinal of the least significant bit in the bit field.
1901 @param EndBit The ordinal of the most significant bit in the bit field.
1903 @param Value New value of the bit field.
1905 @return The value written back to the MMIO register.
1910 MmioBitFieldWrite32 (
1918 Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
1919 writes the result back to the bit field in the 32-bit MMIO register.
1921 Reads the 32-bit MMIO register specified by Address, performs a bitwise
1922 inclusive OR between the read result and the value specified by OrData, and
1923 writes the result to the 32-bit MMIO register specified by Address. The value
1924 written to the MMIO register is returned. This function must guarantee that
1925 all MMIO read and write operations are serialized. Extra left bits in OrData
1928 If 32-bit MMIO register operations are not supported, then ASSERT().
1929 If StartBit is greater than 31, then ASSERT().
1930 If EndBit is greater than 31, then ASSERT().
1931 If EndBit is less than or equal to StartBit, then ASSERT().
1933 @param Address MMIO register to write.
1934 @param StartBit The ordinal of the least significant bit in the bit field.
1936 @param EndBit The ordinal of the most significant bit in the bit field.
1938 @param OrData The value to OR with read value from the MMIO register.
1940 @return The value written back to the MMIO register.
1953 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
1954 writes the result back to the bit field in the 32-bit MMIO register.
1956 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1957 between the read result and the value specified by AndData, and writes the
1958 result to the 32-bit MMIO register specified by Address. The value written to
1959 the MMIO register is returned. This function must guarantee that all MMIO
1960 read and write operations are serialized. Extra left bits in AndData are
1963 If 32-bit MMIO register operations are not supported, then ASSERT().
1964 If StartBit is greater than 31, then ASSERT().
1965 If EndBit is greater than 31, then ASSERT().
1966 If EndBit is less than or equal to StartBit, then ASSERT().
1968 @param Address MMIO register to write.
1969 @param StartBit The ordinal of the least significant bit in the bit field.
1971 @param EndBit The ordinal of the most significant bit in the bit field.
1973 @param AndData The value to AND with read value from the MMIO register.
1975 @return The value written back to the MMIO register.
1988 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed
1989 by a bitwise inclusive OR, and writes the result back to the bit field in the
1990 32-bit MMIO register.
1992 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1993 followed by a bitwise inclusive OR between the read result and the value
1994 specified by AndData, and writes the result to the 32-bit MMIO register
1995 specified by Address. The value written to the MMIO register is returned.
1996 This function must guarantee that all MMIO read and write operations are
1997 serialized. Extra left bits in both AndData and OrData are stripped.
1999 If 32-bit MMIO register operations are not supported, then ASSERT().
2000 If StartBit is greater than 31, then ASSERT().
2001 If EndBit is greater than 31, then ASSERT().
2002 If EndBit is less than or equal to StartBit, then ASSERT().
2004 @param Address MMIO register to write.
2005 @param StartBit The ordinal of the least significant bit in the bit field.
2007 @param EndBit The ordinal of the most significant bit in the bit field.
2009 @param AndData The value to AND with read value from the MMIO register.
2010 @param OrData The value to OR with the result of the AND operation.
2012 @return The value written back to the MMIO register.
2017 MmioBitFieldAndThenOr32 (
2026 Reads a 64-bit MMIO register.
2028 Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
2029 returned. This function must guarantee that all MMIO read and write
2030 operations are serialized.
2032 If 64-bit MMIO register operations are not supported, then ASSERT().
2034 @param Address The MMIO register to read.
2036 @return The value read.
2046 Writes a 64-bit MMIO register.
2048 Writes the 64-bit MMIO register specified by Address with the value specified
2049 by Value and returns Value. This function must guarantee that all MMIO read
2050 and write operations are serialized.
2052 If 64-bit MMIO register operations are not supported, then ASSERT().
2054 @param Address The MMIO register to write.
2055 @param Value The value to write to the MMIO register.
2066 Reads a 64-bit MMIO register, performs a bitwise inclusive OR, and writes the
2067 result back to the 64-bit MMIO register.
2069 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2070 inclusive OR between the read result and the value specified by OrData, and
2071 writes the result to the 64-bit MMIO register specified by Address. The value
2072 written to the MMIO register is returned. This function must guarantee that
2073 all MMIO read and write operations are serialized.
2075 If 64-bit MMIO register operations are not supported, then ASSERT().
2077 @param Address The MMIO register to write.
2078 @param OrData The value to OR with the read value from the MMIO register.
2080 @return The value written back to the MMIO register.
2091 Reads a 64-bit MMIO register, performs a bitwise AND, and writes the result
2092 back to the 64-bit MMIO register.
2094 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2095 between the read result and the value specified by AndData, and writes the
2096 result to the 64-bit MMIO register specified by Address. The value written to
2097 the MMIO register is returned. This function must guarantee that all MMIO
2098 read and write operations are serialized.
2100 If 64-bit MMIO register operations are not supported, then ASSERT().
2102 @param Address The MMIO register to write.
2103 @param AndData The value to AND with the read value from the MMIO register.
2105 @return The value written back to the MMIO register.
2116 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
2117 inclusive OR, and writes the result back to the 64-bit MMIO register.
2119 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2120 between the read result and the value specified by AndData, performs a
2121 bitwise OR between the result of the AND operation and the value specified by
2122 OrData, and writes the result to the 64-bit MMIO register specified by
2123 Address. The value written to the MMIO register is returned. This function
2124 must guarantee that all MMIO read and write operations are serialized.
2126 If 64-bit MMIO register operations are not supported, then ASSERT().
2129 @param Address The MMIO register to write.
2130 @param AndData The value to AND with the read value from the MMIO register.
2131 @param OrData The value to OR with the result of the AND operation.
2133 @return The value written back to the MMIO register.
2145 Reads a bit field of a MMIO register.
2147 Reads the bit field in a 64-bit MMIO register. The bit field is specified by
2148 the StartBit and the EndBit. The value of the bit field is returned.
2150 If 64-bit MMIO register operations are not supported, then ASSERT().
2151 If StartBit is greater than 63, then ASSERT().
2152 If EndBit is greater than 63, then ASSERT().
2153 If EndBit is less than or equal to StartBit, then ASSERT().
2155 @param Address MMIO register to read.
2156 @param StartBit The ordinal of the least significant bit in the bit field.
2158 @param EndBit The ordinal of the most significant bit in the bit field.
2161 @return The value read.
2166 MmioBitFieldRead64 (
2173 Writes a bit field to a MMIO register.
2175 Writes Value to the bit field of the MMIO register. The bit field is
2176 specified by the StartBit and the EndBit. All other bits in the destination
2177 MMIO register are preserved. The new value of the 64-bit register is returned.
2179 If 64-bit MMIO register operations are not supported, then ASSERT().
2180 If StartBit is greater than 63, then ASSERT().
2181 If EndBit is greater than 63, then ASSERT().
2182 If EndBit is less than or equal to StartBit, then ASSERT().
2184 @param Address MMIO register to write.
2185 @param StartBit The ordinal of the least significant bit in the bit field.
2187 @param EndBit The ordinal of the most significant bit in the bit field.
2189 @param Value New value of the bit field.
2191 @return The value written back to the MMIO register.
2196 MmioBitFieldWrite64 (
2204 Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
2205 writes the result back to the bit field in the 64-bit MMIO register.
2207 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2208 inclusive OR between the read result and the value specified by OrData, and
2209 writes the result to the 64-bit MMIO register specified by Address. The value
2210 written to the MMIO register is returned. This function must guarantee that
2211 all MMIO read and write operations are serialized. Extra left bits in OrData
2214 If 64-bit MMIO register operations are not supported, then ASSERT().
2215 If StartBit is greater than 63, then ASSERT().
2216 If EndBit is greater than 63, then ASSERT().
2217 If EndBit is less than or equal to StartBit, then ASSERT().
2219 @param Address MMIO register to write.
2220 @param StartBit The ordinal of the least significant bit in the bit field.
2222 @param EndBit The ordinal of the most significant bit in the bit field.
2224 @param OrData The value to OR with read value from the MMIO register.
2226 @return The value written back to the MMIO register.
2239 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and
2240 writes the result back to the bit field in the 64-bit MMIO register.
2242 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2243 between the read result and the value specified by AndData, and writes the
2244 result to the 64-bit MMIO register specified by Address. The value written to
2245 the MMIO register is returned. This function must guarantee that all MMIO
2246 read and write operations are serialized. Extra left bits in AndData are
2249 If 64-bit MMIO register operations are not supported, then ASSERT().
2250 If StartBit is greater than 63, then ASSERT().
2251 If EndBit is greater than 63, then ASSERT().
2252 If EndBit is less than or equal to StartBit, then ASSERT().
2254 @param Address MMIO register to write.
2255 @param StartBit The ordinal of the least significant bit in the bit field.
2257 @param EndBit The ordinal of the most significant bit in the bit field.
2259 @param AndData The value to AND with read value from the MMIO register.
2261 @return The value written back to the MMIO register.
2274 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed
2275 by a bitwise inclusive OR, and writes the result back to the bit field in the
2276 64-bit MMIO register.
2278 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2279 followed by a bitwise inclusive OR between the read result and the value
2280 specified by AndData, and writes the result to the 64-bit MMIO register
2281 specified by Address. The value written to the MMIO register is returned.
2282 This function must guarantee that all MMIO read and write operations are
2283 serialized. Extra left bits in both AndData and OrData are stripped.
2285 If 64-bit MMIO register operations are not supported, then ASSERT().
2286 If StartBit is greater than 63, then ASSERT().
2287 If EndBit is greater than 63, then ASSERT().
2288 If EndBit is less than or equal to StartBit, then ASSERT().
2290 @param Address MMIO register to write.
2291 @param StartBit The ordinal of the least significant bit in the bit field.
2293 @param EndBit The ordinal of the most significant bit in the bit field.
2295 @param AndData The value to AND with read value from the MMIO register.
2296 @param OrData The value to OR with the result of the AND operation.
2298 @return The value written back to the MMIO register.
2303 MmioBitFieldAndThenOr64 (