]>
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 - 2012, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 Macro that converts PCI Segment and I/O Port to an address that can be
22 passed to the I/O Library functions.
24 Computes an address that is compatible with the I/O Library functions.
25 The unused upper bits of Segment, and Port are stripped prior to the
26 generation of the address.
28 @param Segment PCI Segment number. Range 0..65535.
29 @param Port I/O Port number. Range 0..65535.
31 @return An address that the I/o Library functions need.
35 #define IO_LIB_ADDRESS(Segment,Port) \
36 ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) )
39 Reads an 8-bit I/O port.
41 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
42 This function must guarantee that all I/O read and write operations are
45 If 8-bit I/O port operations are not supported, then ASSERT().
47 @param Port The I/O port to read.
49 @return The value read.
59 Writes an 8-bit I/O port.
61 Writes the 8-bit I/O port specified by Port with the value specified by Value
62 and returns Value. This function must guarantee that all I/O read and write
63 operations are serialized.
65 If 8-bit I/O port operations are not supported, then ASSERT().
67 @param Port The I/O port to write.
68 @param Value The value to write to the I/O port.
70 @return The value written the I/O port.
81 Reads an 8-bit I/O port fifo into a block of memory.
83 Reads the 8-bit I/O fifo port specified by Port.
84 The port is read Count times, and the read data is
85 stored in the provided Buffer.
87 This function must guarantee that all I/O read and write operations are
90 If 8-bit I/O port operations are not supported, then ASSERT().
92 @param Port The I/O port to read.
93 @param Count The number of times to read I/O port.
94 @param Buffer The buffer to store the read data into.
106 Writes a block of memory into an 8-bit I/O port fifo.
108 Writes the 8-bit I/O fifo port specified by Port.
109 The port is written Count times, and the write data is
110 retrieved from the provided Buffer.
112 This function must guarantee that all I/O write and write operations are
115 If 8-bit I/O port operations are not supported, then ASSERT().
117 @param Port The I/O port to write.
118 @param Count The number of times to write I/O port.
119 @param Buffer The buffer to retrieve the write data from.
131 Reads an 8-bit I/O port, performs a bitwise OR, and writes the
132 result back to the 8-bit I/O port.
134 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
135 between the read result and the value specified by OrData, and writes the
136 result to the 8-bit I/O port specified by Port. The value written to the I/O
137 port is returned. This function must guarantee that all I/O read and write
138 operations are serialized.
140 If 8-bit I/O port operations are not supported, then ASSERT().
142 @param Port The I/O port to write.
143 @param OrData The value to OR with the read value from the I/O port.
145 @return The value written back to the I/O port.
156 Reads an 8-bit I/O port, performs a bitwise AND, and writes the result back
157 to the 8-bit I/O port.
159 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
160 the read result and the value specified by AndData, and writes the result to
161 the 8-bit I/O port specified by Port. The value written to the I/O port is
162 returned. This function must guarantee that all I/O read and write operations
165 If 8-bit I/O port operations are not supported, then ASSERT().
167 @param Port The I/O port to write.
168 @param AndData The value to AND with the read value from the I/O port.
170 @return The value written back to the I/O port.
181 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
182 OR, and writes the result back to the 8-bit I/O port.
184 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
185 the read result and the value specified by AndData, performs a bitwise OR
186 between the result of the AND operation and the value specified by OrData,
187 and writes the result to the 8-bit I/O port specified by Port. The value
188 written to the I/O port is returned. This function must guarantee that all
189 I/O read and write operations are serialized.
191 If 8-bit I/O port operations are not supported, then ASSERT().
193 @param Port The I/O port to write.
194 @param AndData The value to AND with the read value from the I/O port.
195 @param OrData The value to OR with the result of the AND operation.
197 @return The value written back to the I/O port.
209 Reads a bit field of an I/O register.
211 Reads the bit field in an 8-bit I/O register. The bit field is specified by
212 the StartBit and the EndBit. The value of the bit field is returned.
214 If 8-bit I/O port operations are not supported, then ASSERT().
215 If StartBit is greater than 7, then ASSERT().
216 If EndBit is greater than 7, then ASSERT().
217 If EndBit is less than StartBit, then ASSERT().
219 @param Port The I/O port to read.
220 @param StartBit The ordinal of the least significant bit in the bit field.
222 @param EndBit The ordinal of the most significant bit in the bit field.
225 @return The value read.
237 Writes a bit field to an I/O register.
239 Writes Value to the bit field of the I/O register. The bit field is specified
240 by the StartBit and the EndBit. All other bits in the destination I/O
241 register are preserved. The value written to the I/O port is returned.
243 If 8-bit I/O port operations are not supported, then ASSERT().
244 If StartBit is greater than 7, then ASSERT().
245 If EndBit is greater than 7, then ASSERT().
246 If EndBit is less than StartBit, then ASSERT().
247 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
249 @param Port The I/O port to write.
250 @param StartBit The ordinal of the least significant bit in the bit field.
252 @param EndBit The ordinal of the most significant bit in the bit field.
254 @param Value New value of the bit field.
256 @return The value written back to the I/O port.
269 Reads a bit field in an 8-bit port, performs a bitwise OR, and writes the
270 result back to the bit field in the 8-bit port.
272 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
273 between the read result and the value specified by OrData, and writes the
274 result to the 8-bit I/O port specified by Port. The value written to the I/O
275 port is returned. This function must guarantee that all I/O read and write
276 operations are serialized. Extra left bits in OrData are stripped.
278 If 8-bit I/O port operations are not supported, then ASSERT().
279 If StartBit is greater than 7, then ASSERT().
280 If EndBit is greater than 7, then ASSERT().
281 If EndBit is less than StartBit, then ASSERT().
282 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
284 @param Port The I/O port to write.
285 @param StartBit The ordinal of the least significant bit in the bit field.
287 @param EndBit The ordinal of the most significant bit in the bit field.
289 @param OrData The value to OR with the read value from the I/O port.
291 @return The value written back to the I/O port.
304 Reads a bit field in an 8-bit port, performs a bitwise AND, and writes the
305 result back to the bit field in the 8-bit port.
307 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
308 the read result and the value specified by AndData, and writes the result to
309 the 8-bit I/O port specified by Port. The value written to the I/O port is
310 returned. This function must guarantee that all I/O read and write operations
311 are serialized. Extra left bits in AndData are stripped.
313 If 8-bit I/O port operations are not supported, then ASSERT().
314 If StartBit is greater than 7, then ASSERT().
315 If EndBit is greater than 7, then ASSERT().
316 If EndBit is less than StartBit, then ASSERT().
317 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
319 @param Port The I/O port to write.
320 @param StartBit The ordinal of the least significant bit in the bit field.
322 @param EndBit The ordinal of the most significant bit in the bit field.
324 @param AndData The value to AND with the read value from the I/O port.
326 @return The value written back to the I/O port.
339 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
340 bitwise OR, and writes the result back to the bit field in the
343 Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed
344 by a bitwise OR between the read result and the value specified by
345 AndData, and writes the result to the 8-bit I/O port specified by Port. The
346 value written to the I/O port is returned. This function must guarantee that
347 all I/O read and write operations are serialized. Extra left bits in both
348 AndData and OrData are stripped.
350 If 8-bit I/O port operations are not supported, then ASSERT().
351 If StartBit is greater than 7, then ASSERT().
352 If EndBit is greater than 7, then ASSERT().
353 If EndBit is less than StartBit, then ASSERT().
354 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
355 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
357 @param Port The I/O port to write.
358 @param StartBit The ordinal of the least significant bit in the bit field.
360 @param EndBit The ordinal of the most significant bit in the bit field.
362 @param AndData The value to AND with the read value from the I/O port.
363 @param OrData The value to OR with the result of the AND operation.
365 @return The value written back to the I/O port.
370 IoBitFieldAndThenOr8 (
379 Reads a 16-bit I/O port.
381 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
382 This function must guarantee that all I/O read and write operations are
385 If 16-bit I/O port operations are not supported, then ASSERT().
386 If Port is not aligned on a 16-bit boundary, then ASSERT().
388 @param Port The I/O port to read.
390 @return The value read.
400 Writes a 16-bit I/O port.
402 Writes the 16-bit I/O port specified by Port with the value specified by Value
403 and returns Value. This function must guarantee that all I/O read and write
404 operations are serialized.
406 If 16-bit I/O port operations are not supported, then ASSERT().
407 If Port is not aligned on a 16-bit boundary, then ASSERT().
409 @param Port The I/O port to write.
410 @param Value The value to write to the I/O port.
412 @return The value written the I/O port.
423 Reads a 16-bit I/O port fifo into a block of memory.
425 Reads the 16-bit I/O fifo port specified by Port.
426 The port is read Count times, and the read data is
427 stored in the provided Buffer.
429 This function must guarantee that all I/O read and write operations are
432 If 16-bit I/O port operations are not supported, then ASSERT().
434 @param Port The I/O port to read.
435 @param Count The number of times to read I/O port.
436 @param Buffer The buffer to store the read data into.
448 Writes a block of memory into a 16-bit I/O port fifo.
450 Writes the 16-bit I/O fifo port specified by Port.
451 The port is written Count times, and the write data is
452 retrieved from the provided Buffer.
454 This function must guarantee that all I/O write and write operations are
457 If 16-bit I/O port operations are not supported, then ASSERT().
459 @param Port The I/O port to write.
460 @param Count The number of times to write I/O port.
461 @param Buffer The buffer to retrieve the write data from.
473 Reads a 16-bit I/O port, performs a bitwise OR, and writes the
474 result back to the 16-bit I/O port.
476 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
477 between the read result and the value specified by OrData, and writes the
478 result to the 16-bit I/O port specified by Port. The value written to the I/O
479 port is returned. This function must guarantee that all I/O read and write
480 operations are serialized.
482 If 16-bit I/O port operations are not supported, then ASSERT().
483 If Port is not aligned on a 16-bit boundary, then ASSERT().
485 @param Port The I/O port to write.
486 @param OrData The value to OR with the read value from the I/O port.
488 @return The value written back to the I/O port.
499 Reads a 16-bit I/O port, performs a bitwise AND, and writes the result back
500 to the 16-bit I/O port.
502 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
503 the read result and the value specified by AndData, and writes the result to
504 the 16-bit I/O port specified by Port. The value written to the I/O port is
505 returned. This function must guarantee that all I/O read and write operations
508 If 16-bit I/O port operations are not supported, then ASSERT().
509 If Port is not aligned on a 16-bit boundary, then ASSERT().
511 @param Port The I/O port to write.
512 @param AndData The value to AND with the read value from the I/O port.
514 @return The value written back to the I/O port.
525 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
526 OR, and writes the result back to the 16-bit I/O port.
528 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
529 the read result and the value specified by AndData, performs a bitwise OR
530 between the result of the AND operation and the value specified by OrData,
531 and writes the result to the 16-bit I/O port specified by Port. The value
532 written to the I/O port is returned. This function must guarantee that all
533 I/O read and write operations are serialized.
535 If 16-bit I/O port operations are not supported, then ASSERT().
536 If Port is not aligned on a 16-bit boundary, then ASSERT().
538 @param Port The I/O port to write.
539 @param AndData The value to AND with the read value from the I/O port.
540 @param OrData The value to OR with the result of the AND operation.
542 @return The value written back to the I/O port.
554 Reads a bit field of an I/O register.
556 Reads the bit field in a 16-bit I/O register. The bit field is specified by
557 the StartBit and the EndBit. The value of the bit field is returned.
559 If 16-bit I/O port operations are not supported, then ASSERT().
560 If Port is not aligned on a 16-bit boundary, then ASSERT().
561 If StartBit is greater than 15, then ASSERT().
562 If EndBit is greater than 15, then ASSERT().
563 If EndBit is less than StartBit, then ASSERT().
565 @param Port The I/O port to read.
566 @param StartBit The ordinal of the least significant bit in the bit field.
568 @param EndBit The ordinal of the most significant bit in the bit field.
571 @return The value read.
583 Writes a bit field to an I/O register.
585 Writes Value to the bit field of the I/O register. The bit field is specified
586 by the StartBit and the EndBit. All other bits in the destination I/O
587 register are preserved. The value written to the I/O port is returned. Extra
588 left bits in Value are stripped.
590 If 16-bit I/O port operations are not supported, then ASSERT().
591 If Port is not aligned on a 16-bit boundary, then ASSERT().
592 If StartBit is greater than 15, then ASSERT().
593 If EndBit is greater than 15, then ASSERT().
594 If EndBit is less than StartBit, then ASSERT().
595 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
597 @param Port The I/O port to write.
598 @param StartBit The ordinal of the least significant bit in the bit field.
600 @param EndBit The ordinal of the most significant bit in the bit field.
602 @param Value New value of the bit field.
604 @return The value written back to the I/O port.
617 Reads a bit field in a 16-bit port, performs a bitwise OR, and writes the
618 result back to the bit field in the 16-bit port.
620 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
621 between the read result and the value specified by OrData, and writes the
622 result to the 16-bit I/O port specified by Port. The value written to the I/O
623 port is returned. This function must guarantee that all I/O read and write
624 operations are serialized. Extra left bits in OrData are stripped.
626 If 16-bit I/O port operations are not supported, then ASSERT().
627 If Port is not aligned on a 16-bit boundary, then ASSERT().
628 If StartBit is greater than 15, then ASSERT().
629 If EndBit is greater than 15, then ASSERT().
630 If EndBit is less than StartBit, then ASSERT().
631 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
633 @param Port The I/O port to write.
634 @param StartBit The ordinal of the least significant bit in the bit field.
636 @param EndBit The ordinal of the most significant bit in the bit field.
638 @param OrData The value to OR with the read value from the I/O port.
640 @return The value written back to the I/O port.
653 Reads a bit field in a 16-bit port, performs a bitwise AND, and writes the
654 result back to the bit field in the 16-bit port.
656 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
657 the read result and the value specified by AndData, and writes the result to
658 the 16-bit I/O port specified by Port. The value written to the I/O port is
659 returned. This function must guarantee that all I/O read and write operations
660 are serialized. Extra left bits in AndData are stripped.
662 If 16-bit I/O port operations are not supported, then ASSERT().
663 If Port is not aligned on a 16-bit boundary, then ASSERT().
664 If StartBit is greater than 15, then ASSERT().
665 If EndBit is greater than 15, then ASSERT().
666 If EndBit is less than StartBit, then ASSERT().
667 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
669 @param Port The I/O port to write.
670 @param StartBit The ordinal of the least significant bit in the bit field.
672 @param EndBit The ordinal of the most significant bit in the bit field.
674 @param AndData The value to AND with the read value from the I/O port.
676 @return The value written back to the I/O port.
689 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
690 bitwise OR, and writes the result back to the bit field in the
693 Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed
694 by a bitwise OR between the read result and the value specified by
695 AndData, and writes the result to the 16-bit I/O port specified by Port. The
696 value written to the I/O port is returned. This function must guarantee that
697 all I/O read and write operations are serialized. Extra left bits in both
698 AndData and OrData are stripped.
700 If 16-bit I/O port operations are not supported, then ASSERT().
701 If Port is not aligned on a 16-bit boundary, then ASSERT().
702 If StartBit is greater than 15, then ASSERT().
703 If EndBit is greater than 15, then ASSERT().
704 If EndBit is less than StartBit, then ASSERT().
705 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
706 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
708 @param Port The I/O port to write.
709 @param StartBit The ordinal of the least significant bit in the bit field.
711 @param EndBit The ordinal of the most significant bit in the bit field.
713 @param AndData The value to AND with the read value from the I/O port.
714 @param OrData The value to OR with the result of the AND operation.
716 @return The value written back to the I/O port.
721 IoBitFieldAndThenOr16 (
730 Reads a 32-bit I/O port.
732 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
733 This function must guarantee that all I/O read and write operations are
736 If 32-bit I/O port operations are not supported, then ASSERT().
737 If Port is not aligned on a 32-bit boundary, then ASSERT().
739 @param Port The I/O port to read.
741 @return The value read.
751 Writes a 32-bit I/O port.
753 Writes the 32-bit I/O port specified by Port with the value specified by Value
754 and returns Value. This function must guarantee that all I/O read and write
755 operations are serialized.
757 If 32-bit I/O port operations are not supported, then ASSERT().
758 If Port is not aligned on a 32-bit boundary, then ASSERT().
760 @param Port The I/O port to write.
761 @param Value The value to write to the I/O port.
763 @return The value written the I/O port.
774 Reads a 32-bit I/O port fifo into a block of memory.
776 Reads the 32-bit I/O fifo port specified by Port.
777 The port is read Count times, and the read data is
778 stored in the provided Buffer.
780 This function must guarantee that all I/O read and write operations are
783 If 32-bit I/O port operations are not supported, then ASSERT().
785 @param Port The I/O port to read.
786 @param Count The number of times to read I/O port.
787 @param Buffer The buffer to store the read data into.
799 Writes a block of memory into a 32-bit I/O port fifo.
801 Writes the 32-bit I/O fifo port specified by Port.
802 The port is written Count times, and the write data is
803 retrieved from the provided Buffer.
805 This function must guarantee that all I/O write and write operations are
808 If 32-bit I/O port operations are not supported, then ASSERT().
810 @param Port The I/O port to write.
811 @param Count The number of times to write I/O port.
812 @param Buffer The buffer to retrieve the write data from.
824 Reads a 32-bit I/O port, performs a bitwise OR, and writes the
825 result back to the 32-bit I/O port.
827 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
828 between the read result and the value specified by OrData, and writes the
829 result to the 32-bit I/O port specified by Port. The value written to the I/O
830 port is returned. This function must guarantee that all I/O read and write
831 operations are serialized.
833 If 32-bit I/O port operations are not supported, then ASSERT().
834 If Port is not aligned on a 32-bit boundary, then ASSERT().
836 @param Port The I/O port to write.
837 @param OrData The value to OR with the read value from the I/O port.
839 @return The value written back to the I/O port.
850 Reads a 32-bit I/O port, performs a bitwise AND, and writes the result back
851 to the 32-bit I/O port.
853 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
854 the read result and the value specified by AndData, and writes the result to
855 the 32-bit I/O port specified by Port. The value written to the I/O port is
856 returned. This function must guarantee that all I/O read and write operations
859 If 32-bit I/O port operations are not supported, then ASSERT().
860 If Port is not aligned on a 32-bit boundary, then ASSERT().
862 @param Port The I/O port to write.
863 @param AndData The value to AND with the read value from the I/O port.
865 @return The value written back to the I/O port.
876 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
877 OR, and writes the result back to the 32-bit I/O port.
879 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
880 the read result and the value specified by AndData, performs a bitwise OR
881 between the result of the AND operation and the value specified by OrData,
882 and writes the result to the 32-bit I/O port specified by Port. The value
883 written to the I/O port is returned. This function must guarantee that all
884 I/O read and write operations are serialized.
886 If 32-bit I/O port operations are not supported, then ASSERT().
887 If Port is not aligned on a 32-bit boundary, then ASSERT().
889 @param Port The I/O port to write.
890 @param AndData The value to AND with the read value from the I/O port.
891 @param OrData The value to OR with the result of the AND operation.
893 @return The value written back to the I/O port.
905 Reads a bit field of an I/O register.
907 Reads the bit field in a 32-bit I/O register. The bit field is specified by
908 the StartBit and the EndBit. The value of the bit field is returned.
910 If 32-bit I/O port operations are not supported, then ASSERT().
911 If Port is not aligned on a 32-bit boundary, then ASSERT().
912 If StartBit is greater than 31, then ASSERT().
913 If EndBit is greater than 31, then ASSERT().
914 If EndBit is less than StartBit, then ASSERT().
916 @param Port The I/O port to read.
917 @param StartBit The ordinal of the least significant bit in the bit field.
919 @param EndBit The ordinal of the most significant bit in the bit field.
922 @return The value read.
934 Writes a bit field to an I/O register.
936 Writes Value to the bit field of the I/O register. The bit field is specified
937 by the StartBit and the EndBit. All other bits in the destination I/O
938 register are preserved. The value written to the I/O port is returned. Extra
939 left bits in Value are stripped.
941 If 32-bit I/O port operations are not supported, then ASSERT().
942 If Port is not aligned on a 32-bit boundary, then ASSERT().
943 If StartBit is greater than 31, then ASSERT().
944 If EndBit is greater than 31, then ASSERT().
945 If EndBit is less than StartBit, then ASSERT().
946 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
948 @param Port The I/O port to write.
949 @param StartBit The ordinal of the least significant bit in the bit field.
951 @param EndBit The ordinal of the most significant bit in the bit field.
953 @param Value New value of the bit field.
955 @return The value written back to the I/O port.
968 Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the
969 result back to the bit field in the 32-bit port.
971 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
972 between the read result and the value specified by OrData, and writes the
973 result to the 32-bit I/O port specified by Port. The value written to the I/O
974 port is returned. This function must guarantee that all I/O read and write
975 operations are serialized. Extra left bits in OrData are stripped.
977 If 32-bit I/O port operations are not supported, then ASSERT().
978 If Port is not aligned on a 32-bit boundary, then ASSERT().
979 If StartBit is greater than 31, then ASSERT().
980 If EndBit is greater than 31, then ASSERT().
981 If EndBit is less than StartBit, then ASSERT().
982 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
984 @param Port The I/O port to write.
985 @param StartBit The ordinal of the least significant bit in the bit field.
987 @param EndBit The ordinal of the most significant bit in the bit field.
989 @param OrData The value to OR with the read value from the I/O port.
991 @return The value written back to the I/O port.
1004 Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the
1005 result back to the bit field in the 32-bit port.
1007 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
1008 the read result and the value specified by AndData, and writes the result to
1009 the 32-bit I/O port specified by Port. The value written to the I/O port is
1010 returned. This function must guarantee that all I/O read and write operations
1011 are serialized. Extra left bits in AndData are stripped.
1013 If 32-bit I/O port operations are not supported, then ASSERT().
1014 If Port is not aligned on a 32-bit boundary, then ASSERT().
1015 If StartBit is greater than 31, then ASSERT().
1016 If EndBit is greater than 31, then ASSERT().
1017 If EndBit is less than StartBit, then ASSERT().
1018 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1020 @param Port The I/O port to write.
1021 @param StartBit The ordinal of the least significant bit in the bit field.
1023 @param EndBit The ordinal of the most significant bit in the bit field.
1025 @param AndData The value to AND with the read value from the I/O port.
1027 @return The value written back to the I/O port.
1040 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
1041 bitwise OR, and writes the result back to the bit field in the
1044 Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
1045 by a bitwise OR between the read result and the value specified by
1046 AndData, and writes the result to the 32-bit I/O port specified by Port. The
1047 value written to the I/O port is returned. This function must guarantee that
1048 all I/O read and write operations are serialized. Extra left bits in both
1049 AndData and OrData are stripped.
1051 If 32-bit I/O port operations are not supported, then ASSERT().
1052 If Port is not aligned on a 32-bit boundary, then ASSERT().
1053 If StartBit is greater than 31, then ASSERT().
1054 If EndBit is greater than 31, then ASSERT().
1055 If EndBit is less than StartBit, then ASSERT().
1056 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1057 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1059 @param Port The I/O port to write.
1060 @param StartBit The ordinal of the least significant bit in the bit field.
1062 @param EndBit The ordinal of the most significant bit in the bit field.
1064 @param AndData The value to AND with the read value from the I/O port.
1065 @param OrData The value to OR with the result of the AND operation.
1067 @return The value written back to the I/O port.
1072 IoBitFieldAndThenOr32 (
1081 Reads a 64-bit I/O port.
1083 Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
1084 This function must guarantee that all I/O read and write operations are
1087 If 64-bit I/O port operations are not supported, then ASSERT().
1088 If Port is not aligned on a 64-bit boundary, then ASSERT().
1090 @param Port The I/O port to read.
1092 @return The value read.
1102 Writes a 64-bit I/O port.
1104 Writes the 64-bit I/O port specified by Port with the value specified by Value
1105 and returns Value. This function must guarantee that all I/O read and write
1106 operations are serialized.
1108 If 64-bit I/O port operations are not supported, then ASSERT().
1109 If Port is not aligned on a 64-bit boundary, then ASSERT().
1111 @param Port The I/O port to write.
1112 @param Value The value to write to the I/O port.
1114 @return The value written the I/O port.
1125 Reads a 64-bit I/O port, performs a bitwise OR, and writes the
1126 result back to the 64-bit I/O port.
1128 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1129 between the read result and the value specified by OrData, and writes the
1130 result to the 64-bit I/O port specified by Port. The value written to the I/O
1131 port is returned. This function must guarantee that all I/O read and write
1132 operations are serialized.
1134 If 64-bit I/O port operations are not supported, then ASSERT().
1135 If Port is not aligned on a 64-bit boundary, then ASSERT().
1137 @param Port The I/O port to write.
1138 @param OrData The value to OR with the read value from the I/O port.
1140 @return The value written back to the I/O port.
1151 Reads a 64-bit I/O port, performs a bitwise AND, and writes the result back
1152 to the 64-bit I/O port.
1154 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1155 the read result and the value specified by AndData, and writes the result to
1156 the 64-bit I/O port specified by Port. The value written to the I/O port is
1157 returned. This function must guarantee that all I/O read and write operations
1160 If 64-bit I/O port operations are not supported, then ASSERT().
1161 If Port is not aligned on a 64-bit boundary, then ASSERT().
1163 @param Port The I/O port to write.
1164 @param AndData The value to AND with the read value from the I/O port.
1166 @return The value written back to the I/O port.
1177 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
1178 OR, and writes the result back to the 64-bit I/O port.
1180 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1181 the read result and the value specified by AndData, performs a bitwise OR
1182 between the result of the AND operation and the value specified by OrData,
1183 and writes the result to the 64-bit I/O port specified by Port. The value
1184 written to the I/O port is returned. This function must guarantee that all
1185 I/O read and write operations are serialized.
1187 If 64-bit I/O port operations are not supported, then ASSERT().
1188 If Port is not aligned on a 64-bit boundary, then ASSERT().
1190 @param Port The I/O port to write.
1191 @param AndData The value to AND with the read value from the I/O port.
1192 @param OrData The value to OR with the result of the AND operation.
1194 @return The value written back to the I/O port.
1206 Reads a bit field of an I/O register.
1208 Reads the bit field in a 64-bit I/O register. The bit field is specified by
1209 the StartBit and the EndBit. The value of the bit field is returned.
1211 If 64-bit I/O port operations are not supported, then ASSERT().
1212 If Port is not aligned on a 64-bit boundary, then ASSERT().
1213 If StartBit is greater than 63, then ASSERT().
1214 If EndBit is greater than 63, then ASSERT().
1215 If EndBit is less than StartBit, then ASSERT().
1217 @param Port The I/O port to read.
1218 @param StartBit The ordinal of the least significant bit in the bit field.
1220 @param EndBit The ordinal of the most significant bit in the bit field.
1223 @return The value read.
1235 Writes a bit field to an I/O register.
1237 Writes Value to the bit field of the I/O register. The bit field is specified
1238 by the StartBit and the EndBit. All other bits in the destination I/O
1239 register are preserved. The value written to the I/O port is returned. Extra
1240 left bits in Value are stripped.
1242 If 64-bit I/O port operations are not supported, then ASSERT().
1243 If Port is not aligned on a 64-bit boundary, then ASSERT().
1244 If StartBit is greater than 63, then ASSERT().
1245 If EndBit is greater than 63, then ASSERT().
1246 If EndBit is less than StartBit, then ASSERT().
1247 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1249 @param Port The I/O port to write.
1250 @param StartBit The ordinal of the least significant bit in the bit field.
1252 @param EndBit The ordinal of the most significant bit in the bit field.
1254 @param Value New value of the bit field.
1256 @return The value written back to the I/O port.
1269 Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the
1270 result back to the bit field in the 64-bit port.
1272 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1273 between the read result and the value specified by OrData, and writes the
1274 result to the 64-bit I/O port specified by Port. The value written to the I/O
1275 port is returned. This function must guarantee that all I/O read and write
1276 operations are serialized. Extra left bits in OrData are stripped.
1278 If 64-bit I/O port operations are not supported, then ASSERT().
1279 If Port is not aligned on a 64-bit boundary, then ASSERT().
1280 If StartBit is greater than 63, then ASSERT().
1281 If EndBit is greater than 63, then ASSERT().
1282 If EndBit is less than StartBit, then ASSERT().
1283 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1285 @param Port The I/O port to write.
1286 @param StartBit The ordinal of the least significant bit in the bit field.
1288 @param EndBit The ordinal of the most significant bit in the bit field.
1290 @param OrData The value to OR with the read value from the I/O port.
1292 @return The value written back to the I/O port.
1305 Reads a bit field in a 64-bit port, performs a bitwise AND, and writes the
1306 result back to the bit field in the 64-bit port.
1308 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1309 the read result and the value specified by AndData, and writes the result to
1310 the 64-bit I/O port specified by Port. The value written to the I/O port is
1311 returned. This function must guarantee that all I/O read and write operations
1312 are serialized. Extra left bits in AndData are stripped.
1314 If 64-bit I/O port operations are not supported, then ASSERT().
1315 If Port is not aligned on a 64-bit boundary, then ASSERT().
1316 If StartBit is greater than 63, then ASSERT().
1317 If EndBit is greater than 63, then ASSERT().
1318 If EndBit is less than StartBit, then ASSERT().
1319 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1321 @param Port The I/O port to write.
1322 @param StartBit The ordinal of the least significant bit in the bit field.
1324 @param EndBit The ordinal of the most significant bit in the bit field.
1326 @param AndData The value to AND with the read value from the I/O port.
1328 @return The value written back to the I/O port.
1341 Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
1342 bitwise OR, and writes the result back to the bit field in the
1345 Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed
1346 by a bitwise OR between the read result and the value specified by
1347 AndData, and writes the result to the 64-bit I/O port specified by Port. The
1348 value written to the I/O port is returned. This function must guarantee that
1349 all I/O read and write operations are serialized. Extra left bits in both
1350 AndData and OrData are stripped.
1352 If 64-bit I/O port operations are not supported, then ASSERT().
1353 If Port is not aligned on a 64-bit boundary, then ASSERT().
1354 If StartBit is greater than 63, then ASSERT().
1355 If EndBit is greater than 63, then ASSERT().
1356 If EndBit is less than StartBit, then ASSERT().
1357 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1358 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1360 @param Port The I/O port to write.
1361 @param StartBit The ordinal of the least significant bit in the bit field.
1363 @param EndBit The ordinal of the most significant bit in the bit field.
1365 @param AndData The value to AND with the read value from the I/O port.
1366 @param OrData The value to OR with the result of the AND operation.
1368 @return The value written back to the I/O port.
1373 IoBitFieldAndThenOr64 (
1382 Reads an 8-bit MMIO register.
1384 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
1385 returned. This function must guarantee that all MMIO read and write
1386 operations are serialized.
1388 If 8-bit MMIO register operations are not supported, then ASSERT().
1390 @param Address The MMIO register to read.
1392 @return The value read.
1402 Writes an 8-bit MMIO register.
1404 Writes the 8-bit MMIO register specified by Address with the value specified
1405 by Value and returns Value. This function must guarantee that all MMIO read
1406 and write operations are serialized.
1408 If 8-bit MMIO register operations are not supported, then ASSERT().
1410 @param Address The MMIO register to write.
1411 @param Value The value to write to the MMIO register.
1424 Reads an 8-bit MMIO register, performs a bitwise OR, and writes the
1425 result back to the 8-bit MMIO register.
1427 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1428 OR between the read result and the value specified by OrData, and
1429 writes the result to the 8-bit MMIO register specified by Address. The value
1430 written to the MMIO register is returned. This function must guarantee that
1431 all MMIO read and write operations are serialized.
1433 If 8-bit MMIO register operations are not supported, then ASSERT().
1435 @param Address The MMIO register to write.
1436 @param OrData The value to OR with the read value from the MMIO register.
1438 @return The value written back to the MMIO register.
1449 Reads an 8-bit MMIO register, performs a bitwise AND, and writes the result
1450 back to the 8-bit MMIO register.
1452 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1453 between the read result and the value specified by AndData, and writes the
1454 result to the 8-bit MMIO register specified by Address. The value written to
1455 the MMIO register is returned. This function must guarantee that all MMIO
1456 read and write operations are serialized.
1458 If 8-bit MMIO register operations are not supported, then ASSERT().
1460 @param Address The MMIO register to write.
1461 @param AndData The value to AND with the read value from the MMIO register.
1463 @return The value written back to the MMIO register.
1474 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
1475 OR, and writes the result back to the 8-bit MMIO register.
1477 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1478 between the read result and the value specified by AndData, performs a
1479 bitwise OR between the result of the AND operation and the value specified by
1480 OrData, and writes the result to the 8-bit MMIO register specified by
1481 Address. The value written to the MMIO register is returned. This function
1482 must guarantee that all MMIO read and write operations are serialized.
1484 If 8-bit MMIO register operations are not supported, then ASSERT().
1487 @param Address The MMIO register to write.
1488 @param AndData The value to AND with the read value from the MMIO register.
1489 @param OrData The value to OR with the result of the AND operation.
1491 @return The value written back to the MMIO register.
1503 Reads a bit field of a MMIO register.
1505 Reads the bit field in an 8-bit MMIO register. The bit field is specified by
1506 the StartBit and the EndBit. The value of the bit field is returned.
1508 If 8-bit MMIO register operations are not supported, then ASSERT().
1509 If StartBit is greater than 7, then ASSERT().
1510 If EndBit is greater than 7, then ASSERT().
1511 If EndBit is less than StartBit, then ASSERT().
1513 @param Address MMIO register to read.
1514 @param StartBit The ordinal of the least significant bit in the bit field.
1516 @param EndBit The ordinal of the most significant bit in the bit field.
1519 @return The value read.
1531 Writes a bit field to a MMIO register.
1533 Writes Value to the bit field of the MMIO register. The bit field is
1534 specified by the StartBit and the EndBit. All other bits in the destination
1535 MMIO register are preserved. The new value of the 8-bit register is returned.
1537 If 8-bit MMIO register operations are not supported, then ASSERT().
1538 If StartBit is greater than 7, then ASSERT().
1539 If EndBit is greater than 7, then ASSERT().
1540 If EndBit is less than StartBit, then ASSERT().
1541 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1543 @param Address MMIO register to write.
1544 @param StartBit The ordinal of the least significant bit in the bit field.
1546 @param EndBit The ordinal of the most significant bit in the bit field.
1548 @param Value New value of the bit field.
1550 @return The value written back to the MMIO register.
1555 MmioBitFieldWrite8 (
1563 Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and
1564 writes the result back to the bit field in the 8-bit MMIO register.
1566 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1567 OR between the read result and the value specified by OrData, and
1568 writes the result to the 8-bit MMIO register specified by Address. The value
1569 written to the MMIO register is returned. This function must guarantee that
1570 all MMIO read and write operations are serialized. Extra left bits in OrData
1573 If 8-bit MMIO register operations are not supported, then ASSERT().
1574 If StartBit is greater than 7, then ASSERT().
1575 If EndBit is greater than 7, then ASSERT().
1576 If EndBit is less than StartBit, then ASSERT().
1577 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1579 @param Address MMIO register to write.
1580 @param StartBit The ordinal of the least significant bit in the bit field.
1582 @param EndBit The ordinal of the most significant bit in the bit field.
1584 @param OrData The value to OR with read value from the MMIO register.
1586 @return The value written back to the MMIO register.
1599 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and
1600 writes the result back to the bit field in the 8-bit MMIO register.
1602 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1603 between the read result and the value specified by AndData, and writes the
1604 result to the 8-bit MMIO register specified by Address. The value written to
1605 the MMIO register is returned. This function must guarantee that all MMIO
1606 read and write operations are serialized. Extra left bits in AndData are
1609 If 8-bit MMIO register operations are not supported, then ASSERT().
1610 If StartBit is greater than 7, then ASSERT().
1611 If EndBit is greater than 7, then ASSERT().
1612 If EndBit is less than StartBit, then ASSERT().
1613 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1615 @param Address MMIO register to write.
1616 @param StartBit The ordinal of the least significant bit in the bit field.
1618 @param EndBit The ordinal of the most significant bit in the bit field.
1620 @param AndData The value to AND with read value from the MMIO register.
1622 @return The value written back to the MMIO register.
1635 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed
1636 by a bitwise OR, and writes the result back to the bit field in the
1637 8-bit MMIO register.
1639 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1640 followed by a bitwise OR between the read result and the value
1641 specified by AndData, and writes the result to the 8-bit MMIO register
1642 specified by Address. The value written to the MMIO register is returned.
1643 This function must guarantee that all MMIO read and write operations are
1644 serialized. Extra left bits in both AndData and OrData are stripped.
1646 If 8-bit MMIO register operations are not supported, then ASSERT().
1647 If StartBit is greater than 7, then ASSERT().
1648 If EndBit is greater than 7, then ASSERT().
1649 If EndBit is less than StartBit, then ASSERT().
1650 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1651 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1653 @param Address MMIO register to write.
1654 @param StartBit The ordinal of the least significant bit in the bit field.
1656 @param EndBit The ordinal of the most significant bit in the bit field.
1658 @param AndData The value to AND with read value from the MMIO register.
1659 @param OrData The value to OR with the result of the AND operation.
1661 @return The value written back to the MMIO register.
1666 MmioBitFieldAndThenOr8 (
1675 Reads a 16-bit MMIO register.
1677 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
1678 returned. This function must guarantee that all MMIO read and write
1679 operations are serialized.
1681 If 16-bit MMIO register operations are not supported, then ASSERT().
1682 If Address is not aligned on a 16-bit boundary, then ASSERT().
1684 @param Address The MMIO register to read.
1686 @return The value read.
1696 Writes a 16-bit MMIO register.
1698 Writes the 16-bit MMIO register specified by Address with the value specified
1699 by Value and returns Value. This function must guarantee that all MMIO read
1700 and write operations are serialized.
1702 If 16-bit MMIO register operations are not supported, then ASSERT().
1703 If Address is not aligned on a 16-bit boundary, then ASSERT().
1705 @param Address The MMIO register to write.
1706 @param Value The value to write to the MMIO register.
1719 Reads a 16-bit MMIO register, performs a bitwise OR, and writes the
1720 result back to the 16-bit MMIO register.
1722 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1723 OR between the read result and the value specified by OrData, and
1724 writes the result to the 16-bit MMIO register specified by Address. The value
1725 written to the MMIO register is returned. This function must guarantee that
1726 all MMIO read and write operations are serialized.
1728 If 16-bit MMIO register operations are not supported, then ASSERT().
1729 If Address is not aligned on a 16-bit boundary, then ASSERT().
1731 @param Address The MMIO register to write.
1732 @param OrData The value to OR with the read value from the MMIO register.
1734 @return The value written back to the MMIO register.
1745 Reads a 16-bit MMIO register, performs a bitwise AND, and writes the result
1746 back to the 16-bit MMIO register.
1748 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1749 between the read result and the value specified by AndData, and writes the
1750 result to the 16-bit MMIO register specified by Address. The value written to
1751 the MMIO register is returned. This function must guarantee that all MMIO
1752 read and write operations are serialized.
1754 If 16-bit MMIO register operations are not supported, then ASSERT().
1755 If Address is not aligned on a 16-bit boundary, then ASSERT().
1757 @param Address The MMIO register to write.
1758 @param AndData The value to AND with the read value from the MMIO register.
1760 @return The value written back to the MMIO register.
1771 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
1772 OR, and writes the result back to the 16-bit MMIO register.
1774 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1775 between the read result and the value specified by AndData, performs a
1776 bitwise OR between the result of the AND operation and the value specified by
1777 OrData, and writes the result to the 16-bit MMIO register specified by
1778 Address. The value written to the MMIO register is returned. This function
1779 must guarantee that all MMIO read and write operations are serialized.
1781 If 16-bit MMIO register operations are not supported, then ASSERT().
1782 If Address is not aligned on a 16-bit boundary, then ASSERT().
1784 @param Address The MMIO register to write.
1785 @param AndData The value to AND with the read value from the MMIO register.
1786 @param OrData The value to OR with the result of the AND operation.
1788 @return The value written back to the MMIO register.
1800 Reads a bit field of a MMIO register.
1802 Reads the bit field in a 16-bit MMIO register. The bit field is specified by
1803 the StartBit and the EndBit. The value of the bit field is returned.
1805 If 16-bit MMIO register operations are not supported, then ASSERT().
1806 If Address is not aligned on a 16-bit boundary, then ASSERT().
1807 If StartBit is greater than 15, then ASSERT().
1808 If EndBit is greater than 15, then ASSERT().
1809 If EndBit is less than StartBit, then ASSERT().
1811 @param Address MMIO register to read.
1812 @param StartBit The ordinal of the least significant bit in the bit field.
1814 @param EndBit The ordinal of the most significant bit in the bit field.
1817 @return The value read.
1822 MmioBitFieldRead16 (
1829 Writes a bit field to a MMIO register.
1831 Writes Value to the bit field of the MMIO register. The bit field is
1832 specified by the StartBit and the EndBit. All other bits in the destination
1833 MMIO register are preserved. The new value of the 16-bit register is returned.
1835 If 16-bit MMIO register operations are not supported, then ASSERT().
1836 If Address is not aligned on a 16-bit boundary, then ASSERT().
1837 If StartBit is greater than 15, then ASSERT().
1838 If EndBit is greater than 15, then ASSERT().
1839 If EndBit is less than StartBit, then ASSERT().
1840 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1842 @param Address MMIO register to write.
1843 @param StartBit The ordinal of the least significant bit in the bit field.
1845 @param EndBit The ordinal of the most significant bit in the bit field.
1847 @param Value New value of the bit field.
1849 @return The value written back to the MMIO register.
1854 MmioBitFieldWrite16 (
1862 Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
1863 writes the result back to the bit field in the 16-bit MMIO register.
1865 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1866 OR between the read result and the value specified by OrData, and
1867 writes the result to the 16-bit MMIO register specified by Address. The value
1868 written to the MMIO register is returned. This function must guarantee that
1869 all MMIO read and write operations are serialized. Extra left bits in OrData
1872 If 16-bit MMIO register operations are not supported, then ASSERT().
1873 If Address is not aligned on a 16-bit boundary, then ASSERT().
1874 If StartBit is greater than 15, then ASSERT().
1875 If EndBit is greater than 15, then ASSERT().
1876 If EndBit is less than StartBit, then ASSERT().
1877 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1879 @param Address MMIO register to write.
1880 @param StartBit The ordinal of the least significant bit in the bit field.
1882 @param EndBit The ordinal of the most significant bit in the bit field.
1884 @param OrData The value to OR with read value from the MMIO register.
1886 @return The value written back to the MMIO register.
1899 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
1900 writes the result back to the bit field in the 16-bit MMIO register.
1902 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1903 between the read result and the value specified by AndData, and writes the
1904 result to the 16-bit MMIO register specified by Address. The value written to
1905 the MMIO register is returned. This function must guarantee that all MMIO
1906 read and write operations are serialized. Extra left bits in AndData are
1909 If 16-bit MMIO register operations are not supported, then ASSERT().
1910 If Address is not aligned on a 16-bit boundary, then ASSERT().
1911 If StartBit is greater than 15, then ASSERT().
1912 If EndBit is greater than 15, then ASSERT().
1913 If EndBit is less than StartBit, then ASSERT().
1914 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1916 @param Address MMIO register to write.
1917 @param StartBit The ordinal of the least significant bit in the bit field.
1919 @param EndBit The ordinal of the most significant bit in the bit field.
1921 @param AndData The value to AND with read value from the MMIO register.
1923 @return The value written back to the MMIO register.
1936 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed
1937 by a bitwise OR, and writes the result back to the bit field in the
1938 16-bit MMIO register.
1940 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1941 followed by a bitwise OR between the read result and the value
1942 specified by AndData, and writes the result to the 16-bit MMIO register
1943 specified by Address. The value written to the MMIO register is returned.
1944 This function must guarantee that all MMIO read and write operations are
1945 serialized. Extra left bits in both AndData and OrData are stripped.
1947 If 16-bit MMIO register operations are not supported, then ASSERT().
1948 If Address is not aligned on a 16-bit boundary, then ASSERT().
1949 If StartBit is greater than 15, then ASSERT().
1950 If EndBit is greater than 15, then ASSERT().
1951 If EndBit is less than StartBit, then ASSERT().
1952 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1953 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1955 @param Address MMIO register to write.
1956 @param StartBit The ordinal of the least significant bit in the bit field.
1958 @param EndBit The ordinal of the most significant bit in the bit field.
1960 @param AndData The value to AND with read value from the MMIO register.
1961 @param OrData The value to OR with the result of the AND operation.
1963 @return The value written back to the MMIO register.
1968 MmioBitFieldAndThenOr16 (
1977 Reads a 32-bit MMIO register.
1979 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
1980 returned. This function must guarantee that all MMIO read and write
1981 operations are serialized.
1983 If 32-bit MMIO register operations are not supported, then ASSERT().
1984 If Address is not aligned on a 32-bit boundary, then ASSERT().
1986 @param Address The MMIO register to read.
1988 @return The value read.
1998 Writes a 32-bit MMIO register.
2000 Writes the 32-bit MMIO register specified by Address with the value specified
2001 by Value and returns Value. This function must guarantee that all MMIO read
2002 and write operations are serialized.
2004 If 32-bit MMIO register operations are not supported, then ASSERT().
2005 If Address is not aligned on a 32-bit boundary, then ASSERT().
2007 @param Address The MMIO register to write.
2008 @param Value The value to write to the MMIO register.
2021 Reads a 32-bit MMIO register, performs a bitwise OR, and writes the
2022 result back to the 32-bit MMIO register.
2024 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2025 OR between the read result and the value specified by OrData, and
2026 writes the result to the 32-bit MMIO register specified by Address. The value
2027 written to the MMIO register is returned. This function must guarantee that
2028 all MMIO read and write operations are serialized.
2030 If 32-bit MMIO register operations are not supported, then ASSERT().
2031 If Address is not aligned on a 32-bit boundary, then ASSERT().
2033 @param Address The MMIO register to write.
2034 @param OrData The value to OR with the read value from the MMIO register.
2036 @return The value written back to the MMIO register.
2047 Reads a 32-bit MMIO register, performs a bitwise AND, and writes the result
2048 back to the 32-bit MMIO register.
2050 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2051 between the read result and the value specified by AndData, and writes the
2052 result to the 32-bit MMIO register specified by Address. The value written to
2053 the MMIO register is returned. This function must guarantee that all MMIO
2054 read and write operations are serialized.
2056 If 32-bit MMIO register operations are not supported, then ASSERT().
2057 If Address is not aligned on a 32-bit boundary, then ASSERT().
2059 @param Address The MMIO register to write.
2060 @param AndData The value to AND with the read value from the MMIO register.
2062 @return The value written back to the MMIO register.
2073 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
2074 OR, and writes the result back to the 32-bit MMIO register.
2076 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2077 between the read result and the value specified by AndData, performs a
2078 bitwise OR between the result of the AND operation and the value specified by
2079 OrData, and writes the result to the 32-bit MMIO register specified by
2080 Address. The value written to the MMIO register is returned. This function
2081 must guarantee that all MMIO read and write operations are serialized.
2083 If 32-bit MMIO register operations are not supported, then ASSERT().
2084 If Address is not aligned on a 32-bit boundary, then ASSERT().
2086 @param Address The MMIO register to write.
2087 @param AndData The value to AND with the read value from the MMIO register.
2088 @param OrData The value to OR with the result of the AND operation.
2090 @return The value written back to the MMIO register.
2102 Reads a bit field of a MMIO register.
2104 Reads the bit field in a 32-bit MMIO register. The bit field is specified by
2105 the StartBit and the EndBit. The value of the bit field is returned.
2107 If 32-bit MMIO register operations are not supported, then ASSERT().
2108 If Address is not aligned on a 32-bit boundary, then ASSERT().
2109 If StartBit is greater than 31, then ASSERT().
2110 If EndBit is greater than 31, then ASSERT().
2111 If EndBit is less than StartBit, then ASSERT().
2113 @param Address MMIO register to read.
2114 @param StartBit The ordinal of the least significant bit in the bit field.
2116 @param EndBit The ordinal of the most significant bit in the bit field.
2119 @return The value read.
2124 MmioBitFieldRead32 (
2131 Writes a bit field to a MMIO register.
2133 Writes Value to the bit field of the MMIO register. The bit field is
2134 specified by the StartBit and the EndBit. All other bits in the destination
2135 MMIO register are preserved. The new value of the 32-bit register is returned.
2137 If 32-bit MMIO register operations are not supported, then ASSERT().
2138 If Address is not aligned on a 32-bit boundary, then ASSERT().
2139 If StartBit is greater than 31, then ASSERT().
2140 If EndBit is greater than 31, then ASSERT().
2141 If EndBit is less than StartBit, then ASSERT().
2142 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2144 @param Address MMIO register to write.
2145 @param StartBit The ordinal of the least significant bit in the bit field.
2147 @param EndBit The ordinal of the most significant bit in the bit field.
2149 @param Value New value of the bit field.
2151 @return The value written back to the MMIO register.
2156 MmioBitFieldWrite32 (
2164 Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
2165 writes the result back to the bit field in the 32-bit MMIO register.
2167 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2168 OR between the read result and the value specified by OrData, and
2169 writes the result to the 32-bit MMIO register specified by Address. The value
2170 written to the MMIO register is returned. This function must guarantee that
2171 all MMIO read and write operations are serialized. Extra left bits in OrData
2174 If 32-bit MMIO register operations are not supported, then ASSERT().
2175 If Address is not aligned on a 32-bit boundary, then ASSERT().
2176 If StartBit is greater than 31, then ASSERT().
2177 If EndBit is greater than 31, then ASSERT().
2178 If EndBit is less than StartBit, then ASSERT().
2179 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2181 @param Address MMIO register to write.
2182 @param StartBit The ordinal of the least significant bit in the bit field.
2184 @param EndBit The ordinal of the most significant bit in the bit field.
2186 @param OrData The value to OR with read value from the MMIO register.
2188 @return The value written back to the MMIO register.
2201 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
2202 writes the result back to the bit field in the 32-bit MMIO register.
2204 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2205 between the read result and the value specified by AndData, and writes the
2206 result to the 32-bit MMIO register specified by Address. The value written to
2207 the MMIO register is returned. This function must guarantee that all MMIO
2208 read and write operations are serialized. Extra left bits in AndData are
2211 If 32-bit MMIO register operations are not supported, then ASSERT().
2212 If Address is not aligned on a 32-bit boundary, then ASSERT().
2213 If StartBit is greater than 31, then ASSERT().
2214 If EndBit is greater than 31, then ASSERT().
2215 If EndBit is less than StartBit, then ASSERT().
2216 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2218 @param Address MMIO register to write.
2219 @param StartBit The ordinal of the least significant bit in the bit field.
2221 @param EndBit The ordinal of the most significant bit in the bit field.
2223 @param AndData The value to AND with read value from the MMIO register.
2225 @return The value written back to the MMIO register.
2238 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed
2239 by a bitwise OR, and writes the result back to the bit field in the
2240 32-bit MMIO register.
2242 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2243 followed by a bitwise OR between the read result and the value
2244 specified by AndData, and writes the result to the 32-bit MMIO register
2245 specified by Address. The value written to the MMIO register is returned.
2246 This function must guarantee that all MMIO read and write operations are
2247 serialized. Extra left bits in both AndData and OrData are stripped.
2249 If 32-bit MMIO register operations are not supported, then ASSERT().
2250 If Address is not aligned on a 32-bit boundary, then ASSERT().
2251 If StartBit is greater than 31, then ASSERT().
2252 If EndBit is greater than 31, then ASSERT().
2253 If EndBit is less than StartBit, then ASSERT().
2254 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2255 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2257 @param Address MMIO register to write.
2258 @param StartBit The ordinal of the least significant bit in the bit field.
2260 @param EndBit The ordinal of the most significant bit in the bit field.
2262 @param AndData The value to AND with read value from the MMIO register.
2263 @param OrData The value to OR with the result of the AND operation.
2265 @return The value written back to the MMIO register.
2270 MmioBitFieldAndThenOr32 (
2279 Reads a 64-bit MMIO register.
2281 Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
2282 returned. This function must guarantee that all MMIO read and write
2283 operations are serialized.
2285 If 64-bit MMIO register operations are not supported, then ASSERT().
2286 If Address is not aligned on a 64-bit boundary, then ASSERT().
2288 @param Address The MMIO register to read.
2290 @return The value read.
2300 Writes a 64-bit MMIO register.
2302 Writes the 64-bit MMIO register specified by Address with the value specified
2303 by Value and returns Value. This function must guarantee that all MMIO read
2304 and write operations are serialized.
2306 If 64-bit MMIO register operations are not supported, then ASSERT().
2307 If Address is not aligned on a 64-bit boundary, then ASSERT().
2309 @param Address The MMIO register to write.
2310 @param Value The value to write to the MMIO register.
2321 Reads a 64-bit MMIO register, performs a bitwise OR, and writes the
2322 result back to the 64-bit MMIO register.
2324 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2325 OR between the read result and the value specified by OrData, and
2326 writes the result to the 64-bit MMIO register specified by Address. The value
2327 written to the MMIO register is returned. This function must guarantee that
2328 all MMIO read and write operations are serialized.
2330 If 64-bit MMIO register operations are not supported, then ASSERT().
2331 If Address is not aligned on a 64-bit boundary, then ASSERT().
2333 @param Address The MMIO register to write.
2334 @param OrData The value to OR with the read value from the MMIO register.
2336 @return The value written back to the MMIO register.
2347 Reads a 64-bit MMIO register, performs a bitwise AND, and writes the result
2348 back to the 64-bit MMIO register.
2350 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2351 between the read result and the value specified by AndData, and writes the
2352 result to the 64-bit MMIO register specified by Address. The value written to
2353 the MMIO register is returned. This function must guarantee that all MMIO
2354 read and write operations are serialized.
2356 If 64-bit MMIO register operations are not supported, then ASSERT().
2357 If Address is not aligned on a 64-bit boundary, then ASSERT().
2359 @param Address The MMIO register to write.
2360 @param AndData The value to AND with the read value from the MMIO register.
2362 @return The value written back to the MMIO register.
2373 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
2374 OR, and writes the result back to the 64-bit MMIO register.
2376 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2377 between the read result and the value specified by AndData, performs a
2378 bitwise OR between the result of the AND operation and the value specified by
2379 OrData, and writes the result to the 64-bit MMIO register specified by
2380 Address. The value written to the MMIO register is returned. This function
2381 must guarantee that all MMIO read and write operations are serialized.
2383 If 64-bit MMIO register operations are not supported, then ASSERT().
2384 If Address is not aligned on a 64-bit boundary, then ASSERT().
2386 @param Address The MMIO register to write.
2387 @param AndData The value to AND with the read value from the MMIO register.
2388 @param OrData The value to OR with the result of the AND operation.
2390 @return The value written back to the MMIO register.
2402 Reads a bit field of a MMIO register.
2404 Reads the bit field in a 64-bit MMIO register. The bit field is specified by
2405 the StartBit and the EndBit. The value of the bit field is returned.
2407 If 64-bit MMIO register operations are not supported, then ASSERT().
2408 If Address is not aligned on a 64-bit boundary, then ASSERT().
2409 If StartBit is greater than 63, then ASSERT().
2410 If EndBit is greater than 63, then ASSERT().
2411 If EndBit is less than StartBit, then ASSERT().
2413 @param Address MMIO register to read.
2414 @param StartBit The ordinal of the least significant bit in the bit field.
2416 @param EndBit The ordinal of the most significant bit in the bit field.
2419 @return The value read.
2424 MmioBitFieldRead64 (
2431 Writes a bit field to a MMIO register.
2433 Writes Value to the bit field of the MMIO register. The bit field is
2434 specified by the StartBit and the EndBit. All other bits in the destination
2435 MMIO register are preserved. The new value of the 64-bit register is returned.
2437 If 64-bit MMIO register operations are not supported, then ASSERT().
2438 If Address is not aligned on a 64-bit boundary, then ASSERT().
2439 If StartBit is greater than 63, then ASSERT().
2440 If EndBit is greater than 63, then ASSERT().
2441 If EndBit is less than StartBit, then ASSERT().
2442 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2444 @param Address MMIO register to write.
2445 @param StartBit The ordinal of the least significant bit in the bit field.
2447 @param EndBit The ordinal of the most significant bit in the bit field.
2449 @param Value New value of the bit field.
2451 @return The value written back to the MMIO register.
2456 MmioBitFieldWrite64 (
2464 Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
2465 writes the result back to the bit field in the 64-bit MMIO register.
2467 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2468 OR between the read result and the value specified by OrData, and
2469 writes the result to the 64-bit MMIO register specified by Address. The value
2470 written to the MMIO register is returned. This function must guarantee that
2471 all MMIO read and write operations are serialized. Extra left bits in OrData
2474 If 64-bit MMIO register operations are not supported, then ASSERT().
2475 If Address is not aligned on a 64-bit boundary, then ASSERT().
2476 If StartBit is greater than 63, then ASSERT().
2477 If EndBit is greater than 63, then ASSERT().
2478 If EndBit is less than StartBit, then ASSERT().
2479 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2481 @param Address MMIO register to write.
2482 @param StartBit The ordinal of the least significant bit in the bit field.
2484 @param EndBit The ordinal of the most significant bit in the bit field.
2486 @param OrData The value to OR with read value from the MMIO register.
2488 @return The value written back to the MMIO register.
2501 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and
2502 writes the result back to the bit field in the 64-bit MMIO register.
2504 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2505 between the read result and the value specified by AndData, and writes the
2506 result to the 64-bit MMIO register specified by Address. The value written to
2507 the MMIO register is returned. This function must guarantee that all MMIO
2508 read and write operations are serialized. Extra left bits in AndData are
2511 If 64-bit MMIO register operations are not supported, then ASSERT().
2512 If Address is not aligned on a 64-bit boundary, then ASSERT().
2513 If StartBit is greater than 63, then ASSERT().
2514 If EndBit is greater than 63, then ASSERT().
2515 If EndBit is less than StartBit, then ASSERT().
2516 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2518 @param Address MMIO register to write.
2519 @param StartBit The ordinal of the least significant bit in the bit field.
2521 @param EndBit The ordinal of the most significant bit in the bit field.
2523 @param AndData The value to AND with read value from the MMIO register.
2525 @return The value written back to the MMIO register.
2538 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed
2539 by a bitwise OR, and writes the result back to the bit field in the
2540 64-bit MMIO register.
2542 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2543 followed by a bitwise OR between the read result and the value
2544 specified by AndData, and writes the result to the 64-bit MMIO register
2545 specified by Address. The value written to the MMIO register is returned.
2546 This function must guarantee that all MMIO read and write operations are
2547 serialized. Extra left bits in both AndData and OrData are stripped.
2549 If 64-bit MMIO register operations are not supported, then ASSERT().
2550 If Address is not aligned on a 64-bit boundary, then ASSERT().
2551 If StartBit is greater than 63, then ASSERT().
2552 If EndBit is greater than 63, then ASSERT().
2553 If EndBit is less than StartBit, then ASSERT().
2554 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2555 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2557 @param Address MMIO register to write.
2558 @param StartBit The ordinal of the least significant bit in the bit field.
2560 @param EndBit The ordinal of the most significant bit in the bit field.
2562 @param AndData The value to AND with read value from the MMIO register.
2563 @param OrData The value to OR with the result of the AND operation.
2565 @return The value written back to the MMIO register.
2570 MmioBitFieldAndThenOr64 (
2579 Copy data from MMIO region to system memory by using 8-bit access.
2581 Copy data from MMIO region specified by starting address StartAddress
2582 to system memory specified by Buffer by using 8-bit access. The total
2583 number of byte to be copied is specified by Length. Buffer is returned.
2585 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2586 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2589 @param StartAddress Starting address for the MMIO region to be copied from.
2590 @param Length The size, in bytes, of Buffer.
2591 @param Buffer Pointer to a system memory buffer receiving the data read.
2599 IN UINTN StartAddress
,
2605 Copy data from MMIO region to system memory by using 16-bit access.
2607 Copy data from MMIO region specified by starting address StartAddress
2608 to system memory specified by Buffer by using 16-bit access. The total
2609 number of byte to be copied is specified by Length. Buffer is returned.
2611 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2613 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2614 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2616 If Length is not aligned on a 16-bit boundary, then ASSERT().
2617 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2619 @param StartAddress Starting address for the MMIO region to be copied from.
2620 @param Length The size, in bytes, of Buffer.
2621 @param Buffer Pointer to a system memory buffer receiving the data read.
2629 IN UINTN StartAddress
,
2635 Copy data from MMIO region to system memory by using 32-bit access.
2637 Copy data from MMIO region specified by starting address StartAddress
2638 to system memory specified by Buffer by using 32-bit access. The total
2639 number of byte to be copied is specified by Length. Buffer is returned.
2641 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2643 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2644 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2646 If Length is not aligned on a 32-bit boundary, then ASSERT().
2647 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2649 @param StartAddress Starting address for the MMIO region to be copied from.
2650 @param Length The size, in bytes, of Buffer.
2651 @param Buffer Pointer to a system memory buffer receiving the data read.
2659 IN UINTN StartAddress
,
2665 Copy data from MMIO region to system memory by using 64-bit access.
2667 Copy data from MMIO region specified by starting address StartAddress
2668 to system memory specified by Buffer by using 64-bit access. The total
2669 number of byte to be copied is specified by Length. Buffer is returned.
2671 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2673 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2674 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2676 If Length is not aligned on a 64-bit boundary, then ASSERT().
2677 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2679 @param StartAddress Starting address for the MMIO region to be copied from.
2680 @param Length The size, in bytes, of Buffer.
2681 @param Buffer Pointer to a system memory buffer receiving the data read.
2689 IN UINTN StartAddress
,
2695 Copy data from system memory to MMIO region by using 8-bit access.
2697 Copy data from system memory specified by Buffer to MMIO region specified
2698 by starting address StartAddress by using 8-bit access. The total number
2699 of byte to be copied is specified by Length. Buffer is returned.
2701 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2702 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2705 @param StartAddress Starting address for the MMIO region to be copied to.
2706 @param Length The size, in bytes, of Buffer.
2707 @param Buffer Pointer to a system memory buffer containing the data to write.
2715 IN UINTN StartAddress
,
2717 IN CONST UINT8
*Buffer
2721 Copy data from system memory to MMIO region by using 16-bit access.
2723 Copy data from system memory specified by Buffer to MMIO region specified
2724 by starting address StartAddress by using 16-bit access. The total number
2725 of byte to be copied is specified by Length. Buffer is returned.
2727 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2729 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2730 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2732 If Length is not aligned on a 16-bit boundary, then ASSERT().
2734 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2736 @param StartAddress Starting address for the MMIO region to be copied to.
2737 @param Length The size, in bytes, of Buffer.
2738 @param Buffer Pointer to a system memory buffer containing the data to write.
2746 IN UINTN StartAddress
,
2748 IN CONST UINT16
*Buffer
2752 Copy data from system memory to MMIO region by using 32-bit access.
2754 Copy data from system memory specified by Buffer to MMIO region specified
2755 by starting address StartAddress by using 32-bit access. The total number
2756 of byte to be copied is specified by Length. Buffer is returned.
2758 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2760 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2761 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2763 If Length is not aligned on a 32-bit boundary, then ASSERT().
2765 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2767 @param StartAddress Starting address for the MMIO region to be copied to.
2768 @param Length The size, in bytes, of Buffer.
2769 @param Buffer Pointer to a system memory buffer containing the data to write.
2777 IN UINTN StartAddress
,
2779 IN CONST UINT32
*Buffer
2783 Copy data from system memory to MMIO region by using 64-bit access.
2785 Copy data from system memory specified by Buffer to MMIO region specified
2786 by starting address StartAddress by using 64-bit access. The total number
2787 of byte to be copied is specified by Length. Buffer is returned.
2789 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2791 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2792 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2794 If Length is not aligned on a 64-bit boundary, then ASSERT().
2796 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2798 @param StartAddress Starting address for the MMIO region to be copied to.
2799 @param Length The size, in bytes, of Buffer.
2800 @param Buffer Pointer to a system memory buffer containing the data to write.
2808 IN UINTN StartAddress
,
2810 IN CONST UINT64
*Buffer