]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/IoLib.h
2 Provide services to access I/O Ports and MMIO registers.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
15 Macro that converts PCI Segment and I/O Port to an address that can be
16 passed to the I/O Library functions.
18 Computes an address that is compatible with the I/O Library functions.
19 The unused upper bits of Segment, and Port are stripped prior to the
20 generation of the address.
22 @param Segment PCI Segment number. Range 0..65535.
23 @param Port I/O Port number. Range 0..65535.
25 @return An address that the I/o Library functions need.
29 #define IO_LIB_ADDRESS(Segment,Port) \
30 ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) )
33 Reads an 8-bit I/O port.
35 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
36 This function must guarantee that all I/O read and write operations are
39 If 8-bit I/O port operations are not supported, then ASSERT().
41 @param Port The I/O port to read.
43 @return The value read.
53 Writes an 8-bit I/O port.
55 Writes the 8-bit I/O port specified by Port with the value specified by Value
56 and returns Value. This function must guarantee that all I/O read and write
57 operations are serialized.
59 If 8-bit I/O port operations are not supported, then ASSERT().
61 @param Port The I/O port to write.
62 @param Value The value to write to the I/O port.
64 @return The value written the I/O port.
75 Reads an 8-bit I/O port fifo into a block of memory.
77 Reads the 8-bit I/O fifo port specified by Port.
78 The port is read Count times, and the read data is
79 stored in the provided Buffer.
81 This function must guarantee that all I/O read and write operations are
84 If 8-bit I/O port operations are not supported, then ASSERT().
86 @param Port The I/O port to read.
87 @param Count The number of times to read I/O port.
88 @param Buffer The buffer to store the read data into.
100 Writes a block of memory into an 8-bit I/O port fifo.
102 Writes the 8-bit I/O fifo port specified by Port.
103 The port is written Count times, and the write data is
104 retrieved from the provided Buffer.
106 This function must guarantee that all I/O write and write operations are
109 If 8-bit I/O port operations are not supported, then ASSERT().
111 @param Port The I/O port to write.
112 @param Count The number of times to write I/O port.
113 @param Buffer The buffer to retrieve the write data from.
125 Reads an 8-bit I/O port, performs a bitwise OR, and writes the
126 result back to the 8-bit I/O port.
128 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
129 between the read result and the value specified by OrData, and writes the
130 result to the 8-bit I/O port specified by Port. The value written to the I/O
131 port is returned. This function must guarantee that all I/O read and write
132 operations are serialized.
134 If 8-bit I/O port operations are not supported, then ASSERT().
136 @param Port The I/O port to write.
137 @param OrData The value to OR with the read value from the I/O port.
139 @return The value written back to the I/O port.
150 Reads an 8-bit I/O port, performs a bitwise AND, and writes the result back
151 to the 8-bit I/O port.
153 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
154 the read result and the value specified by AndData, and writes the result to
155 the 8-bit I/O port specified by Port. The value written to the I/O port is
156 returned. This function must guarantee that all I/O read and write operations
159 If 8-bit I/O port operations are not supported, then ASSERT().
161 @param Port The I/O port to write.
162 @param AndData The value to AND with the read value from the I/O port.
164 @return The value written back to the I/O port.
175 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
176 OR, and writes the result back to the 8-bit I/O port.
178 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
179 the read result and the value specified by AndData, performs a bitwise OR
180 between the result of the AND operation and the value specified by OrData,
181 and writes the result to the 8-bit I/O port specified by Port. The value
182 written to the I/O port is returned. This function must guarantee that all
183 I/O read and write operations are serialized.
185 If 8-bit I/O port operations are not supported, then ASSERT().
187 @param Port The I/O port to write.
188 @param AndData The value to AND with the read value from the I/O port.
189 @param OrData The value to OR with the result of the AND operation.
191 @return The value written back to the I/O port.
203 Reads a bit field of an I/O register.
205 Reads the bit field in an 8-bit I/O register. The bit field is specified by
206 the StartBit and the EndBit. The value of the bit field is returned.
208 If 8-bit I/O port operations are not supported, then ASSERT().
209 If StartBit is greater than 7, then ASSERT().
210 If EndBit is greater than 7, then ASSERT().
211 If EndBit is less than StartBit, then ASSERT().
213 @param Port The I/O port to read.
214 @param StartBit The ordinal of the least significant bit in the bit field.
216 @param EndBit The ordinal of the most significant bit in the bit field.
219 @return The value read.
231 Writes a bit field to an I/O register.
233 Writes Value to the bit field of the I/O register. The bit field is specified
234 by the StartBit and the EndBit. All other bits in the destination I/O
235 register are preserved. The value written to the I/O port is returned.
237 If 8-bit I/O port operations are not supported, then ASSERT().
238 If StartBit is greater than 7, then ASSERT().
239 If EndBit is greater than 7, then ASSERT().
240 If EndBit is less than StartBit, then ASSERT().
241 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
243 @param Port The I/O port 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 Value New value of the bit field.
250 @return The value written back to the I/O port.
263 Reads a bit field in an 8-bit port, performs a bitwise OR, and writes the
264 result back to the bit field in the 8-bit port.
266 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
267 between the read result and the value specified by OrData, and writes the
268 result to the 8-bit I/O port specified by Port. The value written to the I/O
269 port is returned. This function must guarantee that all I/O read and write
270 operations are serialized. Extra left bits in OrData are stripped.
272 If 8-bit I/O port operations are not supported, then ASSERT().
273 If StartBit is greater than 7, then ASSERT().
274 If EndBit is greater than 7, then ASSERT().
275 If EndBit is less than StartBit, then ASSERT().
276 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
278 @param Port The I/O port to write.
279 @param StartBit The ordinal of the least significant bit in the bit field.
281 @param EndBit The ordinal of the most significant bit in the bit field.
283 @param OrData The value to OR with the read value from the I/O port.
285 @return The value written back to the I/O port.
298 Reads a bit field in an 8-bit port, performs a bitwise AND, and writes the
299 result back to the bit field in the 8-bit port.
301 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
302 the read result and the value specified by AndData, and writes the result to
303 the 8-bit I/O port specified by Port. The value written to the I/O port is
304 returned. This function must guarantee that all I/O read and write operations
305 are serialized. Extra left bits in AndData are stripped.
307 If 8-bit I/O port operations are not supported, then ASSERT().
308 If StartBit is greater than 7, then ASSERT().
309 If EndBit is greater than 7, then ASSERT().
310 If EndBit is less than StartBit, then ASSERT().
311 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
313 @param Port The I/O port to write.
314 @param StartBit The ordinal of the least significant bit in the bit field.
316 @param EndBit The ordinal of the most significant bit in the bit field.
318 @param AndData The value to AND with the read value from the I/O port.
320 @return The value written back to the I/O port.
333 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
334 bitwise OR, and writes the result back to the bit field in the
337 Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed
338 by a bitwise OR between the read result and the value specified by
339 AndData, and writes the result to the 8-bit I/O port specified by Port. The
340 value written to the I/O port is returned. This function must guarantee that
341 all I/O read and write operations are serialized. Extra left bits in both
342 AndData and OrData are stripped.
344 If 8-bit I/O port operations are not supported, then ASSERT().
345 If StartBit is greater than 7, then ASSERT().
346 If EndBit is greater than 7, then ASSERT().
347 If EndBit is less than StartBit, then ASSERT().
348 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
349 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
351 @param Port The I/O port to write.
352 @param StartBit The ordinal of the least significant bit in the bit field.
354 @param EndBit The ordinal of the most significant bit in the bit field.
356 @param AndData The value to AND with the read value from the I/O port.
357 @param OrData The value to OR with the result of the AND operation.
359 @return The value written back to the I/O port.
364 IoBitFieldAndThenOr8 (
373 Reads a 16-bit I/O port.
375 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
376 This function must guarantee that all I/O read and write operations are
379 If 16-bit I/O port operations are not supported, then ASSERT().
380 If Port is not aligned on a 16-bit boundary, then ASSERT().
382 @param Port The I/O port to read.
384 @return The value read.
394 Writes a 16-bit I/O port.
396 Writes the 16-bit I/O port specified by Port with the value specified by Value
397 and returns Value. This function must guarantee that all I/O read and write
398 operations are serialized.
400 If 16-bit I/O port operations are not supported, then ASSERT().
401 If Port is not aligned on a 16-bit boundary, then ASSERT().
403 @param Port The I/O port to write.
404 @param Value The value to write to the I/O port.
406 @return The value written the I/O port.
417 Reads a 16-bit I/O port fifo into a block of memory.
419 Reads the 16-bit I/O fifo port specified by Port.
420 The port is read Count times, and the read data is
421 stored in the provided Buffer.
423 This function must guarantee that all I/O read and write operations are
426 If 16-bit I/O port operations are not supported, then ASSERT().
428 @param Port The I/O port to read.
429 @param Count The number of times to read I/O port.
430 @param Buffer The buffer to store the read data into.
442 Writes a block of memory into a 16-bit I/O port fifo.
444 Writes the 16-bit I/O fifo port specified by Port.
445 The port is written Count times, and the write data is
446 retrieved from the provided Buffer.
448 This function must guarantee that all I/O write and write operations are
451 If 16-bit I/O port operations are not supported, then ASSERT().
453 @param Port The I/O port to write.
454 @param Count The number of times to write I/O port.
455 @param Buffer The buffer to retrieve the write data from.
467 Reads a 16-bit I/O port, performs a bitwise OR, and writes the
468 result back to the 16-bit I/O port.
470 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
471 between the read result and the value specified by OrData, and writes the
472 result to the 16-bit I/O port specified by Port. The value written to the I/O
473 port is returned. This function must guarantee that all I/O read and write
474 operations are serialized.
476 If 16-bit I/O port operations are not supported, then ASSERT().
477 If Port is not aligned on a 16-bit boundary, then ASSERT().
479 @param Port The I/O port to write.
480 @param OrData The value to OR with the read value from the I/O port.
482 @return The value written back to the I/O port.
493 Reads a 16-bit I/O port, performs a bitwise AND, and writes the result back
494 to the 16-bit I/O port.
496 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
497 the read result and the value specified by AndData, and writes the result to
498 the 16-bit I/O port specified by Port. The value written to the I/O port is
499 returned. This function must guarantee that all I/O read and write operations
502 If 16-bit I/O port operations are not supported, then ASSERT().
503 If Port is not aligned on a 16-bit boundary, then ASSERT().
505 @param Port The I/O port to write.
506 @param AndData The value to AND with the read value from the I/O port.
508 @return The value written back to the I/O port.
519 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
520 OR, and writes the result back to the 16-bit I/O port.
522 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
523 the read result and the value specified by AndData, performs a bitwise OR
524 between the result of the AND operation and the value specified by OrData,
525 and writes the result to the 16-bit I/O port specified by Port. The value
526 written to the I/O port is returned. This function must guarantee that all
527 I/O read and write operations are serialized.
529 If 16-bit I/O port operations are not supported, then ASSERT().
530 If Port is not aligned on a 16-bit boundary, then ASSERT().
532 @param Port The I/O port to write.
533 @param AndData The value to AND with the read value from the I/O port.
534 @param OrData The value to OR with the result of the AND operation.
536 @return The value written back to the I/O port.
548 Reads a bit field of an I/O register.
550 Reads the bit field in a 16-bit I/O register. The bit field is specified by
551 the StartBit and the EndBit. The value of the bit field is returned.
553 If 16-bit I/O port operations are not supported, then ASSERT().
554 If Port is not aligned on a 16-bit boundary, then ASSERT().
555 If StartBit is greater than 15, then ASSERT().
556 If EndBit is greater than 15, then ASSERT().
557 If EndBit is less than StartBit, then ASSERT().
559 @param Port The I/O port to read.
560 @param StartBit The ordinal of the least significant bit in the bit field.
562 @param EndBit The ordinal of the most significant bit in the bit field.
565 @return The value read.
577 Writes a bit field to an I/O register.
579 Writes Value to the bit field of the I/O register. The bit field is specified
580 by the StartBit and the EndBit. All other bits in the destination I/O
581 register are preserved. The value written to the I/O port is returned. Extra
582 left bits in Value are stripped.
584 If 16-bit I/O port operations are not supported, then ASSERT().
585 If Port is not aligned on a 16-bit boundary, then ASSERT().
586 If StartBit is greater than 15, then ASSERT().
587 If EndBit is greater than 15, then ASSERT().
588 If EndBit is less than StartBit, then ASSERT().
589 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
591 @param Port The I/O port to write.
592 @param StartBit The ordinal of the least significant bit in the bit field.
594 @param EndBit The ordinal of the most significant bit in the bit field.
596 @param Value New value of the bit field.
598 @return The value written back to the I/O port.
611 Reads a bit field in a 16-bit port, performs a bitwise OR, and writes the
612 result back to the bit field in the 16-bit port.
614 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
615 between the read result and the value specified by OrData, and writes the
616 result to the 16-bit I/O port specified by Port. The value written to the I/O
617 port is returned. This function must guarantee that all I/O read and write
618 operations are serialized. Extra left bits in OrData are stripped.
620 If 16-bit I/O port operations are not supported, then ASSERT().
621 If Port is not aligned on a 16-bit boundary, then ASSERT().
622 If StartBit is greater than 15, then ASSERT().
623 If EndBit is greater than 15, then ASSERT().
624 If EndBit is less than StartBit, then ASSERT().
625 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
627 @param Port The I/O port to write.
628 @param StartBit The ordinal of the least significant bit in the bit field.
630 @param EndBit The ordinal of the most significant bit in the bit field.
632 @param OrData The value to OR with the read value from the I/O port.
634 @return The value written back to the I/O port.
647 Reads a bit field in a 16-bit port, performs a bitwise AND, and writes the
648 result back to the bit field in the 16-bit port.
650 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
651 the read result and the value specified by AndData, and writes the result to
652 the 16-bit I/O port specified by Port. The value written to the I/O port is
653 returned. This function must guarantee that all I/O read and write operations
654 are serialized. Extra left bits in AndData are stripped.
656 If 16-bit I/O port operations are not supported, then ASSERT().
657 If Port is not aligned on a 16-bit boundary, then ASSERT().
658 If StartBit is greater than 15, then ASSERT().
659 If EndBit is greater than 15, then ASSERT().
660 If EndBit is less than StartBit, then ASSERT().
661 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
663 @param Port The I/O port to write.
664 @param StartBit The ordinal of the least significant bit in the bit field.
666 @param EndBit The ordinal of the most significant bit in the bit field.
668 @param AndData The value to AND with the read value from the I/O port.
670 @return The value written back to the I/O port.
683 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
684 bitwise OR, and writes the result back to the bit field in the
687 Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed
688 by a bitwise OR between the read result and the value specified by
689 AndData, and writes the result to the 16-bit I/O port specified by Port. The
690 value written to the I/O port is returned. This function must guarantee that
691 all I/O read and write operations are serialized. Extra left bits in both
692 AndData and OrData are stripped.
694 If 16-bit I/O port operations are not supported, then ASSERT().
695 If Port is not aligned on a 16-bit boundary, then ASSERT().
696 If StartBit is greater than 15, then ASSERT().
697 If EndBit is greater than 15, then ASSERT().
698 If EndBit is less than StartBit, then ASSERT().
699 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
700 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
702 @param Port The I/O port to write.
703 @param StartBit The ordinal of the least significant bit in the bit field.
705 @param EndBit The ordinal of the most significant bit in the bit field.
707 @param AndData The value to AND with the read value from the I/O port.
708 @param OrData The value to OR with the result of the AND operation.
710 @return The value written back to the I/O port.
715 IoBitFieldAndThenOr16 (
724 Reads a 32-bit I/O port.
726 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
727 This function must guarantee that all I/O read and write operations are
730 If 32-bit I/O port operations are not supported, then ASSERT().
731 If Port is not aligned on a 32-bit boundary, then ASSERT().
733 @param Port The I/O port to read.
735 @return The value read.
745 Writes a 32-bit I/O port.
747 Writes the 32-bit I/O port specified by Port with the value specified by Value
748 and returns Value. This function must guarantee that all I/O read and write
749 operations are serialized.
751 If 32-bit I/O port operations are not supported, then ASSERT().
752 If Port is not aligned on a 32-bit boundary, then ASSERT().
754 @param Port The I/O port to write.
755 @param Value The value to write to the I/O port.
757 @return The value written the I/O port.
768 Reads a 32-bit I/O port fifo into a block of memory.
770 Reads the 32-bit I/O fifo port specified by Port.
771 The port is read Count times, and the read data is
772 stored in the provided Buffer.
774 This function must guarantee that all I/O read and write operations are
777 If 32-bit I/O port operations are not supported, then ASSERT().
779 @param Port The I/O port to read.
780 @param Count The number of times to read I/O port.
781 @param Buffer The buffer to store the read data into.
793 Writes a block of memory into a 32-bit I/O port fifo.
795 Writes the 32-bit I/O fifo port specified by Port.
796 The port is written Count times, and the write data is
797 retrieved from the provided Buffer.
799 This function must guarantee that all I/O write and write operations are
802 If 32-bit I/O port operations are not supported, then ASSERT().
804 @param Port The I/O port to write.
805 @param Count The number of times to write I/O port.
806 @param Buffer The buffer to retrieve the write data from.
818 Reads a 32-bit I/O port, performs a bitwise OR, and writes the
819 result back to the 32-bit I/O port.
821 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
822 between the read result and the value specified by OrData, and writes the
823 result to the 32-bit I/O port specified by Port. The value written to the I/O
824 port is returned. This function must guarantee that all I/O read and write
825 operations are serialized.
827 If 32-bit I/O port operations are not supported, then ASSERT().
828 If Port is not aligned on a 32-bit boundary, then ASSERT().
830 @param Port The I/O port to write.
831 @param OrData The value to OR with the read value from the I/O port.
833 @return The value written back to the I/O port.
844 Reads a 32-bit I/O port, performs a bitwise AND, and writes the result back
845 to the 32-bit I/O port.
847 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
848 the read result and the value specified by AndData, and writes the result to
849 the 32-bit I/O port specified by Port. The value written to the I/O port is
850 returned. This function must guarantee that all I/O read and write operations
853 If 32-bit I/O port operations are not supported, then ASSERT().
854 If Port is not aligned on a 32-bit boundary, then ASSERT().
856 @param Port The I/O port to write.
857 @param AndData The value to AND with the read value from the I/O port.
859 @return The value written back to the I/O port.
870 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
871 OR, and writes the result back to the 32-bit I/O port.
873 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
874 the read result and the value specified by AndData, performs a bitwise OR
875 between the result of the AND operation and the value specified by OrData,
876 and writes the result to the 32-bit I/O port specified by Port. The value
877 written to the I/O port is returned. This function must guarantee that all
878 I/O read and write operations are serialized.
880 If 32-bit I/O port operations are not supported, then ASSERT().
881 If Port is not aligned on a 32-bit boundary, then ASSERT().
883 @param Port The I/O port to write.
884 @param AndData The value to AND with the read value from the I/O port.
885 @param OrData The value to OR with the result of the AND operation.
887 @return The value written back to the I/O port.
899 Reads a bit field of an I/O register.
901 Reads the bit field in a 32-bit I/O register. The bit field is specified by
902 the StartBit and the EndBit. The value of the bit field is returned.
904 If 32-bit I/O port operations are not supported, then ASSERT().
905 If Port is not aligned on a 32-bit boundary, then ASSERT().
906 If StartBit is greater than 31, then ASSERT().
907 If EndBit is greater than 31, then ASSERT().
908 If EndBit is less than StartBit, then ASSERT().
910 @param Port The I/O port to read.
911 @param StartBit The ordinal of the least significant bit in the bit field.
913 @param EndBit The ordinal of the most significant bit in the bit field.
916 @return The value read.
928 Writes a bit field to an I/O register.
930 Writes Value to the bit field of the I/O register. The bit field is specified
931 by the StartBit and the EndBit. All other bits in the destination I/O
932 register are preserved. The value written to the I/O port is returned. Extra
933 left bits in Value are stripped.
935 If 32-bit I/O port operations are not supported, then ASSERT().
936 If Port is not aligned on a 32-bit boundary, then ASSERT().
937 If StartBit is greater than 31, then ASSERT().
938 If EndBit is greater than 31, then ASSERT().
939 If EndBit is less than StartBit, then ASSERT().
940 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
942 @param Port The I/O port to write.
943 @param StartBit The ordinal of the least significant bit in the bit field.
945 @param EndBit The ordinal of the most significant bit in the bit field.
947 @param Value New value of the bit field.
949 @return The value written back to the I/O port.
962 Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the
963 result back to the bit field in the 32-bit port.
965 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
966 between the read result and the value specified by OrData, and writes the
967 result to the 32-bit I/O port specified by Port. The value written to the I/O
968 port is returned. This function must guarantee that all I/O read and write
969 operations are serialized. Extra left bits in OrData are stripped.
971 If 32-bit I/O port operations are not supported, then ASSERT().
972 If Port is not aligned on a 32-bit boundary, 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 StartBit, then ASSERT().
976 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
978 @param Port The I/O port to write.
979 @param StartBit The ordinal of the least significant bit in the bit field.
981 @param EndBit The ordinal of the most significant bit in the bit field.
983 @param OrData The value to OR with the read value from the I/O port.
985 @return The value written back to the I/O port.
998 Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the
999 result back to the bit field in the 32-bit port.
1001 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
1002 the read result and the value specified by AndData, and writes the result to
1003 the 32-bit I/O port specified by Port. The value written to the I/O port is
1004 returned. This function must guarantee that all I/O read and write operations
1005 are serialized. Extra left bits in AndData are stripped.
1007 If 32-bit I/O port operations are not supported, then ASSERT().
1008 If Port is not aligned on a 32-bit boundary, then ASSERT().
1009 If StartBit is greater than 31, then ASSERT().
1010 If EndBit is greater than 31, then ASSERT().
1011 If EndBit is less than StartBit, then ASSERT().
1012 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1014 @param Port The I/O port to write.
1015 @param StartBit The ordinal of the least significant bit in the bit field.
1017 @param EndBit The ordinal of the most significant bit in the bit field.
1019 @param AndData The value to AND with the read value from the I/O port.
1021 @return The value written back to the I/O port.
1034 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
1035 bitwise OR, and writes the result back to the bit field in the
1038 Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
1039 by a bitwise OR between the read result and the value specified by
1040 AndData, and writes the result to the 32-bit I/O port specified by Port. The
1041 value written to the I/O port is returned. This function must guarantee that
1042 all I/O read and write operations are serialized. Extra left bits in both
1043 AndData and OrData are stripped.
1045 If 32-bit I/O port operations are not supported, then ASSERT().
1046 If Port is not aligned on a 32-bit boundary, then ASSERT().
1047 If StartBit is greater than 31, then ASSERT().
1048 If EndBit is greater than 31, then ASSERT().
1049 If EndBit is less than StartBit, then ASSERT().
1050 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1051 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1053 @param Port The I/O port to write.
1054 @param StartBit The ordinal of the least significant bit in the bit field.
1056 @param EndBit The ordinal of the most significant bit in the bit field.
1058 @param AndData The value to AND with the read value from the I/O port.
1059 @param OrData The value to OR with the result of the AND operation.
1061 @return The value written back to the I/O port.
1066 IoBitFieldAndThenOr32 (
1075 Reads a 64-bit I/O port.
1077 Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
1078 This function must guarantee that all I/O read and write operations are
1081 If 64-bit I/O port operations are not supported, then ASSERT().
1082 If Port is not aligned on a 64-bit boundary, then ASSERT().
1084 @param Port The I/O port to read.
1086 @return The value read.
1096 Writes a 64-bit I/O port.
1098 Writes the 64-bit I/O port specified by Port with the value specified by Value
1099 and returns Value. This function must guarantee that all I/O read and write
1100 operations are serialized.
1102 If 64-bit I/O port operations are not supported, then ASSERT().
1103 If Port is not aligned on a 64-bit boundary, then ASSERT().
1105 @param Port The I/O port to write.
1106 @param Value The value to write to the I/O port.
1108 @return The value written the I/O port.
1119 Reads a 64-bit I/O port, performs a bitwise OR, and writes the
1120 result back to the 64-bit I/O port.
1122 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1123 between the read result and the value specified by OrData, and writes the
1124 result to the 64-bit I/O port specified by Port. The value written to the I/O
1125 port is returned. This function must guarantee that all I/O read and write
1126 operations are serialized.
1128 If 64-bit I/O port operations are not supported, then ASSERT().
1129 If Port is not aligned on a 64-bit boundary, then ASSERT().
1131 @param Port The I/O port to write.
1132 @param OrData The value to OR with the read value from the I/O port.
1134 @return The value written back to the I/O port.
1145 Reads a 64-bit I/O port, performs a bitwise AND, and writes the result back
1146 to the 64-bit I/O port.
1148 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1149 the read result and the value specified by AndData, and writes the result to
1150 the 64-bit I/O port specified by Port. The value written to the I/O port is
1151 returned. This function must guarantee that all I/O read and write operations
1154 If 64-bit I/O port operations are not supported, then ASSERT().
1155 If Port is not aligned on a 64-bit boundary, then ASSERT().
1157 @param Port The I/O port to write.
1158 @param AndData The value to AND with the read value from the I/O port.
1160 @return The value written back to the I/O port.
1171 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
1172 OR, and writes the result back to the 64-bit I/O port.
1174 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1175 the read result and the value specified by AndData, performs a bitwise OR
1176 between the result of the AND operation and the value specified by OrData,
1177 and writes the result to the 64-bit I/O port specified by Port. The value
1178 written to the I/O port is returned. This function must guarantee that all
1179 I/O read and write operations are serialized.
1181 If 64-bit I/O port operations are not supported, then ASSERT().
1182 If Port is not aligned on a 64-bit boundary, then ASSERT().
1184 @param Port The I/O port to write.
1185 @param AndData The value to AND with the read value from the I/O port.
1186 @param OrData The value to OR with the result of the AND operation.
1188 @return The value written back to the I/O port.
1200 Reads a bit field of an I/O register.
1202 Reads the bit field in a 64-bit I/O register. The bit field is specified by
1203 the StartBit and the EndBit. The value of the bit field is returned.
1205 If 64-bit I/O port operations are not supported, then ASSERT().
1206 If Port is not aligned on a 64-bit boundary, then ASSERT().
1207 If StartBit is greater than 63, then ASSERT().
1208 If EndBit is greater than 63, then ASSERT().
1209 If EndBit is less than StartBit, then ASSERT().
1211 @param Port The I/O port to read.
1212 @param StartBit The ordinal of the least significant bit in the bit field.
1214 @param EndBit The ordinal of the most significant bit in the bit field.
1217 @return The value read.
1229 Writes a bit field to an I/O register.
1231 Writes Value to the bit field of the I/O register. The bit field is specified
1232 by the StartBit and the EndBit. All other bits in the destination I/O
1233 register are preserved. The value written to the I/O port is returned. Extra
1234 left bits in Value are stripped.
1236 If 64-bit I/O port operations are not supported, then ASSERT().
1237 If Port is not aligned on a 64-bit boundary, then ASSERT().
1238 If StartBit is greater than 63, then ASSERT().
1239 If EndBit is greater than 63, then ASSERT().
1240 If EndBit is less than StartBit, then ASSERT().
1241 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1243 @param Port The I/O port to write.
1244 @param StartBit The ordinal of the least significant bit in the bit field.
1246 @param EndBit The ordinal of the most significant bit in the bit field.
1248 @param Value New value of the bit field.
1250 @return The value written back to the I/O port.
1263 Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the
1264 result back to the bit field in the 64-bit port.
1266 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1267 between the read result and the value specified by OrData, and writes the
1268 result to the 64-bit I/O port specified by Port. The value written to the I/O
1269 port is returned. This function must guarantee that all I/O read and write
1270 operations are serialized. Extra left bits in OrData are stripped.
1272 If 64-bit I/O port operations are not supported, then ASSERT().
1273 If Port is not aligned on a 64-bit boundary, then ASSERT().
1274 If StartBit is greater than 63, then ASSERT().
1275 If EndBit is greater than 63, then ASSERT().
1276 If EndBit is less than StartBit, then ASSERT().
1277 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1279 @param Port The I/O port to write.
1280 @param StartBit The ordinal of the least significant bit in the bit field.
1282 @param EndBit The ordinal of the most significant bit in the bit field.
1284 @param OrData The value to OR with the read value from the I/O port.
1286 @return The value written back to the I/O port.
1299 Reads a bit field in a 64-bit port, performs a bitwise AND, and writes the
1300 result back to the bit field in the 64-bit port.
1302 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1303 the read result and the value specified by AndData, and writes the result to
1304 the 64-bit I/O port specified by Port. The value written to the I/O port is
1305 returned. This function must guarantee that all I/O read and write operations
1306 are serialized. Extra left bits in AndData are stripped.
1308 If 64-bit I/O port operations are not supported, then ASSERT().
1309 If Port is not aligned on a 64-bit boundary, then ASSERT().
1310 If StartBit is greater than 63, then ASSERT().
1311 If EndBit is greater than 63, then ASSERT().
1312 If EndBit is less than StartBit, then ASSERT().
1313 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1315 @param Port The I/O port to write.
1316 @param StartBit The ordinal of the least significant bit in the bit field.
1318 @param EndBit The ordinal of the most significant bit in the bit field.
1320 @param AndData The value to AND with the read value from the I/O port.
1322 @return The value written back to the I/O port.
1335 Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
1336 bitwise OR, and writes the result back to the bit field in the
1339 Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed
1340 by a bitwise OR between the read result and the value specified by
1341 AndData, and writes the result to the 64-bit I/O port specified by Port. The
1342 value written to the I/O port is returned. This function must guarantee that
1343 all I/O read and write operations are serialized. Extra left bits in both
1344 AndData and OrData are stripped.
1346 If 64-bit I/O port operations are not supported, then ASSERT().
1347 If Port is not aligned on a 64-bit boundary, then ASSERT().
1348 If StartBit is greater than 63, then ASSERT().
1349 If EndBit is greater than 63, then ASSERT().
1350 If EndBit is less than StartBit, then ASSERT().
1351 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1352 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1354 @param Port The I/O port to write.
1355 @param StartBit The ordinal of the least significant bit in the bit field.
1357 @param EndBit The ordinal of the most significant bit in the bit field.
1359 @param AndData The value to AND with the read value from the I/O port.
1360 @param OrData The value to OR with the result of the AND operation.
1362 @return The value written back to the I/O port.
1367 IoBitFieldAndThenOr64 (
1376 Reads an 8-bit MMIO register.
1378 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
1379 returned. This function must guarantee that all MMIO read and write
1380 operations are serialized.
1382 If 8-bit MMIO register operations are not supported, then ASSERT().
1384 @param Address The MMIO register to read.
1386 @return The value read.
1396 Writes an 8-bit MMIO register.
1398 Writes the 8-bit MMIO register specified by Address with the value specified
1399 by Value and returns Value. This function must guarantee that all MMIO read
1400 and write operations are serialized.
1402 If 8-bit MMIO register operations are not supported, then ASSERT().
1404 @param Address The MMIO register to write.
1405 @param Value The value to write to the MMIO register.
1418 Reads an 8-bit MMIO register, performs a bitwise OR, and writes the
1419 result back to the 8-bit MMIO register.
1421 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1422 OR between the read result and the value specified by OrData, and
1423 writes the result to the 8-bit MMIO register specified by Address. The value
1424 written to the MMIO register is returned. This function must guarantee that
1425 all MMIO read and write operations are serialized.
1427 If 8-bit MMIO register operations are not supported, then ASSERT().
1429 @param Address The MMIO register to write.
1430 @param OrData The value to OR with the read value from the MMIO register.
1432 @return The value written back to the MMIO register.
1443 Reads an 8-bit MMIO register, performs a bitwise AND, and writes the result
1444 back to the 8-bit MMIO register.
1446 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1447 between the read result and the value specified by AndData, and writes the
1448 result to the 8-bit MMIO register specified by Address. The value written to
1449 the MMIO register is returned. This function must guarantee that all MMIO
1450 read and write operations are serialized.
1452 If 8-bit MMIO register operations are not supported, then ASSERT().
1454 @param Address The MMIO register to write.
1455 @param AndData The value to AND with the read value from the MMIO register.
1457 @return The value written back to the MMIO register.
1468 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
1469 OR, and writes the result back to the 8-bit MMIO register.
1471 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1472 between the read result and the value specified by AndData, performs a
1473 bitwise OR between the result of the AND operation and the value specified by
1474 OrData, and writes the result to the 8-bit MMIO register specified by
1475 Address. The value written to the MMIO register is returned. This function
1476 must guarantee that all MMIO read and write operations are serialized.
1478 If 8-bit MMIO register operations are not supported, then ASSERT().
1481 @param Address The MMIO register to write.
1482 @param AndData The value to AND with the read value from the MMIO register.
1483 @param OrData The value to OR with the result of the AND operation.
1485 @return The value written back to the MMIO register.
1497 Reads a bit field of a MMIO register.
1499 Reads the bit field in an 8-bit MMIO register. The bit field is specified by
1500 the StartBit and the EndBit. The value of the bit field is returned.
1502 If 8-bit MMIO register operations are not supported, then ASSERT().
1503 If StartBit is greater than 7, then ASSERT().
1504 If EndBit is greater than 7, then ASSERT().
1505 If EndBit is less than StartBit, then ASSERT().
1507 @param Address MMIO register to read.
1508 @param StartBit The ordinal of the least significant bit in the bit field.
1510 @param EndBit The ordinal of the most significant bit in the bit field.
1513 @return The value read.
1525 Writes a bit field to a MMIO register.
1527 Writes Value to the bit field of the MMIO register. The bit field is
1528 specified by the StartBit and the EndBit. All other bits in the destination
1529 MMIO register are preserved. The new value of the 8-bit register is returned.
1531 If 8-bit MMIO register operations are not supported, then ASSERT().
1532 If StartBit is greater than 7, then ASSERT().
1533 If EndBit is greater than 7, then ASSERT().
1534 If EndBit is less than StartBit, then ASSERT().
1535 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1537 @param Address MMIO register to write.
1538 @param StartBit The ordinal of the least significant bit in the bit field.
1540 @param EndBit The ordinal of the most significant bit in the bit field.
1542 @param Value New value of the bit field.
1544 @return The value written back to the MMIO register.
1549 MmioBitFieldWrite8 (
1557 Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and
1558 writes the result back to the bit field in the 8-bit MMIO register.
1560 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1561 OR between the read result and the value specified by OrData, and
1562 writes the result to the 8-bit MMIO register specified by Address. The value
1563 written to the MMIO register is returned. This function must guarantee that
1564 all MMIO read and write operations are serialized. Extra left bits in OrData
1567 If 8-bit MMIO register operations are not supported, then ASSERT().
1568 If StartBit is greater than 7, then ASSERT().
1569 If EndBit is greater than 7, then ASSERT().
1570 If EndBit is less than StartBit, then ASSERT().
1571 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1573 @param Address MMIO register to write.
1574 @param StartBit The ordinal of the least significant bit in the bit field.
1576 @param EndBit The ordinal of the most significant bit in the bit field.
1578 @param OrData The value to OR with read value from the MMIO register.
1580 @return The value written back to the MMIO register.
1593 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and
1594 writes the result back to the bit field in the 8-bit MMIO register.
1596 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1597 between the read result and the value specified by AndData, and writes the
1598 result to the 8-bit MMIO register specified by Address. The value written to
1599 the MMIO register is returned. This function must guarantee that all MMIO
1600 read and write operations are serialized. Extra left bits in AndData are
1603 If 8-bit MMIO register operations are not supported, then ASSERT().
1604 If StartBit is greater than 7, then ASSERT().
1605 If EndBit is greater than 7, then ASSERT().
1606 If EndBit is less than StartBit, then ASSERT().
1607 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1609 @param Address MMIO register to write.
1610 @param StartBit The ordinal of the least significant bit in the bit field.
1612 @param EndBit The ordinal of the most significant bit in the bit field.
1614 @param AndData The value to AND with read value from the MMIO register.
1616 @return The value written back to the MMIO register.
1629 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed
1630 by a bitwise OR, and writes the result back to the bit field in the
1631 8-bit MMIO register.
1633 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1634 followed by a bitwise OR between the read result and the value
1635 specified by AndData, and writes the result to the 8-bit MMIO register
1636 specified by Address. The value written to the MMIO register is returned.
1637 This function must guarantee that all MMIO read and write operations are
1638 serialized. Extra left bits in both AndData and OrData are stripped.
1640 If 8-bit MMIO register operations are not supported, then ASSERT().
1641 If StartBit is greater than 7, then ASSERT().
1642 If EndBit is greater than 7, then ASSERT().
1643 If EndBit is less than StartBit, then ASSERT().
1644 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1645 If OrData is larger than the bitmask value range specified by StartBit and EndBit, 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 AndData The value to AND with read value from the MMIO register.
1653 @param OrData The value to OR with the result of the AND operation.
1655 @return The value written back to the MMIO register.
1660 MmioBitFieldAndThenOr8 (
1669 Reads a 16-bit MMIO register.
1671 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
1672 returned. This function must guarantee that all MMIO read and write
1673 operations are serialized.
1675 If 16-bit MMIO register operations are not supported, then ASSERT().
1676 If Address is not aligned on a 16-bit boundary, then ASSERT().
1678 @param Address The MMIO register to read.
1680 @return The value read.
1690 Writes a 16-bit MMIO register.
1692 Writes the 16-bit MMIO register specified by Address with the value specified
1693 by Value and returns Value. This function must guarantee that all MMIO read
1694 and write operations are serialized.
1696 If 16-bit MMIO register operations are not supported, then ASSERT().
1697 If Address is not aligned on a 16-bit boundary, then ASSERT().
1699 @param Address The MMIO register to write.
1700 @param Value The value to write to the MMIO register.
1713 Reads a 16-bit MMIO register, performs a bitwise OR, and writes the
1714 result back to the 16-bit MMIO register.
1716 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1717 OR between the read result and the value specified by OrData, and
1718 writes the result to the 16-bit MMIO register specified by Address. The value
1719 written to the MMIO register is returned. This function must guarantee that
1720 all MMIO read and write operations are serialized.
1722 If 16-bit MMIO register operations are not supported, then ASSERT().
1723 If Address is not aligned on a 16-bit boundary, then ASSERT().
1725 @param Address The MMIO register to write.
1726 @param OrData The value to OR with the read value from the MMIO register.
1728 @return The value written back to the MMIO register.
1739 Reads a 16-bit MMIO register, performs a bitwise AND, and writes the result
1740 back to the 16-bit MMIO register.
1742 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1743 between the read result and the value specified by AndData, and writes the
1744 result to the 16-bit MMIO register specified by Address. The value written to
1745 the MMIO register is returned. This function must guarantee that all MMIO
1746 read and write operations are serialized.
1748 If 16-bit MMIO register operations are not supported, then ASSERT().
1749 If Address is not aligned on a 16-bit boundary, then ASSERT().
1751 @param Address The MMIO register to write.
1752 @param AndData The value to AND with the read value from the MMIO register.
1754 @return The value written back to the MMIO register.
1765 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
1766 OR, and writes the result back to the 16-bit MMIO register.
1768 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1769 between the read result and the value specified by AndData, performs a
1770 bitwise OR between the result of the AND operation and the value specified by
1771 OrData, and writes the result to the 16-bit MMIO register specified by
1772 Address. The value written to the MMIO register is returned. This function
1773 must guarantee that all MMIO read and write operations are serialized.
1775 If 16-bit MMIO register operations are not supported, then ASSERT().
1776 If Address is not aligned on a 16-bit boundary, then ASSERT().
1778 @param Address The MMIO register to write.
1779 @param AndData The value to AND with the read value from the MMIO register.
1780 @param OrData The value to OR with the result of the AND operation.
1782 @return The value written back to the MMIO register.
1794 Reads a bit field of a MMIO register.
1796 Reads the bit field in a 16-bit MMIO register. The bit field is specified by
1797 the StartBit and the EndBit. The value of the bit field is returned.
1799 If 16-bit MMIO register operations are not supported, then ASSERT().
1800 If Address is not aligned on a 16-bit boundary, then ASSERT().
1801 If StartBit is greater than 15, then ASSERT().
1802 If EndBit is greater than 15, then ASSERT().
1803 If EndBit is less than StartBit, then ASSERT().
1805 @param Address MMIO register to read.
1806 @param StartBit The ordinal of the least significant bit in the bit field.
1808 @param EndBit The ordinal of the most significant bit in the bit field.
1811 @return The value read.
1816 MmioBitFieldRead16 (
1823 Writes a bit field to a MMIO register.
1825 Writes Value to the bit field of the MMIO register. The bit field is
1826 specified by the StartBit and the EndBit. All other bits in the destination
1827 MMIO register are preserved. The new value of the 16-bit register is returned.
1829 If 16-bit MMIO register operations are not supported, then ASSERT().
1830 If Address is not aligned on a 16-bit boundary, then ASSERT().
1831 If StartBit is greater than 15, then ASSERT().
1832 If EndBit is greater than 15, then ASSERT().
1833 If EndBit is less than StartBit, then ASSERT().
1834 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1836 @param Address MMIO register to write.
1837 @param StartBit The ordinal of the least significant bit in the bit field.
1839 @param EndBit The ordinal of the most significant bit in the bit field.
1841 @param Value New value of the bit field.
1843 @return The value written back to the MMIO register.
1848 MmioBitFieldWrite16 (
1856 Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
1857 writes the result back to the bit field in the 16-bit MMIO register.
1859 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1860 OR between the read result and the value specified by OrData, and
1861 writes the result to the 16-bit MMIO register specified by Address. The value
1862 written to the MMIO register is returned. This function must guarantee that
1863 all MMIO read and write operations are serialized. Extra left bits in OrData
1866 If 16-bit MMIO register operations are not supported, then ASSERT().
1867 If Address is not aligned on a 16-bit boundary, then ASSERT().
1868 If StartBit is greater than 15, then ASSERT().
1869 If EndBit is greater than 15, then ASSERT().
1870 If EndBit is less than StartBit, then ASSERT().
1871 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1873 @param Address MMIO register to write.
1874 @param StartBit The ordinal of the least significant bit in the bit field.
1876 @param EndBit The ordinal of the most significant bit in the bit field.
1878 @param OrData The value to OR with read value from the MMIO register.
1880 @return The value written back to the MMIO register.
1893 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
1894 writes the result back to the bit field in the 16-bit MMIO register.
1896 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1897 between the read result and the value specified by AndData, and writes the
1898 result to the 16-bit MMIO register specified by Address. The value written to
1899 the MMIO register is returned. This function must guarantee that all MMIO
1900 read and write operations are serialized. Extra left bits in AndData are
1903 If 16-bit MMIO register operations are not supported, then ASSERT().
1904 If Address is not aligned on a 16-bit boundary, then ASSERT().
1905 If StartBit is greater than 15, then ASSERT().
1906 If EndBit is greater than 15, then ASSERT().
1907 If EndBit is less than StartBit, then ASSERT().
1908 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1910 @param Address MMIO register to write.
1911 @param StartBit The ordinal of the least significant bit in the bit field.
1913 @param EndBit The ordinal of the most significant bit in the bit field.
1915 @param AndData The value to AND with read value from the MMIO register.
1917 @return The value written back to the MMIO register.
1930 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed
1931 by a bitwise OR, and writes the result back to the bit field in the
1932 16-bit MMIO register.
1934 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1935 followed by a bitwise OR between the read result and the value
1936 specified by AndData, and writes the result to the 16-bit MMIO register
1937 specified by Address. The value written to the MMIO register is returned.
1938 This function must guarantee that all MMIO read and write operations are
1939 serialized. Extra left bits in both AndData and OrData are stripped.
1941 If 16-bit MMIO register operations are not supported, then ASSERT().
1942 If Address is not aligned on a 16-bit boundary, then ASSERT().
1943 If StartBit is greater than 15, then ASSERT().
1944 If EndBit is greater than 15, then ASSERT().
1945 If EndBit is less than StartBit, then ASSERT().
1946 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1947 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1949 @param Address MMIO register to write.
1950 @param StartBit The ordinal of the least significant bit in the bit field.
1952 @param EndBit The ordinal of the most significant bit in the bit field.
1954 @param AndData The value to AND with read value from the MMIO register.
1955 @param OrData The value to OR with the result of the AND operation.
1957 @return The value written back to the MMIO register.
1962 MmioBitFieldAndThenOr16 (
1971 Reads a 32-bit MMIO register.
1973 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
1974 returned. This function must guarantee that all MMIO read and write
1975 operations are serialized.
1977 If 32-bit MMIO register operations are not supported, then ASSERT().
1978 If Address is not aligned on a 32-bit boundary, then ASSERT().
1980 @param Address The MMIO register to read.
1982 @return The value read.
1992 Writes a 32-bit MMIO register.
1994 Writes the 32-bit MMIO register specified by Address with the value specified
1995 by Value and returns Value. This function must guarantee that all MMIO read
1996 and write operations are serialized.
1998 If 32-bit MMIO register operations are not supported, then ASSERT().
1999 If Address is not aligned on a 32-bit boundary, then ASSERT().
2001 @param Address The MMIO register to write.
2002 @param Value The value to write to the MMIO register.
2015 Reads a 32-bit MMIO register, performs a bitwise OR, and writes the
2016 result back to the 32-bit MMIO register.
2018 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2019 OR between the read result and the value specified by OrData, and
2020 writes the result to the 32-bit MMIO register specified by Address. The value
2021 written to the MMIO register is returned. This function must guarantee that
2022 all MMIO read and write operations are serialized.
2024 If 32-bit MMIO register operations are not supported, then ASSERT().
2025 If Address is not aligned on a 32-bit boundary, then ASSERT().
2027 @param Address The MMIO register to write.
2028 @param OrData The value to OR with the read value from the MMIO register.
2030 @return The value written back to the MMIO register.
2041 Reads a 32-bit MMIO register, performs a bitwise AND, and writes the result
2042 back to the 32-bit MMIO register.
2044 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2045 between the read result and the value specified by AndData, and writes the
2046 result to the 32-bit MMIO register specified by Address. The value written to
2047 the MMIO register is returned. This function must guarantee that all MMIO
2048 read and write operations are serialized.
2050 If 32-bit MMIO register operations are not supported, then ASSERT().
2051 If Address is not aligned on a 32-bit boundary, then ASSERT().
2053 @param Address The MMIO register to write.
2054 @param AndData The value to AND with the read value from the MMIO register.
2056 @return The value written back to the MMIO register.
2067 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
2068 OR, and writes the result back to the 32-bit MMIO register.
2070 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2071 between the read result and the value specified by AndData, performs a
2072 bitwise OR between the result of the AND operation and the value specified by
2073 OrData, and writes the result to the 32-bit MMIO register specified by
2074 Address. The value written to the MMIO register is returned. This function
2075 must guarantee that all MMIO read and write operations are serialized.
2077 If 32-bit MMIO register operations are not supported, then ASSERT().
2078 If Address is not aligned on a 32-bit boundary, then ASSERT().
2080 @param Address The MMIO register to write.
2081 @param AndData The value to AND with the read value from the MMIO register.
2082 @param OrData The value to OR with the result of the AND operation.
2084 @return The value written back to the MMIO register.
2096 Reads a bit field of a MMIO register.
2098 Reads the bit field in a 32-bit MMIO register. The bit field is specified by
2099 the StartBit and the EndBit. The value of the bit field is returned.
2101 If 32-bit MMIO register operations are not supported, then ASSERT().
2102 If Address is not aligned on a 32-bit boundary, then ASSERT().
2103 If StartBit is greater than 31, then ASSERT().
2104 If EndBit is greater than 31, then ASSERT().
2105 If EndBit is less than StartBit, then ASSERT().
2107 @param Address MMIO register to read.
2108 @param StartBit The ordinal of the least significant bit in the bit field.
2110 @param EndBit The ordinal of the most significant bit in the bit field.
2113 @return The value read.
2118 MmioBitFieldRead32 (
2125 Writes a bit field to a MMIO register.
2127 Writes Value to the bit field of the MMIO register. The bit field is
2128 specified by the StartBit and the EndBit. All other bits in the destination
2129 MMIO register are preserved. The new value of the 32-bit register is returned.
2131 If 32-bit MMIO register operations are not supported, then ASSERT().
2132 If Address is not aligned on a 32-bit boundary, then ASSERT().
2133 If StartBit is greater than 31, then ASSERT().
2134 If EndBit is greater than 31, then ASSERT().
2135 If EndBit is less than StartBit, then ASSERT().
2136 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2138 @param Address MMIO register to write.
2139 @param StartBit The ordinal of the least significant bit in the bit field.
2141 @param EndBit The ordinal of the most significant bit in the bit field.
2143 @param Value New value of the bit field.
2145 @return The value written back to the MMIO register.
2150 MmioBitFieldWrite32 (
2158 Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
2159 writes the result back to the bit field in the 32-bit MMIO register.
2161 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2162 OR between the read result and the value specified by OrData, and
2163 writes the result to the 32-bit MMIO register specified by Address. The value
2164 written to the MMIO register is returned. This function must guarantee that
2165 all MMIO read and write operations are serialized. Extra left bits in OrData
2168 If 32-bit MMIO register operations are not supported, then ASSERT().
2169 If Address is not aligned on a 32-bit boundary, then ASSERT().
2170 If StartBit is greater than 31, then ASSERT().
2171 If EndBit is greater than 31, then ASSERT().
2172 If EndBit is less than StartBit, then ASSERT().
2173 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2175 @param Address MMIO register to write.
2176 @param StartBit The ordinal of the least significant bit in the bit field.
2178 @param EndBit The ordinal of the most significant bit in the bit field.
2180 @param OrData The value to OR with read value from the MMIO register.
2182 @return The value written back to the MMIO register.
2195 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
2196 writes the result back to the bit field in the 32-bit MMIO register.
2198 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2199 between the read result and the value specified by AndData, and writes the
2200 result to the 32-bit MMIO register specified by Address. The value written to
2201 the MMIO register is returned. This function must guarantee that all MMIO
2202 read and write operations are serialized. Extra left bits in AndData are
2205 If 32-bit MMIO register operations are not supported, then ASSERT().
2206 If Address is not aligned on a 32-bit boundary, then ASSERT().
2207 If StartBit is greater than 31, then ASSERT().
2208 If EndBit is greater than 31, then ASSERT().
2209 If EndBit is less than StartBit, then ASSERT().
2210 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2212 @param Address MMIO register to write.
2213 @param StartBit The ordinal of the least significant bit in the bit field.
2215 @param EndBit The ordinal of the most significant bit in the bit field.
2217 @param AndData The value to AND with read value from the MMIO register.
2219 @return The value written back to the MMIO register.
2232 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed
2233 by a bitwise OR, and writes the result back to the bit field in the
2234 32-bit MMIO register.
2236 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2237 followed by a bitwise OR between the read result and the value
2238 specified by AndData, and writes the result to the 32-bit MMIO register
2239 specified by Address. The value written to the MMIO register is returned.
2240 This function must guarantee that all MMIO read and write operations are
2241 serialized. Extra left bits in both AndData and OrData are stripped.
2243 If 32-bit MMIO register operations are not supported, then ASSERT().
2244 If Address is not aligned on a 32-bit boundary, then ASSERT().
2245 If StartBit is greater than 31, then ASSERT().
2246 If EndBit is greater than 31, then ASSERT().
2247 If EndBit is less than StartBit, then ASSERT().
2248 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2249 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2251 @param Address MMIO register to write.
2252 @param StartBit The ordinal of the least significant bit in the bit field.
2254 @param EndBit The ordinal of the most significant bit in the bit field.
2256 @param AndData The value to AND with read value from the MMIO register.
2257 @param OrData The value to OR with the result of the AND operation.
2259 @return The value written back to the MMIO register.
2264 MmioBitFieldAndThenOr32 (
2273 Reads a 64-bit MMIO register.
2275 Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
2276 returned. This function must guarantee that all MMIO read and write
2277 operations are serialized.
2279 If 64-bit MMIO register operations are not supported, then ASSERT().
2280 If Address is not aligned on a 64-bit boundary, then ASSERT().
2282 @param Address The MMIO register to read.
2284 @return The value read.
2294 Writes a 64-bit MMIO register.
2296 Writes the 64-bit MMIO register specified by Address with the value specified
2297 by Value and returns Value. This function must guarantee that all MMIO read
2298 and write operations are serialized.
2300 If 64-bit MMIO register operations are not supported, then ASSERT().
2301 If Address is not aligned on a 64-bit boundary, then ASSERT().
2303 @param Address The MMIO register to write.
2304 @param Value The value to write to the MMIO register.
2315 Reads a 64-bit MMIO register, performs a bitwise OR, and writes the
2316 result back to the 64-bit MMIO register.
2318 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2319 OR between the read result and the value specified by OrData, and
2320 writes the result to the 64-bit MMIO register specified by Address. The value
2321 written to the MMIO register is returned. This function must guarantee that
2322 all MMIO read and write operations are serialized.
2324 If 64-bit MMIO register operations are not supported, then ASSERT().
2325 If Address is not aligned on a 64-bit boundary, then ASSERT().
2327 @param Address The MMIO register to write.
2328 @param OrData The value to OR with the read value from the MMIO register.
2330 @return The value written back to the MMIO register.
2341 Reads a 64-bit MMIO register, performs a bitwise AND, and writes the result
2342 back to the 64-bit MMIO register.
2344 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2345 between the read result and the value specified by AndData, and writes the
2346 result to the 64-bit MMIO register specified by Address. The value written to
2347 the MMIO register is returned. This function must guarantee that all MMIO
2348 read and write operations are serialized.
2350 If 64-bit MMIO register operations are not supported, then ASSERT().
2351 If Address is not aligned on a 64-bit boundary, then ASSERT().
2353 @param Address The MMIO register to write.
2354 @param AndData The value to AND with the read value from the MMIO register.
2356 @return The value written back to the MMIO register.
2367 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
2368 OR, and writes the result back to the 64-bit MMIO register.
2370 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2371 between the read result and the value specified by AndData, performs a
2372 bitwise OR between the result of the AND operation and the value specified by
2373 OrData, and writes the result to the 64-bit MMIO register specified by
2374 Address. The value written to the MMIO register is returned. This function
2375 must guarantee that all MMIO read and write operations are serialized.
2377 If 64-bit MMIO register operations are not supported, then ASSERT().
2378 If Address is not aligned on a 64-bit boundary, then ASSERT().
2380 @param Address The MMIO register to write.
2381 @param AndData The value to AND with the read value from the MMIO register.
2382 @param OrData The value to OR with the result of the AND operation.
2384 @return The value written back to the MMIO register.
2396 Reads a bit field of a MMIO register.
2398 Reads the bit field in a 64-bit MMIO register. The bit field is specified by
2399 the StartBit and the EndBit. The value of the bit field is returned.
2401 If 64-bit MMIO register operations are not supported, then ASSERT().
2402 If Address is not aligned on a 64-bit boundary, then ASSERT().
2403 If StartBit is greater than 63, then ASSERT().
2404 If EndBit is greater than 63, then ASSERT().
2405 If EndBit is less than StartBit, then ASSERT().
2407 @param Address MMIO register to read.
2408 @param StartBit The ordinal of the least significant bit in the bit field.
2410 @param EndBit The ordinal of the most significant bit in the bit field.
2413 @return The value read.
2418 MmioBitFieldRead64 (
2425 Writes a bit field to a MMIO register.
2427 Writes Value to the bit field of the MMIO register. The bit field is
2428 specified by the StartBit and the EndBit. All other bits in the destination
2429 MMIO register are preserved. The new value of the 64-bit register is returned.
2431 If 64-bit MMIO register operations are not supported, then ASSERT().
2432 If Address is not aligned on a 64-bit boundary, then ASSERT().
2433 If StartBit is greater than 63, then ASSERT().
2434 If EndBit is greater than 63, then ASSERT().
2435 If EndBit is less than StartBit, then ASSERT().
2436 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2438 @param Address MMIO register to write.
2439 @param StartBit The ordinal of the least significant bit in the bit field.
2441 @param EndBit The ordinal of the most significant bit in the bit field.
2443 @param Value New value of the bit field.
2445 @return The value written back to the MMIO register.
2450 MmioBitFieldWrite64 (
2458 Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
2459 writes the result back to the bit field in the 64-bit MMIO register.
2461 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2462 OR between the read result and the value specified by OrData, and
2463 writes the result to the 64-bit MMIO register specified by Address. The value
2464 written to the MMIO register is returned. This function must guarantee that
2465 all MMIO read and write operations are serialized. Extra left bits in OrData
2468 If 64-bit MMIO register operations are not supported, then ASSERT().
2469 If Address is not aligned on a 64-bit boundary, then ASSERT().
2470 If StartBit is greater than 63, then ASSERT().
2471 If EndBit is greater than 63, then ASSERT().
2472 If EndBit is less than StartBit, then ASSERT().
2473 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2475 @param Address MMIO register to write.
2476 @param StartBit The ordinal of the least significant bit in the bit field.
2478 @param EndBit The ordinal of the most significant bit in the bit field.
2480 @param OrData The value to OR with read value from the MMIO register.
2482 @return The value written back to the MMIO register.
2495 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and
2496 writes the result back to the bit field in the 64-bit MMIO register.
2498 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2499 between the read result and the value specified by AndData, and writes the
2500 result to the 64-bit MMIO register specified by Address. The value written to
2501 the MMIO register is returned. This function must guarantee that all MMIO
2502 read and write operations are serialized. Extra left bits in AndData are
2505 If 64-bit MMIO register operations are not supported, then ASSERT().
2506 If Address is not aligned on a 64-bit boundary, then ASSERT().
2507 If StartBit is greater than 63, then ASSERT().
2508 If EndBit is greater than 63, then ASSERT().
2509 If EndBit is less than StartBit, then ASSERT().
2510 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2512 @param Address MMIO register to write.
2513 @param StartBit The ordinal of the least significant bit in the bit field.
2515 @param EndBit The ordinal of the most significant bit in the bit field.
2517 @param AndData The value to AND with read value from the MMIO register.
2519 @return The value written back to the MMIO register.
2532 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed
2533 by a bitwise OR, and writes the result back to the bit field in the
2534 64-bit MMIO register.
2536 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2537 followed by a bitwise OR between the read result and the value
2538 specified by AndData, and writes the result to the 64-bit MMIO register
2539 specified by Address. The value written to the MMIO register is returned.
2540 This function must guarantee that all MMIO read and write operations are
2541 serialized. Extra left bits in both AndData and OrData are stripped.
2543 If 64-bit MMIO register operations are not supported, then ASSERT().
2544 If Address is not aligned on a 64-bit boundary, then ASSERT().
2545 If StartBit is greater than 63, then ASSERT().
2546 If EndBit is greater than 63, then ASSERT().
2547 If EndBit is less than StartBit, then ASSERT().
2548 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2549 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2551 @param Address MMIO register to write.
2552 @param StartBit The ordinal of the least significant bit in the bit field.
2554 @param EndBit The ordinal of the most significant bit in the bit field.
2556 @param AndData The value to AND with read value from the MMIO register.
2557 @param OrData The value to OR with the result of the AND operation.
2559 @return The value written back to the MMIO register.
2564 MmioBitFieldAndThenOr64 (
2573 Copy data from MMIO region to system memory by using 8-bit access.
2575 Copy data from MMIO region specified by starting address StartAddress
2576 to system memory specified by Buffer by using 8-bit access. The total
2577 number of byte to be copied is specified by Length. Buffer is returned.
2579 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2580 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2583 @param StartAddress Starting address for the MMIO region to be copied from.
2584 @param Length The size, in bytes, of Buffer.
2585 @param Buffer Pointer to a system memory buffer receiving the data read.
2593 IN UINTN StartAddress
,
2599 Copy data from MMIO region to system memory by using 16-bit access.
2601 Copy data from MMIO region specified by starting address StartAddress
2602 to system memory specified by Buffer by using 16-bit access. The total
2603 number of byte to be copied is specified by Length. Buffer is returned.
2605 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2607 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2608 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2610 If Length is not aligned on a 16-bit boundary, then ASSERT().
2611 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2613 @param StartAddress Starting address for the MMIO region to be copied from.
2614 @param Length The size, in bytes, of Buffer.
2615 @param Buffer Pointer to a system memory buffer receiving the data read.
2623 IN UINTN StartAddress
,
2629 Copy data from MMIO region to system memory by using 32-bit access.
2631 Copy data from MMIO region specified by starting address StartAddress
2632 to system memory specified by Buffer by using 32-bit access. The total
2633 number of byte to be copied is specified by Length. Buffer is returned.
2635 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2637 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2638 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2640 If Length is not aligned on a 32-bit boundary, then ASSERT().
2641 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2643 @param StartAddress Starting address for the MMIO region to be copied from.
2644 @param Length The size, in bytes, of Buffer.
2645 @param Buffer Pointer to a system memory buffer receiving the data read.
2653 IN UINTN StartAddress
,
2659 Copy data from MMIO region to system memory by using 64-bit access.
2661 Copy data from MMIO region specified by starting address StartAddress
2662 to system memory specified by Buffer by using 64-bit access. The total
2663 number of byte to be copied is specified by Length. Buffer is returned.
2665 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2667 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2668 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2670 If Length is not aligned on a 64-bit boundary, then ASSERT().
2671 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2673 @param StartAddress Starting address for the MMIO region to be copied from.
2674 @param Length The size, in bytes, of Buffer.
2675 @param Buffer Pointer to a system memory buffer receiving the data read.
2683 IN UINTN StartAddress
,
2689 Copy data from system memory to MMIO region by using 8-bit access.
2691 Copy data from system memory specified by Buffer to MMIO region specified
2692 by starting address StartAddress by using 8-bit access. The total number
2693 of byte to be copied is specified by Length. Buffer is returned.
2695 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2696 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2699 @param StartAddress Starting address for the MMIO region to be copied to.
2700 @param Length The size, in bytes, of Buffer.
2701 @param Buffer Pointer to a system memory buffer containing the data to write.
2709 IN UINTN StartAddress
,
2711 IN CONST UINT8
*Buffer
2715 Copy data from system memory to MMIO region by using 16-bit access.
2717 Copy data from system memory specified by Buffer to MMIO region specified
2718 by starting address StartAddress by using 16-bit access. The total number
2719 of byte to be copied is specified by Length. Buffer is returned.
2721 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2723 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2724 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2726 If Length is not aligned on a 16-bit boundary, then ASSERT().
2728 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2730 @param StartAddress Starting address for the MMIO region to be copied to.
2731 @param Length The size, in bytes, of Buffer.
2732 @param Buffer Pointer to a system memory buffer containing the data to write.
2740 IN UINTN StartAddress
,
2742 IN CONST UINT16
*Buffer
2746 Copy data from system memory to MMIO region by using 32-bit access.
2748 Copy data from system memory specified by Buffer to MMIO region specified
2749 by starting address StartAddress by using 32-bit access. The total number
2750 of byte to be copied is specified by Length. Buffer is returned.
2752 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2754 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2755 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2757 If Length is not aligned on a 32-bit boundary, then ASSERT().
2759 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2761 @param StartAddress Starting address for the MMIO region to be copied to.
2762 @param Length The size, in bytes, of Buffer.
2763 @param Buffer Pointer to a system memory buffer containing the data to write.
2771 IN UINTN StartAddress
,
2773 IN CONST UINT32
*Buffer
2777 Copy data from system memory to MMIO region by using 64-bit access.
2779 Copy data from system memory specified by Buffer to MMIO region specified
2780 by starting address StartAddress by using 64-bit access. The total number
2781 of byte to be copied is specified by Length. Buffer is returned.
2783 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2785 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2786 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2788 If Length is not aligned on a 64-bit boundary, then ASSERT().
2790 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2792 @param StartAddress Starting address for the MMIO region to be copied to.
2793 @param Length The size, in bytes, of Buffer.
2794 @param Buffer Pointer to a system memory buffer containing the data to write.
2802 IN UINTN StartAddress
,
2804 IN CONST UINT64
*Buffer