]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/S3IoLib.h
2 I/O and MMIO Library Services that do I/O and also enable the I/O operation
3 to be replayed during an S3 resume. This library class maps directly on top
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef __S3_IO_LIB_H__
13 #define __S3_IO_LIB_H__
16 Reads an 8-bit I/O port and saves the value in the S3 script to be replayed
19 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
20 This function must guarantee that all I/O read and write operations are
23 If 8-bit I/O port operations are not supported, then ASSERT().
25 @param[in] Port The I/O port to read.
27 @return The value read.
37 Writes an 8-bit I/O port, and saves the value in the S3 script to be replayed
40 Writes the 8-bit I/O port specified by Port with the value specified by Value
41 and returns Value. This function must guarantee that all I/O read and write
42 operations are serialized.
44 If 8-bit I/O port operations are not supported, then ASSERT().
46 @param[in] Port The I/O port to write.
47 @param[in] Value The value to write to the I/O port.
49 @return The value written the I/O port.
60 Reads an 8-bit I/O port, performs a bitwise OR, writes the
61 result back to the 8-bit I/O port, and saves the value in the S3 script to be
62 replayed on S3 resume.
64 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
65 between the read result and the value specified by OrData, and writes the
66 result to the 8-bit I/O port specified by Port. The value written to the I/O
67 port is returned. This function must guarantee that all I/O read and write
68 operations are serialized.
70 If 8-bit I/O port operations are not supported, then ASSERT().
72 @param[in] Port The I/O port to write.
73 @param[in] OrData The value to OR with the read value from the I/O port.
75 @return The value written back to the I/O port.
86 Reads an 8-bit I/O port, performs a bitwise AND, writes the result back
87 to the 8-bit I/O port, and saves the value in the S3 script to be replayed
90 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
91 the read result and the value specified by AndData, and writes the result to
92 the 8-bit I/O port specified by Port. The value written to the I/O port is
93 returned. This function must guarantee that all I/O read and write operations
96 If 8-bit I/O port operations are not supported, then ASSERT().
98 @param[in] Port The I/O port to write.
99 @param[in] AndData The value to AND with the read value from the I/O port.
101 @return The value written back to the I/O port.
112 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
113 inclusive OR, writes the result back to the 8-bit I/O port, and saves
114 the value in the S3 script to be replayed on S3 resume.
116 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
117 the read result and the value specified by AndData, performs a bitwise OR
118 between the result of the AND operation and the value specified by OrData,
119 and writes the result to the 8-bit I/O port specified by Port. The value
120 written to the I/O port is returned. This function must guarantee that all
121 I/O read and write operations are serialized.
123 If 8-bit I/O port operations are not supported, then ASSERT().
125 @param[in] Port The I/O port to write.
126 @param[in] AndData The value to AND with the read value from the I/O port.
127 @param[in] OrData The value to OR with the result of the AND operation.
129 @return The value written back to the I/O port.
141 Reads a bit field of an I/O register, and saves the value in the S3 script to
142 be replayed on S3 resume.
144 Reads the bit field in an 8-bit I/O register. The bit field is specified by
145 the StartBit and the EndBit. The value of the bit field is returned.
147 If 8-bit I/O port operations are not supported, then ASSERT().
148 If StartBit is greater than 7, then ASSERT().
149 If EndBit is greater than 7, then ASSERT().
150 If EndBit is less than StartBit, then ASSERT().
152 @param[in] Port The I/O port to read.
153 @param[in] StartBit The ordinal of the least significant bit in the bit field.
155 @param[in] EndBit The ordinal of the most significant bit in the bit field.
158 @return The value read.
170 Writes a bit field to an I/O register and saves the value in the S3 script to
171 be replayed on S3 resume.
173 Writes Value to the bit field of the I/O register. The bit field is specified
174 by the StartBit and the EndBit. All other bits in the destination I/O
175 register are preserved. The value written to the I/O port is returned.
176 Remaining bits in Value are stripped.
178 If 8-bit I/O port operations are not supported, then ASSERT().
179 If StartBit is greater than 7, then ASSERT().
180 If EndBit is greater than 7, then ASSERT().
181 If EndBit is less than StartBit, then ASSERT().
182 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
184 @param[in] Port The I/O port to write.
185 @param[in] StartBit The ordinal of the least significant bit in the bit field.
187 @param[in] EndBit The ordinal of the most significant bit in the bit field.
189 @param[in] Value New value of the bit field.
191 @return The value written back to the I/O port.
204 Reads a bit field in an 8-bit port, performs a bitwise OR, writes the
205 result back to the bit field in the 8-bit port, and saves the value in the
206 S3 script to be replayed on S3 resume.
208 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
209 between the read result and the value specified by OrData, and writes the
210 result to the 8-bit I/O port specified by Port. The value written to the I/O
211 port is returned. This function must guarantee that all I/O read and write
212 operations are serialized. Extra left bits in OrData are stripped.
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().
218 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
220 @param[in] Port The I/O port to write.
221 @param[in] StartBit The ordinal of the least significant bit in the bit field.
223 @param[in] EndBit The ordinal of the most significant bit in the bit field.
225 @param[in] OrData The value to OR with the read value from the I/O port.
227 @return The value written back to the I/O port.
240 Reads a bit field in an 8-bit port, performs a bitwise AND, writes the
241 result back to the bit field in the 8-bit port, and saves the value in the
242 S3 script to be replayed on S3 resume.
244 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
245 the read result and the value specified by AndData, and writes the result to
246 the 8-bit I/O port specified by Port. The value written to the I/O port is
247 returned. This function must guarantee that all I/O read and write operations
248 are serialized. Extra left bits in AndData are stripped.
250 If 8-bit I/O port operations are not supported, then ASSERT().
251 If StartBit is greater than 7, then ASSERT().
252 If EndBit is greater than 7, then ASSERT().
253 If EndBit is less than StartBit, then ASSERT().
254 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
256 @param[in] Port The I/O port to write.
257 @param[in] StartBit The ordinal of the least significant bit in the bit field.
259 @param[in] EndBit The ordinal of the most significant bit in the bit field.
261 @param[in] AndData The value to AND with the read value from the I/O port.
263 @return The value written back to the I/O port.
276 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
277 bitwise OR, writes the result back to the bit field in the
278 8-bit port, and saves the value in the S3 script to be replayed on S3 resume.
280 Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed
281 by a bitwise OR between the read result and the value specified by
282 AndData, and writes the result to the 8-bit I/O port specified by Port. The
283 value written to the I/O port is returned. This function must guarantee that
284 all I/O read and write operations are serialized. Extra left bits in both
285 AndData and OrData are stripped.
287 If 8-bit I/O port operations are not supported, then ASSERT().
288 If StartBit is greater than 7, then ASSERT().
289 If EndBit is greater than 7, then ASSERT().
290 If EndBit is less than StartBit, then ASSERT().
291 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
292 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
294 @param[in] Port The I/O port to write.
295 @param[in] StartBit The ordinal of the least significant bit in the bit field.
297 @param[in] EndBit The ordinal of the most significant bit in the bit field.
299 @param[in] AndData The value to AND with the read value from the I/O port.
300 @param[in] OrData The value to OR with the result of the AND operation.
302 @return The value written back to the I/O port.
307 S3IoBitFieldAndThenOr8 (
316 Reads a 16-bit I/O port, and saves the value in the S3 script to be replayed
319 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
320 This function must guarantee that all I/O read and write operations are
323 If 16-bit I/O port operations are not supported, then ASSERT().
325 @param[in] Port The I/O port to read.
327 @return The value read.
337 Writes a 16-bit I/O port, and saves the value in the S3 script to be replayed
340 Writes the 16-bit I/O port specified by Port with the value specified by Value
341 and returns Value. This function must guarantee that all I/O read and write
342 operations are serialized.
344 If 16-bit I/O port operations are not supported, then ASSERT().
346 @param[in] Port The I/O port to write.
347 @param[in] Value The value to write to the I/O port.
349 @return The value written the I/O port.
360 Reads a 16-bit I/O port, performs a bitwise OR, writes the
361 result back to the 16-bit I/O port, and saves the value in the S3 script to
362 be replayed on S3 resume.
364 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
365 between the read result and the value specified by OrData, and writes the
366 result to the 16-bit I/O port specified by Port. The value written to the I/O
367 port is returned. This function must guarantee that all I/O read and write
368 operations are serialized.
370 If 16-bit I/O port operations are not supported, then ASSERT().
372 @param[in] Port The I/O port to write.
373 @param[in] OrData The value to OR with the read value from the I/O port.
375 @return The value written back to the I/O port.
386 Reads a 16-bit I/O port, performs a bitwise AND, writes the result back
387 to the 16-bit I/O port , and saves the value in the S3 script to be replayed
390 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
391 the read result and the value specified by AndData, and writes the result to
392 the 16-bit I/O port specified by Port. The value written to the I/O port is
393 returned. This function must guarantee that all I/O read and write operations
396 If 16-bit I/O port operations are not supported, then ASSERT().
398 @param[in] Port The I/O port to write.
399 @param[in] AndData The value to AND with the read value from the I/O port.
401 @return The value written back to the I/O port.
412 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
413 inclusive OR, writes the result back to the 16-bit I/O port, and saves
414 the value in the S3 script to be replayed on S3 resume.
416 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
417 the read result and the value specified by AndData, performs a bitwise OR
418 between the result of the AND operation and the value specified by OrData,
419 and writes the result to the 16-bit I/O port specified by Port. The value
420 written to the I/O port is returned. This function must guarantee that all
421 I/O read and write operations are serialized.
423 If 16-bit I/O port operations are not supported, then ASSERT().
425 @param[in] Port The I/O port to write.
426 @param[in] AndData The value to AND with the read value from the I/O port.
427 @param[in] OrData The value to OR with the result of the AND operation.
429 @return The value written back to the I/O port.
441 Reads a bit field of an I/O register saves the value in the S3 script to be
442 replayed on S3 resume.
444 Reads the bit field in a 16-bit I/O register. The bit field is specified by
445 the StartBit and the EndBit. The value of the bit field is returned.
447 If 16-bit I/O port operations are not supported, then ASSERT().
448 If StartBit is greater than 15, then ASSERT().
449 If EndBit is greater than 15, then ASSERT().
450 If EndBit is less than StartBit, then ASSERT().
452 @param[in] Port The I/O port to read.
453 @param[in] StartBit The ordinal of the least significant bit in the bit field.
455 @param[in] EndBit The ordinal of the most significant bit in the bit field.
458 @return The value read.
470 Writes a bit field to an I/O register, and saves the value in the S3 script
471 to be replayed on S3 resume.
473 Writes Value to the bit field of the I/O register. The bit field is specified
474 by the StartBit and the EndBit. All other bits in the destination I/O
475 register are preserved. The value written to the I/O port is returned. Extra
476 left bits in Value are stripped.
478 If 16-bit I/O port operations are not supported, then ASSERT().
479 If StartBit is greater than 15, then ASSERT().
480 If EndBit is greater than 15, then ASSERT().
481 If EndBit is less than StartBit, then ASSERT().
482 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
484 @param[in] Port The I/O port to write.
485 @param[in] StartBit The ordinal of the least significant bit in the bit field.
487 @param[in] EndBit The ordinal of the most significant bit in the bit field.
489 @param[in] Value New value of the bit field.
491 @return The value written back to the I/O port.
496 S3IoBitFieldWrite16 (
504 Reads a bit field in a 16-bit port, performs a bitwise OR, writes the
505 result back to the bit field in the 16-bit port, and saves the value in the
506 S3 script to be replayed on S3 resume.
508 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
509 between the read result and the value specified by OrData, and writes the
510 result to the 16-bit I/O port specified by Port. The value written to the I/O
511 port is returned. This function must guarantee that all I/O read and write
512 operations are serialized. Extra left bits in OrData are stripped.
514 If 16-bit I/O port operations are not supported, then ASSERT().
515 If StartBit is greater than 15, then ASSERT().
516 If EndBit is greater than 15, then ASSERT().
517 If EndBit is less than StartBit, then ASSERT().
518 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
520 @param[in] Port The I/O port to write.
521 @param[in] StartBit The ordinal of the least significant bit in the bit field.
523 @param[in] EndBit The ordinal of the most significant bit in the bit field.
525 @param[in] OrData The value to OR with the read value from the I/O port.
527 @return The value written back to the I/O port.
540 Reads a bit field in a 16-bit port, performs a bitwise AND, writes the
541 result back to the bit field in the 16-bit port, and saves the value in the
542 S3 script to be replayed on S3 resume.
544 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
545 the read result and the value specified by AndData, and writes the result to
546 the 16-bit I/O port specified by Port. The value written to the I/O port is
547 returned. This function must guarantee that all I/O read and write operations
548 are serialized. Extra left bits in AndData are stripped.
550 If 16-bit I/O port operations are not supported, then ASSERT().
551 If StartBit is greater than 15, then ASSERT().
552 If EndBit is greater than 15, then ASSERT().
553 If EndBit is less than StartBit, then ASSERT().
554 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
556 @param[in] Port The I/O port to write.
557 @param[in] StartBit The ordinal of the least significant bit in the bit field.
559 @param[in] EndBit The ordinal of the most significant bit in the bit field.
561 @param[in] AndData The value to AND with the read value from the I/O port.
563 @return The value written back to the I/O port.
576 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
577 bitwise OR, writes the result back to the bit field in the
578 16-bit port, and saves the value in the S3 script to be replayed on S3
581 Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed
582 by a bitwise OR between the read result and the value specified by
583 AndData, and writes the result to the 16-bit I/O port specified by Port. The
584 value written to the I/O port is returned. This function must guarantee that
585 all I/O read and write operations are serialized. Extra left bits in both
586 AndData and OrData are stripped.
588 If 16-bit I/O port operations are not supported, then ASSERT().
589 If StartBit is greater than 15, then ASSERT().
590 If EndBit is greater than 15, then ASSERT().
591 If EndBit is less than StartBit, then ASSERT().
592 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
593 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
595 @param[in] Port The I/O port to write.
596 @param[in] StartBit The ordinal of the least significant bit in the bit field.
598 @param[in] EndBit The ordinal of the most significant bit in the bit field.
600 @param[in] AndData The value to AND with the read value from the I/O port.
601 @param[in] OrData The value to OR with the result of the AND operation.
603 @return The value written back to the I/O port.
608 S3IoBitFieldAndThenOr16 (
617 Reads a 32-bit I/O port, and saves the value in the S3 script to be replayed
620 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
621 This function must guarantee that all I/O read and write operations are
624 If 32-bit I/O port operations are not supported, then ASSERT().
626 @param[in] Port The I/O port to read.
628 @return The value read.
638 Writes a 32-bit I/O port, and saves the value in the S3 script to be replayed
641 Writes the 32-bit I/O port specified by Port with the value specified by Value
642 and returns Value. This function must guarantee that all I/O read and write
643 operations are serialized.
645 If 32-bit I/O port operations are not supported, then ASSERT().
647 @param[in] Port The I/O port to write.
648 @param[in] Value The value to write to the I/O port.
650 @return The value written the I/O port.
661 Reads a 32-bit I/O port, performs a bitwise OR, writes the
662 result back to the 32-bit I/O port, and saves the value in the S3 script to
663 be replayed on S3 resume.
665 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
666 between the read result and the value specified by OrData, and writes the
667 result to the 32-bit I/O port specified by Port. The value written to the I/O
668 port is returned. This function must guarantee that all I/O read and write
669 operations are serialized.
671 If 32-bit I/O port operations are not supported, then ASSERT().
673 @param[in] Port The I/O port to write.
674 @param[in] OrData The value to OR with the read value from the I/O port.
676 @return The value written back to the I/O port.
687 Reads a 32-bit I/O port, performs a bitwise AND, writes the result back
688 to the 32-bit I/O port, and saves the value in the S3 script to be replayed
691 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
692 the read result and the value specified by AndData, and writes the result to
693 the 32-bit I/O port specified by Port. The value written to the I/O port is
694 returned. This function must guarantee that all I/O read and write operations
697 If 32-bit I/O port operations are not supported, then ASSERT().
699 @param[in] Port The I/O port to write.
700 @param[in] AndData The value to AND with the read value from the I/O port.
702 @return The value written back to the I/O port.
713 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
714 inclusive OR, writes the result back to the 32-bit I/O port, and saves
715 the value in the S3 script to be replayed on S3 resume.
717 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
718 the read result and the value specified by AndData, performs a bitwise OR
719 between the result of the AND operation and the value specified by OrData,
720 and writes the result to the 32-bit I/O port specified by Port. The value
721 written to the I/O port is returned. This function must guarantee that all
722 I/O read and write operations are serialized.
724 If 32-bit I/O port operations are not supported, then ASSERT().
726 @param[in] Port The I/O port to write.
727 @param[in] AndData The value to AND with the read value from the I/O port.
728 @param[in] OrData The value to OR with the result of the AND operation.
730 @return The value written back to the I/O port.
742 Reads a bit field of an I/O register, and saves the value in the S3 script to
743 be replayed on S3 resume.
745 Reads the bit field in a 32-bit I/O register. The bit field is specified by
746 the StartBit and the EndBit. The value of the bit field is returned.
748 If 32-bit I/O port operations are not supported, then ASSERT().
749 If StartBit is greater than 31, then ASSERT().
750 If EndBit is greater than 31, then ASSERT().
751 If EndBit is less than StartBit, then ASSERT().
753 @param[in] Port The I/O port to read.
754 @param[in] StartBit The ordinal of the least significant bit in the bit field.
756 @param[in] EndBit The ordinal of the most significant bit in the bit field.
759 @return The value read.
771 Writes a bit field to an I/O register, and saves the value in the S3 script to
772 be replayed on S3 resume.
774 Writes Value to the bit field of the I/O register. The bit field is specified
775 by the StartBit and the EndBit. All other bits in the destination I/O
776 register are preserved. The value written to the I/O port is returned. Extra
777 left bits in Value are stripped.
779 If 32-bit I/O port operations are not supported, then ASSERT().
780 If StartBit is greater than 31, then ASSERT().
781 If EndBit is greater than 31, then ASSERT().
782 If EndBit is less than StartBit, then ASSERT().
783 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
785 @param[in] Port The I/O port to write.
786 @param[in] StartBit The ordinal of the least significant bit in the bit field.
788 @param[in] EndBit The ordinal of the most significant bit in the bit field.
790 @param[in] Value New value of the bit field.
792 @return The value written back to the I/O port.
797 S3IoBitFieldWrite32 (
805 Reads a bit field in a 32-bit port, performs a bitwise OR, writes the
806 result back to the bit field in the 32-bit port, and saves the value in the
807 S3 script to be replayed on S3 resume.
809 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
810 between the read result and the value specified by OrData, and writes the
811 result to the 32-bit I/O port specified by Port. The value written to the I/O
812 port is returned. This function must guarantee that all I/O read and write
813 operations are serialized. Extra left bits in OrData are stripped.
815 If 32-bit I/O port operations are not supported, then ASSERT().
816 If StartBit is greater than 31, then ASSERT().
817 If EndBit is greater than 31, then ASSERT().
818 If EndBit is less than StartBit, then ASSERT().
819 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
821 @param[in] Port The I/O port to write.
822 @param[in] StartBit The ordinal of the least significant bit in the bit field.
824 @param[in] EndBit The ordinal of the most significant bit in the bit field.
826 @param[in] OrData The value to OR with the read value from the I/O port.
828 @return The value written back to the I/O port.
841 Reads a bit field in a 32-bit port, performs a bitwise AND, writes the
842 result back to the bit field in the 32-bit port, and saves the value in the
843 S3 script to be replayed on S3 resume.
845 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
846 the read result and the value specified by AndData, and writes the result to
847 the 32-bit I/O port specified by Port. The value written to the I/O port is
848 returned. This function must guarantee that all I/O read and write operations
849 are serialized. Extra left bits in AndData are stripped.
851 If 32-bit I/O port operations are not supported, then ASSERT().
852 If StartBit is greater than 31, then ASSERT().
853 If EndBit is greater than 31, then ASSERT().
854 If EndBit is less than StartBit, then ASSERT().
855 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
857 @param[in] Port The I/O port to write.
858 @param[in] StartBit The ordinal of the least significant bit in the bit field.
860 @param[in] EndBit The ordinal of the most significant bit in the bit field.
862 @param[in] AndData The value to AND with the read value from the I/O port.
864 @return The value written back to the I/O port.
877 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
878 bitwise OR, writes the result back to the bit field in the
879 32-bit port, and saves the value in the S3 script to be replayed on S3
882 Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
883 by a bitwise OR between the read result and the value specified by
884 AndData, and writes the result to the 32-bit I/O port specified by Port. The
885 value written to the I/O port is returned. This function must guarantee that
886 all I/O read and write operations are serialized. Extra left bits in both
887 AndData and OrData are stripped.
889 If 32-bit I/O port operations are not supported, then ASSERT().
890 If StartBit is greater than 31, then ASSERT().
891 If EndBit is greater than 31, then ASSERT().
892 If EndBit is less than StartBit, then ASSERT().
893 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
894 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
896 @param[in] Port The I/O port to write.
897 @param[in] StartBit The ordinal of the least significant bit in the bit field.
899 @param[in] EndBit The ordinal of the most significant bit in the bit field.
901 @param[in] AndData The value to AND with the read value from the I/O port.
902 @param[in] OrData The value to OR with the result of the AND operation.
904 @return The value written back to the I/O port.
909 S3IoBitFieldAndThenOr32 (
918 Reads a 64-bit I/O port, and saves the value in the S3 script to be replayed
921 Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
922 This function must guarantee that all I/O read and write operations are
925 If 64-bit I/O port operations are not supported, then ASSERT().
927 @param[in] Port The I/O port to read.
929 @return The value read.
939 Writes a 64-bit I/O port, and saves the value in the S3 script to be replayed
942 Writes the 64-bit I/O port specified by Port with the value specified by Value
943 and returns Value. This function must guarantee that all I/O read and write
944 operations are serialized.
946 If 64-bit I/O port operations are not supported, then ASSERT().
948 @param[in] Port The I/O port to write.
949 @param[in] Value The value to write to the I/O port.
951 @return The value written to the I/O port.
962 Reads a 64-bit I/O port, performs a bitwise OR, writes the
963 result back to the 64-bit I/O port, and saves the value in the S3 script to
964 be replayed on S3 resume.
966 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
967 between the read result and the value specified by OrData, and writes the
968 result to the 64-bit I/O port specified by Port. The value written to the I/O
969 port is returned. This function must guarantee that all I/O read and write
970 operations are serialized.
972 If 64-bit I/O port operations are not supported, then ASSERT().
974 @param[in] Port The I/O port to write.
975 @param[in] OrData The value to OR with the read value from the I/O port.
977 @return The value written back to the I/O port.
988 Reads a 64-bit I/O port, performs a bitwise AND, writes the result back
989 to the 64-bit I/O port, and saves the value in the S3 script to be replayed
992 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
993 the read result and the value specified by AndData, and writes the result to
994 the 64-bit I/O port specified by Port. The value written to the I/O port is
995 returned. This function must guarantee that all I/O read and write operations
998 If 64-bit I/O port operations are not supported, then ASSERT().
1000 @param[in] Port The I/O port to write.
1001 @param[in] AndData The value to AND with the read value from the I/O port.
1003 @return The value written back to the I/O port.
1014 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
1015 inclusive OR, writes the result back to the 64-bit I/O port, and saves
1016 the value in the S3 script to be replayed on S3 resume.
1018 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1019 the read result and the value specified by AndData, performs a bitwise OR
1020 between the result of the AND operation and the value specified by OrData,
1021 and writes the result to the 64-bit I/O port specified by Port. The value
1022 written to the I/O port is returned. This function must guarantee that all
1023 I/O read and write operations are serialized.
1025 If 64-bit I/O port operations are not supported, then ASSERT().
1027 @param[in] Port The I/O port to write.
1028 @param[in] AndData The value to AND with the read value from the I/O port.
1029 @param[in] OrData The value to OR with the result of the AND operation.
1031 @return The value written back to the I/O port.
1043 Reads a bit field of an I/O register, and saves the value in the S3 script to
1044 be replayed on S3 resume.
1046 Reads the bit field in a 64-bit I/O register. The bit field is specified by
1047 the StartBit and the EndBit. The value of the bit field is returned.
1049 If 64-bit I/O port operations are not supported, then ASSERT().
1050 If StartBit is greater than 63, then ASSERT().
1051 If EndBit is greater than 63, then ASSERT().
1052 If EndBit is less than StartBit, then ASSERT().
1054 @param[in] Port The I/O port to read.
1055 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1057 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1060 @return The value read.
1065 S3IoBitFieldRead64 (
1072 Writes a bit field to an I/O register, and saves the value in the S3 script to
1073 be replayed on S3 resume.
1075 Writes Value to the bit field of the I/O register. The bit field is specified
1076 by the StartBit and the EndBit. All other bits in the destination I/O
1077 register are preserved. The value written to the I/O port is returned. Extra
1078 left bits in Value are stripped.
1080 If 64-bit I/O port operations are not supported, then ASSERT().
1081 If StartBit is greater than 63, then ASSERT().
1082 If EndBit is greater than 63, then ASSERT().
1083 If EndBit is less than StartBit, then ASSERT().
1084 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1086 @param[in] Port The I/O port to write.
1087 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1089 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1091 @param[in] Value New value of the bit field.
1093 @return The value written back to the I/O port.
1098 S3IoBitFieldWrite64 (
1106 Reads a bit field in a 64-bit port, performs a bitwise OR, writes the
1107 result back to the bit field in the 64-bit port, and saves the value in the
1108 S3 script to be replayed on S3 resume.
1110 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1111 between the read result and the value specified by OrData, and writes the
1112 result to the 64-bit I/O port specified by Port. The value written to the I/O
1113 port is returned. This function must guarantee that all I/O read and write
1114 operations are serialized. Extra left bits in OrData are stripped.
1116 If 64-bit I/O port operations are not supported, then ASSERT().
1117 If StartBit is greater than 63, then ASSERT().
1118 If EndBit is greater than 63, then ASSERT().
1119 If EndBit is less than StartBit, then ASSERT().
1120 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1122 @param[in] Port The I/O port to write.
1123 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1125 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1127 @param[in] OrData The value to OR with the read value from the I/O port.
1129 @return The value written back to the I/O port.
1142 Reads a bit field in a 64-bit port, performs a bitwise AND, writes the
1143 result back to the bit field in the 64-bit port, and saves the value in the
1144 S3 script to be replayed on S3 resume.
1146 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1147 the read result and the value specified by AndData, and writes the result to
1148 the 64-bit I/O port specified by Port. The value written to the I/O port is
1149 returned. This function must guarantee that all I/O read and write operations
1150 are serialized. Extra left bits in AndData are stripped.
1152 If 64-bit I/O port operations are not supported, then ASSERT().
1153 If StartBit is greater than 63, then ASSERT().
1154 If EndBit is greater than 63, then ASSERT().
1155 If EndBit is less than StartBit, then ASSERT().
1156 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1158 @param[in] Port The I/O port to write.
1159 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1161 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1163 @param[in] AndData The value to AND with the read value from the I/O port.
1165 @return The value written back to the I/O port.
1178 Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
1179 bitwise OR, writes the result back to the bit field in the
1180 64-bit port, and saves the value in the S3 script to be replayed on S3
1183 Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed
1184 by a bitwise OR between the read result and the value specified by
1185 AndData, and writes the result to the 64-bit I/O port specified by Port. The
1186 value written to the I/O port is returned. This function must guarantee that
1187 all I/O read and write operations are serialized. Extra left bits in both
1188 AndData and OrData are stripped.
1190 If 64-bit I/O port operations are not supported, then ASSERT().
1191 If StartBit is greater than 63, then ASSERT().
1192 If EndBit is greater than 63, then ASSERT().
1193 If EndBit is less than StartBit, then ASSERT().
1194 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1195 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1197 @param[in] Port The I/O port to write.
1198 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1200 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1202 @param[in] AndData The value to AND with the read value from the I/O port.
1203 @param[in] OrData The value to OR with the result of the AND operation.
1205 @return The value written back to the I/O port.
1210 S3IoBitFieldAndThenOr64 (
1219 Reads an 8-bit MMIO register, and saves the value in the S3 script to be
1220 replayed on S3 resume.
1222 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
1223 returned. This function must guarantee that all MMIO read and write
1224 operations are serialized.
1226 If 8-bit MMIO register operations are not supported, then ASSERT().
1228 @param[in] Address The MMIO register to read.
1230 @return The value read.
1240 Writes an 8-bit MMIO register, and saves the value in the S3 script to be
1241 replayed on S3 resume.
1243 Writes the 8-bit MMIO register specified by Address with the value specified
1244 by Value and returns Value. This function must guarantee that all MMIO read
1245 and write operations are serialized.
1247 If 8-bit MMIO register operations are not supported, then ASSERT().
1249 @param[in] Address The MMIO register to write.
1250 @param[in] Value The value to write to the MMIO register.
1252 @return The value written the MMIO register.
1263 Reads an 8-bit MMIO register, performs a bitwise OR, writes the
1264 result back to the 8-bit MMIO register, and saves the value in the S3 script
1265 to be replayed on S3 resume.
1267 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1268 inclusive OR between the read result and the value specified by OrData, and
1269 writes the result to the 8-bit MMIO register specified by Address. The value
1270 written to the MMIO register is returned. This function must guarantee that
1271 all MMIO read and write operations are serialized.
1273 If 8-bit MMIO register operations are not supported, then ASSERT().
1275 @param[in] Address The MMIO register to write.
1276 @param[in] OrData The value to OR with the read value from the MMIO register.
1278 @return The value written back to the MMIO register.
1289 Reads an 8-bit MMIO register, performs a bitwise AND, writes the result
1290 back to the 8-bit MMIO register, and saves the value in the S3 script to be
1291 replayed on S3 resume.
1293 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1294 between the read result and the value specified by AndData, and writes the
1295 result to the 8-bit MMIO register specified by Address. The value written to
1296 the MMIO register is returned. This function must guarantee that all MMIO
1297 read and write operations are serialized.
1299 If 8-bit MMIO register operations are not supported, then ASSERT().
1301 @param[in] Address The MMIO register to write.
1302 @param[in] AndData The value to AND with the read value from the MMIO register.
1304 @return The value written back to the MMIO register.
1315 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
1316 inclusive OR, writes the result back to the 8-bit MMIO register, and saves
1317 the value in the S3 script to be replayed on S3 resume.
1319 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1320 between the read result and the value specified by AndData, performs a
1321 bitwise OR between the result of the AND operation and the value specified by
1322 OrData, and writes the result to the 8-bit MMIO register specified by
1323 Address. The value written to the MMIO register is returned. This function
1324 must guarantee that all MMIO read and write operations are serialized.
1326 If 8-bit MMIO register operations are not supported, then ASSERT().
1328 @param[in] Address The MMIO register to write.
1329 @param[in] AndData The value to AND with the read value from the MMIO register.
1330 @param[in] OrData The value to OR with the result of the AND operation.
1332 @return The value written back to the MMIO register.
1344 Reads a bit field of a MMIO register, and saves the value in the S3 script to
1345 be replayed on S3 resume.
1347 Reads the bit field in an 8-bit MMIO register. The bit field is specified by
1348 the StartBit and the EndBit. The value of the bit field is returned.
1350 If 8-bit MMIO register operations are not supported, then ASSERT().
1351 If StartBit is greater than 7, then ASSERT().
1352 If EndBit is greater than 7, then ASSERT().
1353 If EndBit is less than StartBit, then ASSERT().
1355 @param[in] Address MMIO register to read.
1356 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1358 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1361 @return The value read.
1366 S3MmioBitFieldRead8 (
1373 Writes a bit field to an MMIO register, and saves the value in the S3 script to
1374 be replayed on S3 resume.
1376 Writes Value to the bit field of the MMIO register. The bit field is
1377 specified by the StartBit and the EndBit. All other bits in the destination
1378 MMIO register are preserved. The new value of the 8-bit register is returned.
1380 If 8-bit MMIO register operations are not supported, then ASSERT().
1381 If StartBit is greater than 7, then ASSERT().
1382 If EndBit is greater than 7, then ASSERT().
1383 If EndBit is less than StartBit, then ASSERT().
1384 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1386 @param[in] Address The MMIO register to write.
1387 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1389 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1391 @param[in] Value New value of the bit field.
1393 @return The value written back to the MMIO register.
1398 S3MmioBitFieldWrite8 (
1406 Reads a bit field in an 8-bit MMIO register, performs a bitwise OR,
1407 writes the result back to the bit field in the 8-bit MMIO register, and saves
1408 the value in the S3 script to be replayed on S3 resume.
1410 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1411 inclusive OR between the read result and the value specified by OrData, and
1412 writes the result to the 8-bit MMIO register specified by Address. The value
1413 written to the MMIO register is returned. This function must guarantee that
1414 all MMIO read and write operations are serialized. Extra left bits in OrData
1417 If 8-bit MMIO register operations are not supported, then ASSERT().
1418 If StartBit is greater than 7, then ASSERT().
1419 If EndBit is greater than 7, then ASSERT().
1420 If EndBit is less than StartBit, then ASSERT().
1421 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1423 @param[in] Address The MMIO register to write.
1424 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1426 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1428 @param[in] OrData The value to OR with the read value from the MMIO register.
1430 @return The value written back to the MMIO register.
1443 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and
1444 writes the result back to the bit field in the 8-bit MMIO register, and saves
1445 the value in the S3 script to be replayed on S3 resume.
1447 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1448 between the read result and the value specified by AndData, and writes the
1449 result to the 8-bit MMIO register specified by Address. The value written to
1450 the MMIO register is returned. This function must guarantee that all MMIO
1451 read and write operations are serialized. Extra left bits in AndData are
1454 If 8-bit MMIO register operations are not supported, then ASSERT().
1455 If StartBit is greater than 7, then ASSERT().
1456 If EndBit is greater than 7, then ASSERT().
1457 If EndBit is less than StartBit, then ASSERT().
1458 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1460 @param[in] Address The MMIO register to write.
1461 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1463 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1465 @param[in] AndData The value to AND with the read value from the MMIO register.
1467 @return The value written back to the MMIO register.
1472 S3MmioBitFieldAnd8 (
1480 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed
1481 by a bitwise OR, writes the result back to the bit field in the
1482 8-bit MMIO register, and saves the value in the S3 script to be replayed
1485 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1486 followed by a bitwise OR between the read result and the value
1487 specified by AndData, and writes the result to the 8-bit MMIO register
1488 specified by Address. The value written to the MMIO register is returned.
1489 This function must guarantee that all MMIO read and write operations are
1490 serialized. Extra left bits in both AndData and OrData are stripped.
1492 If 8-bit MMIO register operations are not supported, then ASSERT().
1493 If StartBit is greater than 7, then ASSERT().
1494 If EndBit is greater than 7, then ASSERT().
1495 If EndBit is less than StartBit, then ASSERT().
1496 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1497 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1499 @param[in] Address The MMIO register to write.
1500 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1502 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1504 @param[in] AndData The value to AND with the read value from the MMIO register.
1505 @param[in] OrData The value to OR with the result of the AND operation.
1507 @return The value written back to the MMIO register.
1512 S3MmioBitFieldAndThenOr8 (
1521 Reads a 16-bit MMIO register, and saves the value in the S3 script to be replayed
1524 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
1525 returned. This function must guarantee that all MMIO read and write
1526 operations are serialized.
1528 If 16-bit MMIO register operations are not supported, then ASSERT().
1530 @param[in] Address The MMIO register to read.
1532 @return The value read.
1542 Writes a 16-bit MMIO register, and saves the value in the S3 script to be replayed
1545 Writes the 16-bit MMIO register specified by Address with the value specified
1546 by Value and returns Value. This function must guarantee that all MMIO read
1547 and write operations are serialized, and saves the value in the S3 script to be
1548 replayed on S3 resume.
1550 If 16-bit MMIO register operations are not supported, then ASSERT().
1552 @param[in] Address The MMIO register to write.
1553 @param[in] Value The value to write to the MMIO register.
1555 @return The value written the MMIO register.
1566 Reads a 16-bit MMIO register, performs a bitwise OR, writes the
1567 result back to the 16-bit MMIO register, and saves the value in the S3 script
1568 to be replayed on S3 resume.
1570 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1571 inclusive OR between the read result and the value specified by OrData, and
1572 writes the result to the 16-bit MMIO register specified by Address. The value
1573 written to the MMIO register is returned. This function must guarantee that
1574 all MMIO read and write operations are serialized.
1576 If 16-bit MMIO register operations are not supported, then ASSERT().
1578 @param[in] Address The MMIO register to write.
1579 @param[in] OrData The value to OR with the read value from the MMIO register.
1581 @return The value written back to the MMIO register.
1592 Reads a 16-bit MMIO register, performs a bitwise AND, writes the result
1593 back to the 16-bit MMIO register, and saves the value in the S3 script to be
1594 replayed on S3 resume.
1596 Reads the 16-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 16-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.
1602 If 16-bit MMIO register operations are not supported, then ASSERT().
1604 @param[in] Address The MMIO register to write.
1605 @param[in] AndData The value to AND with the read value from the MMIO register.
1607 @return The value written back to the MMIO register.
1618 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
1619 inclusive OR, writes the result back to the 16-bit MMIO register, and
1620 saves the value in the S3 script to be replayed on S3 resume.
1622 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1623 between the read result and the value specified by AndData, performs a
1624 bitwise OR between the result of the AND operation and the value specified by
1625 OrData, and writes the result to the 16-bit MMIO register specified by
1626 Address. The value written to the MMIO register is returned. This function
1627 must guarantee that all MMIO read and write operations are serialized.
1629 If 16-bit MMIO register operations are not supported, then ASSERT().
1631 @param[in] Address The MMIO register to write.
1632 @param[in] AndData The value to AND with the read value from the MMIO register.
1633 @param[in] OrData The value to OR with the result of the AND operation.
1635 @return The value written back to the MMIO register.
1647 Reads a bit field of a MMIO register, and saves the value in the S3 script to
1648 be replayed on S3 resume.
1650 Reads the bit field in a 16-bit MMIO register. The bit field is specified by
1651 the StartBit and the EndBit. The value of the bit field is returned.
1653 If 16-bit MMIO register operations are not supported, then ASSERT().
1654 If StartBit is greater than 15, then ASSERT().
1655 If EndBit is greater than 15, then ASSERT().
1656 If EndBit is less than StartBit, then ASSERT().
1658 @param[in] Address MMIO register to read.
1659 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1661 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1664 @return The value read.
1669 S3MmioBitFieldRead16 (
1676 Writes a bit field to a MMIO register, and saves the value in the S3 script to
1677 be replayed on S3 resume.
1679 Writes Value to the bit field of the MMIO register. The bit field is
1680 specified by the StartBit and the EndBit. All other bits in the destination
1681 MMIO register are preserved. The new value of the 16-bit register is returned.
1683 If 16-bit MMIO register operations are not supported, then ASSERT().
1684 If StartBit is greater than 15, then ASSERT().
1685 If EndBit is greater than 15, then ASSERT().
1686 If EndBit is less than StartBit, then ASSERT().
1687 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1689 @param[in] Address The MMIO register to write.
1690 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1692 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1694 @param[in] Value New value of the bit field.
1696 @return The value written back to the MMIO register.
1701 S3MmioBitFieldWrite16 (
1709 Reads a bit field in a 16-bit MMIO register, performs a bitwise OR,
1710 writes the result back to the bit field in the 16-bit MMIO register, and
1711 saves the value in the S3 script to be replayed on S3 resume.
1713 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1714 inclusive OR between the read result and the value specified by OrData, and
1715 writes the result to the 16-bit MMIO register specified by Address. The value
1716 written to the MMIO register is returned. This function must guarantee that
1717 all MMIO read and write operations are serialized. Extra left bits in OrData
1720 If 16-bit MMIO register operations are not supported, then ASSERT().
1721 If StartBit is greater than 15, then ASSERT().
1722 If EndBit is greater than 15, then ASSERT().
1723 If EndBit is less than StartBit, then ASSERT().
1724 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1726 @param[in] Address The MMIO register to write.
1727 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1729 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1731 @param[in] OrData The value to OR with the read value from the MMIO register.
1733 @return The value written back to the MMIO register.
1738 S3MmioBitFieldOr16 (
1746 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
1747 writes the result back to the bit field in the 16-bit MMIO register and
1748 saves the value in the S3 script to be replayed on S3 resume.
1750 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1751 between the read result and the value specified by AndData, and writes the
1752 result to the 16-bit MMIO register specified by Address. The value written to
1753 the MMIO register is returned. This function must guarantee that all MMIO
1754 read and write operations are serialized. Extra left bits in AndData are
1757 If 16-bit MMIO register operations are not supported, then ASSERT().
1758 If StartBit is greater than 15, then ASSERT().
1759 If EndBit is greater than 15, then ASSERT().
1760 If EndBit is less than StartBit, then ASSERT().
1761 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1763 @param[in] Address The MMIO register to write.
1764 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1766 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1768 @param[in] AndData The value to AND with the read value from the MMIO register.
1770 @return The value written back to the MMIO register.
1775 S3MmioBitFieldAnd16 (
1783 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed
1784 by a bitwise OR, writes the result back to the bit field in the
1785 16-bit MMIO register, and saves the value in the S3 script to be replayed
1788 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1789 followed by a bitwise OR between the read result and the value
1790 specified by AndData, and writes the result to the 16-bit MMIO register
1791 specified by Address. The value written to the MMIO register is returned.
1792 This function must guarantee that all MMIO read and write operations are
1793 serialized. Extra left bits in both AndData and OrData are stripped.
1795 If 16-bit MMIO register operations are not supported, then ASSERT().
1796 If StartBit is greater than 15, then ASSERT().
1797 If EndBit is greater than 15, then ASSERT().
1798 If EndBit is less than StartBit, then ASSERT().
1799 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1800 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1802 @param[in] Address The MMIO register to write.
1803 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1805 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1807 @param[in] AndData The value to AND with the read value from the MMIO register.
1808 @param[in] OrData The value to OR with the result of the AND operation.
1810 @return The value written back to the MMIO register.
1815 S3MmioBitFieldAndThenOr16 (
1824 Reads a 32-bit MMIO register saves the value in the S3 script to be
1825 replayed on S3 resume.
1827 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
1828 returned. This function must guarantee that all MMIO read and write
1829 operations are serialized.
1831 If 32-bit MMIO register operations are not supported, then ASSERT().
1833 @param[in] Address The MMIO register to read.
1835 @return The value read.
1845 Writes a 32-bit MMIO register, and saves the value in the S3 script to be
1846 replayed on S3 resume.
1848 Writes the 32-bit MMIO register specified by Address with the value specified
1849 by Value and returns Value. This function must guarantee that all MMIO read
1850 and write operations are serialized.
1852 If 32-bit MMIO register operations are not supported, then ASSERT().
1854 @param[in] Address The MMIO register to write.
1855 @param[in] Value The value to write to the MMIO register.
1857 @return The value written the MMIO register.
1868 Reads a 32-bit MMIO register, performs a bitwise OR, writes the
1869 result back to the 32-bit MMIO register, and saves the value in the S3 script
1870 to be replayed on S3 resume.
1872 Reads the 32-bit MMIO register specified by Address, performs a bitwise
1873 inclusive OR between the read result and the value specified by OrData, and
1874 writes the result to the 32-bit MMIO register specified by Address. The value
1875 written to the MMIO register is returned. This function must guarantee that
1876 all MMIO read and write operations are serialized.
1878 If 32-bit MMIO register operations are not supported, then ASSERT().
1880 @param[in] Address The MMIO register to write.
1881 @param[in] OrData The value to OR with the read value from the MMIO register.
1883 @return The value written back to the MMIO register.
1894 Reads a 32-bit MMIO register, performs a bitwise AND, writes the result
1895 back to the 32-bit MMIO register, and saves the value in the S3 script to be
1896 replayed on S3 resume.
1898 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1899 between the read result and the value specified by AndData, and writes the
1900 result to the 32-bit MMIO register specified by Address. The value written to
1901 the MMIO register is returned. This function must guarantee that all MMIO
1902 read and write operations are serialized.
1904 If 32-bit MMIO register operations are not supported, then ASSERT().
1906 @param[in] Address The MMIO register to write.
1907 @param[in] AndData The value to AND with the read value from the MMIO register.
1909 @return The value written back to the MMIO register.
1920 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
1921 inclusive OR, writes the result back to the 32-bit MMIO register, and
1922 saves the value in the S3 script to be replayed on S3 resume.
1924 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1925 between the read result and the value specified by AndData, performs a
1926 bitwise OR between the result of the AND operation and the value specified by
1927 OrData, and writes the result to the 32-bit MMIO register specified by
1928 Address. The value written to the MMIO register is returned. This function
1929 must guarantee that all MMIO read and write operations are serialized.
1931 If 32-bit MMIO register operations are not supported, then ASSERT().
1933 @param[in] Address The MMIO register to write.
1934 @param[in] AndData The value to AND with the read value from the MMIO register.
1935 @param[in] OrData The value to OR with the result of the AND operation.
1937 @return The value written back to the MMIO register.
1949 Reads a bit field of a MMIO register, and saves the value in the S3 script
1950 to be replayed on S3 resume.
1952 Reads the bit field in a 32-bit MMIO register. The bit field is specified by
1953 the StartBit and the EndBit. The value of the bit field is returned.
1955 If 32-bit MMIO register operations are not supported, then ASSERT().
1956 If StartBit is greater than 31, then ASSERT().
1957 If EndBit is greater than 31, then ASSERT().
1958 If EndBit is less than StartBit, then ASSERT().
1960 @param[in] Address MMIO register to read.
1961 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1963 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1966 @return The value read.
1971 S3MmioBitFieldRead32 (
1978 Writes a bit field to a MMIO register, and saves the value in the S3 script
1979 to be replayed on S3 resume.
1981 Writes Value to the bit field of the MMIO register. The bit field is
1982 specified by the StartBit and the EndBit. All other bits in the destination
1983 MMIO register are preserved. The new value of the 32-bit register is returned.
1985 If 32-bit MMIO register operations are not supported, then ASSERT().
1986 If StartBit is greater than 31, then ASSERT().
1987 If EndBit is greater than 31, then ASSERT().
1988 If EndBit is less than StartBit, then ASSERT().
1989 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1991 @param[in] Address The MMIO register to write.
1992 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1994 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1996 @param[in] Value New value of the bit field.
1998 @return The value written back to the MMIO register.
2003 S3MmioBitFieldWrite32 (
2011 Reads a bit field in a 32-bit MMIO register, performs a bitwise OR,
2012 writes the result back to the bit field in the 32-bit MMIO register, and
2013 saves the value in the S3 script to be replayed on S3 resume.
2015 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2016 inclusive OR between the read result and the value specified by OrData, and
2017 writes the result to the 32-bit MMIO register specified by Address. The value
2018 written to the MMIO register is returned. This function must guarantee that
2019 all MMIO read and write operations are serialized. Extra left bits in OrData
2022 If 32-bit MMIO register operations are not supported, then ASSERT().
2023 If StartBit is greater than 31, then ASSERT().
2024 If EndBit is greater than 31, then ASSERT().
2025 If EndBit is less than StartBit, then ASSERT().
2026 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2028 @param[in] Address The MMIO register to write.
2029 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2031 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2033 @param[in] OrData The value to OR with the read value from the MMIO register.
2035 @return The value written back to the MMIO register.
2040 S3MmioBitFieldOr32 (
2048 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
2049 writes the result back to the bit field in the 32-bit MMIO register and
2050 saves the value in the S3 script to be replayed on S3 resume.
2052 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2053 between the read result and the value specified by AndData, and writes the
2054 result to the 32-bit MMIO register specified by Address. The value written to
2055 the MMIO register is returned. This function must guarantee that all MMIO
2056 read and write operations are serialized. Extra left bits in AndData are
2059 If 32-bit MMIO register operations are not supported, then ASSERT().
2060 If StartBit is greater than 31, then ASSERT().
2061 If EndBit is greater than 31, then ASSERT().
2062 If EndBit is less than StartBit, then ASSERT().
2063 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2065 @param[in] Address The MMIO register to write.
2066 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2068 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2070 @param[in] AndData The value to AND with the read value from the MMIO register.
2072 @return The value written back to the MMIO register.
2077 S3MmioBitFieldAnd32 (
2085 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed
2086 by a bitwise OR, writes the result back to the bit field in the
2087 32-bit MMIO register, and saves the value in the S3 script to be replayed
2090 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2091 followed by a bitwise OR between the read result and the value
2092 specified by AndData, and writes the result to the 32-bit MMIO register
2093 specified by Address. The value written to the MMIO register is returned.
2094 This function must guarantee that all MMIO read and write operations are
2095 serialized. Extra left bits in both AndData and OrData are stripped.
2097 If 32-bit MMIO register operations are not supported, then ASSERT().
2098 If StartBit is greater than 31, then ASSERT().
2099 If EndBit is greater than 31, then ASSERT().
2100 If EndBit is less than StartBit, then ASSERT().
2101 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2102 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2104 @param[in] Address The MMIO register to write.
2105 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2107 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2109 @param[in] AndData The value to AND with the read value from the MMIO register.
2110 @param[in] OrData The value to OR with the result of the AND operation.
2112 @return The value written back to the MMIO register.
2117 S3MmioBitFieldAndThenOr32 (
2126 Reads a 64-bit MMIO register, and saves the value in the S3 script to be
2127 replayed on S3 resume.
2129 Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
2130 returned. This function must guarantee that all MMIO read and write
2131 operations are serialized.
2133 If 64-bit MMIO register operations are not supported, then ASSERT().
2135 @param[in] Address The MMIO register to read.
2137 @return The value read.
2147 Writes a 64-bit MMIO register, and saves the value in the S3 script to be
2148 replayed on S3 resume.
2150 Writes the 64-bit MMIO register specified by Address with the value specified
2151 by Value and returns Value. This function must guarantee that all MMIO read
2152 and write operations are serialized.
2154 If 64-bit MMIO register operations are not supported, then ASSERT().
2156 @param[in] Address The MMIO register to write.
2157 @param[in] Value The value to write to the MMIO register.
2159 @return The value written the MMIO register.
2170 Reads a 64-bit MMIO register, performs a bitwise OR, writes the
2171 result back to the 64-bit MMIO register, and saves the value in the S3 script
2172 to be replayed on S3 resume.
2174 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2175 inclusive OR between the read result and the value specified by OrData, and
2176 writes the result to the 64-bit MMIO register specified by Address. The value
2177 written to the MMIO register is returned. This function must guarantee that
2178 all MMIO read and write operations are serialized.
2180 If 64-bit MMIO register operations are not supported, then ASSERT().
2182 @param[in] Address The MMIO register to write.
2183 @param[in] OrData The value to OR with the read value from the MMIO register.
2185 @return The value written back to the MMIO register.
2196 Reads a 64-bit MMIO register, performs a bitwise AND, writes the result
2197 back to the 64-bit MMIO register, and saves the value in the S3 script to be
2198 replayed on S3 resume.
2200 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2201 between the read result and the value specified by AndData, and writes the
2202 result to the 64-bit MMIO register specified by Address. The value written to
2203 the MMIO register is returned. This function must guarantee that all MMIO
2204 read and write operations are serialized.
2206 If 64-bit MMIO register operations are not supported, then ASSERT().
2208 @param[in] Address The MMIO register to write.
2209 @param[in] AndData The value to AND with the read value from the MMIO register.
2211 @return The value written back to the MMIO register.
2222 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
2223 inclusive OR, writes the result back to the 64-bit MMIO register, and
2224 saves the value in the S3 script to be replayed on S3 resume.
2226 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2227 between the read result and the value specified by AndData, performs a
2228 bitwise OR between the result of the AND operation and the value specified by
2229 OrData, and writes the result to the 64-bit MMIO register specified by
2230 Address. The value written to the MMIO register is returned. This function
2231 must guarantee that all MMIO read and write operations are serialized.
2233 If 64-bit MMIO register operations are not supported, then ASSERT().
2235 @param[in] Address The MMIO register to write.
2236 @param[in] AndData The value to AND with the read value from the MMIO register.
2237 @param[in] OrData The value to OR with the result of the AND operation.
2239 @return The value written back to the MMIO register.
2251 Reads a bit field of a MMIO register saves the value in the S3 script to
2252 be replayed on S3 resume.
2254 Reads the bit field in a 64-bit MMIO register. The bit field is specified by
2255 the StartBit and the EndBit. The value of the bit field is returned.
2257 If 64-bit MMIO register operations are not supported, then ASSERT().
2258 If StartBit is greater than 63, then ASSERT().
2259 If EndBit is greater than 63, then ASSERT().
2260 If EndBit is less than StartBit, then ASSERT().
2262 @param[in] Address MMIO register to read.
2263 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2265 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2268 @return The value read.
2273 S3MmioBitFieldRead64 (
2280 Writes a bit field to a MMIO register, and saves the value in the S3 script to
2281 be replayed on S3 resume.
2283 Writes Value to the bit field of the MMIO register. The bit field is
2284 specified by the StartBit and the EndBit. All other bits in the destination
2285 MMIO register are preserved. The new value of the 64-bit register is returned.
2287 If 64-bit MMIO register operations are not supported, then ASSERT().
2288 If StartBit is greater than 63, then ASSERT().
2289 If EndBit is greater than 63, then ASSERT().
2290 If EndBit is less than StartBit, then ASSERT().
2291 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2293 @param[in] Address The MMIO register to write.
2294 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2296 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2298 @param[in] Value New value of the bit field.
2300 @return The value written back to the MMIO register.
2305 S3MmioBitFieldWrite64 (
2313 Reads a bit field in a 64-bit MMIO register, performs a bitwise OR,
2314 writes the result back to the bit field in the 64-bit MMIO register, and
2315 saves the value in the S3 script to be replayed on S3 resume.
2317 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2318 inclusive OR between the read result and the value specified by OrData, and
2319 writes the result to the 64-bit MMIO register specified by Address. The value
2320 written to the MMIO register is returned. This function must guarantee that
2321 all MMIO read and write operations are serialized. Extra left bits in OrData
2324 If 64-bit MMIO register operations are not supported, then ASSERT().
2325 If StartBit is greater than 63, then ASSERT().
2326 If EndBit is greater than 63, then ASSERT().
2327 If EndBit is less than StartBit, then ASSERT().
2328 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2330 @param[in] Address The MMIO register to write.
2331 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2333 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2335 @param[in] OrData The value to OR with the read value from the MMIO register.
2337 @return The value written back to the MMIO register.
2342 S3MmioBitFieldOr64 (
2350 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and
2351 writes the result back to the bit field in the 64-bit MMIO register, and saves
2352 the value in the S3 script to be replayed on S3 resume.
2354 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2355 between the read result and the value specified by AndData, and writes the
2356 result to the 64-bit MMIO register specified by Address. The value written to
2357 the MMIO register is returned. This function must guarantee that all MMIO
2358 read and write operations are serialized. Extra left bits in AndData are
2361 If 64-bit MMIO register operations are not supported, then ASSERT().
2362 If StartBit is greater than 63, then ASSERT().
2363 If EndBit is greater than 63, then ASSERT().
2364 If EndBit is less than StartBit, then ASSERT().
2365 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2367 @param[in] Address The MMIO register to write.
2368 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2370 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2372 @param[in] AndData The value to AND with the read value from the MMIO register.
2374 @return The value written back to the MMIO register.
2379 S3MmioBitFieldAnd64 (
2387 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed
2388 by a bitwise OR, writes the result back to the bit field in the
2389 64-bit MMIO register, and saves the value in the S3 script to be replayed
2392 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2393 followed by a bitwise OR between the read result and the value
2394 specified by AndData, and writes the result to the 64-bit MMIO register
2395 specified by Address. The value written to the MMIO register is returned.
2396 This function must guarantee that all MMIO read and write operations are
2397 serialized. Extra left bits in both AndData and OrData are stripped.
2399 If 64-bit MMIO register operations are not supported, then ASSERT().
2400 If StartBit is greater than 63, then ASSERT().
2401 If EndBit is greater than 63, then ASSERT().
2402 If EndBit is less than StartBit, then ASSERT().
2403 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2404 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2406 @param[in] Address The MMIO register to write.
2407 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2409 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2411 @param[in] AndData The value to AND with the read value from the MMIO register.
2412 @param[in] OrData The value to OR with the result of the AND operation.
2414 @return The value written back to the MMIO register.
2419 S3MmioBitFieldAndThenOr64 (
2428 Copies data from MMIO region to system memory by using 8-bit access,
2429 and saves the value in the S3 script to be replayed on S3 resume.
2431 Copy data from MMIO region specified by starting address StartAddress
2432 to system memory specified by Buffer by using 8-bit access. The total
2433 number of bytes to be copied is specified by Length. Buffer is returned.
2435 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2436 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2439 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2440 @param[in] Length Size in bytes of the copy.
2441 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2449 IN UINTN StartAddress
,
2455 Copies data from MMIO region to system memory by using 16-bit access,
2456 and saves the value in the S3 script to be replayed on S3 resume.
2458 Copy data from MMIO region specified by starting address StartAddress
2459 to system memory specified by Buffer by using 16-bit access. The total
2460 number of bytes to be copied is specified by Length. Buffer is returned.
2462 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2464 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2465 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2467 If Length is not aligned on a 16-bit boundary, then ASSERT().
2468 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2470 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2471 @param[in] Length Size in bytes of the copy.
2472 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2479 S3MmioReadBuffer16 (
2480 IN UINTN StartAddress
,
2486 Copies data from MMIO region to system memory by using 32-bit access,
2487 and saves the value in the S3 script to be replayed on S3 resume.
2489 Copy data from MMIO region specified by starting address StartAddress
2490 to system memory specified by Buffer by using 32-bit access. The total
2491 number of byte to be copied is specified by Length. Buffer is returned.
2493 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2495 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2496 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2498 If Length is not aligned on a 32-bit boundary, then ASSERT().
2499 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2501 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2502 @param[in] Length Size in bytes of the copy.
2503 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2510 S3MmioReadBuffer32 (
2511 IN UINTN StartAddress
,
2517 Copies data from MMIO region to system memory by using 64-bit access,
2518 and saves the value in the S3 script to be replayed on S3 resume.
2520 Copy data from MMIO region specified by starting address StartAddress
2521 to system memory specified by Buffer by using 64-bit access. The total
2522 number of byte to be copied is specified by Length. Buffer is returned.
2524 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2526 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2527 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2529 If Length is not aligned on a 64-bit boundary, then ASSERT().
2530 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2532 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2533 @param[in] Length Size in bytes of the copy.
2534 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2541 S3MmioReadBuffer64 (
2542 IN UINTN StartAddress
,
2548 Copies data from system memory to MMIO region by using 8-bit access,
2549 and saves the value in the S3 script to be replayed on S3 resume.
2551 Copy data from system memory specified by Buffer to MMIO region specified
2552 by starting address StartAddress by using 8-bit access. The total number
2553 of byte to be copied is specified by Length. Buffer is returned.
2555 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2556 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2559 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2560 @param[in] Length Size in bytes of the copy.
2561 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2568 S3MmioWriteBuffer8 (
2569 IN UINTN StartAddress
,
2571 IN CONST UINT8
*Buffer
2575 Copies data from system memory to MMIO region by using 16-bit access,
2576 and saves the value in the S3 script to be replayed on S3 resume.
2578 Copy data from system memory specified by Buffer to MMIO region specified
2579 by starting address StartAddress by using 16-bit access. The total number
2580 of bytes to be copied is specified by Length. Buffer is returned.
2582 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2584 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2585 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2587 If Length is not aligned on a 16-bit boundary, then ASSERT().
2589 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2591 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2592 @param[in] Length Size in bytes of the copy.
2593 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2600 S3MmioWriteBuffer16 (
2601 IN UINTN StartAddress
,
2603 IN CONST UINT16
*Buffer
2607 Copies data from system memory to MMIO region by using 32-bit access,
2608 and saves the value in the S3 script to be replayed on S3 resume.
2610 Copy data from system memory specified by Buffer to MMIO region specified
2611 by starting address StartAddress by using 32-bit access. The total number
2612 of bytes to be copied is specified by Length. Buffer is returned.
2614 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2616 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2617 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2619 If Length is not aligned on a 32-bit boundary, then ASSERT().
2621 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2623 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2624 @param[in] Length Size in bytes of the copy.
2625 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2632 S3MmioWriteBuffer32 (
2633 IN UINTN StartAddress
,
2635 IN CONST UINT32
*Buffer
2639 Copies data from system memory to MMIO region by using 64-bit access,
2640 and saves the value in the S3 script to be replayed on S3 resume.
2642 Copy data from system memory specified by Buffer to MMIO region specified
2643 by starting address StartAddress by using 64-bit access. The total number
2644 of bytes to be copied is specified by Length. Buffer is returned.
2646 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2648 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2649 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2651 If Length is not aligned on a 64-bit boundary, then ASSERT().
2653 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2655 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2656 @param[in] Length Size in bytes of the copy.
2657 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2664 S3MmioWriteBuffer64 (
2665 IN UINTN StartAddress
,
2667 IN CONST UINT64
*Buffer