]>
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 - 2012, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions
10 of the BSD License which accompanies this distribution. The
11 full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #ifndef __S3_IO_LIB_H__
20 #define __S3_IO_LIB_H__
23 Reads an 8-bit I/O port and saves the value in the S3 script to be replayed
26 Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned.
27 This function must guarantee that all I/O read and write operations are
30 If 8-bit I/O port operations are not supported, then ASSERT().
32 @param[in] Port The I/O port to read.
34 @return The value read.
44 Writes an 8-bit I/O port, and saves the value in the S3 script to be replayed
47 Writes the 8-bit I/O port specified by Port with the value specified by Value
48 and returns Value. This function must guarantee that all I/O read and write
49 operations are serialized.
51 If 8-bit I/O port operations are not supported, then ASSERT().
53 @param[in] Port The I/O port to write.
54 @param[in] Value The value to write to the I/O port.
56 @return The value written the I/O port.
67 Reads an 8-bit I/O port, performs a bitwise OR, writes the
68 result back to the 8-bit I/O port, and saves the value in the S3 script to be
69 replayed on S3 resume.
71 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
72 between the read result and the value specified by OrData, and writes the
73 result to the 8-bit I/O port specified by Port. The value written to the I/O
74 port is returned. This function must guarantee that all I/O read and write
75 operations are serialized.
77 If 8-bit I/O port operations are not supported, then ASSERT().
79 @param[in] Port The I/O port to write.
80 @param[in] OrData The value to OR with the read value from the I/O port.
82 @return The value written back to the I/O port.
93 Reads an 8-bit I/O port, performs a bitwise AND, writes the result back
94 to the 8-bit I/O port, and saves the value in the S3 script to be replayed
97 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
98 the read result and the value specified by AndData, and writes the result to
99 the 8-bit I/O port specified by Port. The value written to the I/O port is
100 returned. This function must guarantee that all I/O read and write operations
103 If 8-bit I/O port operations are not supported, then ASSERT().
105 @param[in] Port The I/O port to write.
106 @param[in] AndData The value to AND with the read value from the I/O port.
108 @return The value written back to the I/O port.
119 Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
120 inclusive OR, writes the result back to the 8-bit I/O port, and saves
121 the value in the S3 script to be replayed on S3 resume.
123 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
124 the read result and the value specified by AndData, performs a bitwise OR
125 between the result of the AND operation and the value specified by OrData,
126 and writes the result to the 8-bit I/O port specified by Port. The value
127 written to the I/O port is returned. This function must guarantee that all
128 I/O read and write operations are serialized.
130 If 8-bit I/O port operations are not supported, then ASSERT().
132 @param[in] Port The I/O port to write.
133 @param[in] AndData The value to AND with the read value from the I/O port.
134 @param[in] OrData The value to OR with the result of the AND operation.
136 @return The value written back to the I/O port.
148 Reads a bit field of an I/O register, and saves the value in the S3 script to
149 be replayed on S3 resume.
151 Reads the bit field in an 8-bit I/O register. The bit field is specified by
152 the StartBit and the EndBit. The value of the bit field is returned.
154 If 8-bit I/O port operations are not supported, then ASSERT().
155 If StartBit is greater than 7, then ASSERT().
156 If EndBit is greater than 7, then ASSERT().
157 If EndBit is less than StartBit, then ASSERT().
159 @param[in] Port The I/O port to read.
160 @param[in] StartBit The ordinal of the least significant bit in the bit field.
162 @param[in] EndBit The ordinal of the most significant bit in the bit field.
165 @return The value read.
177 Writes a bit field to an I/O register and saves the value in the S3 script to
178 be replayed on S3 resume.
180 Writes Value to the bit field of the I/O register. The bit field is specified
181 by the StartBit and the EndBit. All other bits in the destination I/O
182 register are preserved. The value written to the I/O port is returned.
183 Remaining bits in Value are stripped.
185 If 8-bit I/O port operations are not supported, then ASSERT().
186 If StartBit is greater than 7, then ASSERT().
187 If EndBit is greater than 7, then ASSERT().
188 If EndBit is less than StartBit, then ASSERT().
189 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
191 @param[in] Port The I/O port to write.
192 @param[in] StartBit The ordinal of the least significant bit in the bit field.
194 @param[in] EndBit The ordinal of the most significant bit in the bit field.
196 @param[in] Value New value of the bit field.
198 @return The value written back to the I/O port.
211 Reads a bit field in an 8-bit port, performs a bitwise OR, writes the
212 result back to the bit field in the 8-bit port, and saves the value in the
213 S3 script to be replayed on S3 resume.
215 Reads the 8-bit I/O port specified by Port, performs a bitwise OR
216 between the read result and the value specified by OrData, and writes the
217 result to the 8-bit I/O port specified by Port. The value written to the I/O
218 port is returned. This function must guarantee that all I/O read and write
219 operations are serialized. Extra left bits in OrData are stripped.
221 If 8-bit I/O port operations are not supported, then ASSERT().
222 If StartBit is greater than 7, then ASSERT().
223 If EndBit is greater than 7, then ASSERT().
224 If EndBit is less than StartBit, then ASSERT().
225 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
227 @param[in] Port The I/O port to write.
228 @param[in] StartBit The ordinal of the least significant bit in the bit field.
230 @param[in] EndBit The ordinal of the most significant bit in the bit field.
232 @param[in] OrData The value to OR with the read value from the I/O port.
234 @return The value written back to the I/O port.
247 Reads a bit field in an 8-bit port, performs a bitwise AND, writes the
248 result back to the bit field in the 8-bit port, and saves the value in the
249 S3 script to be replayed on S3 resume.
251 Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
252 the read result and the value specified by AndData, and writes the result to
253 the 8-bit I/O port specified by Port. The value written to the I/O port is
254 returned. This function must guarantee that all I/O read and write operations
255 are serialized. Extra left bits in AndData are stripped.
257 If 8-bit I/O port operations are not supported, then ASSERT().
258 If StartBit is greater than 7, then ASSERT().
259 If EndBit is greater than 7, then ASSERT().
260 If EndBit is less than StartBit, then ASSERT().
261 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
263 @param[in] Port The I/O port to write.
264 @param[in] StartBit The ordinal of the least significant bit in the bit field.
266 @param[in] EndBit The ordinal of the most significant bit in the bit field.
268 @param[in] AndData The value to AND with the read value from the I/O port.
270 @return The value written back to the I/O port.
283 Reads a bit field in an 8-bit port, performs a bitwise AND followed by a
284 bitwise OR, writes the result back to the bit field in the
285 8-bit port, and saves the value in the S3 script to be replayed on S3 resume.
287 Reads the 8-bit I/O port specified by Port, performs a bitwise AND followed
288 by a bitwise OR between the read result and the value specified by
289 AndData, and writes the result to the 8-bit I/O port specified by Port. The
290 value written to the I/O port is returned. This function must guarantee that
291 all I/O read and write operations are serialized. Extra left bits in both
292 AndData and OrData are stripped.
294 If 8-bit I/O port operations are not supported, then ASSERT().
295 If StartBit is greater than 7, then ASSERT().
296 If EndBit is greater than 7, then ASSERT().
297 If EndBit is less than StartBit, then ASSERT().
298 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
299 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
301 @param[in] Port The I/O port to write.
302 @param[in] StartBit The ordinal of the least significant bit in the bit field.
304 @param[in] EndBit The ordinal of the most significant bit in the bit field.
306 @param[in] AndData The value to AND with the read value from the I/O port.
307 @param[in] OrData The value to OR with the result of the AND operation.
309 @return The value written back to the I/O port.
314 S3IoBitFieldAndThenOr8 (
323 Reads a 16-bit I/O port, and saves the value in the S3 script to be replayed
326 Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned.
327 This function must guarantee that all I/O read and write operations are
330 If 16-bit I/O port operations are not supported, then ASSERT().
332 @param[in] Port The I/O port to read.
334 @return The value read.
344 Writes a 16-bit I/O port, and saves the value in the S3 script to be replayed
347 Writes the 16-bit I/O port specified by Port with the value specified by Value
348 and returns Value. This function must guarantee that all I/O read and write
349 operations are serialized.
351 If 16-bit I/O port operations are not supported, then ASSERT().
353 @param[in] Port The I/O port to write.
354 @param[in] Value The value to write to the I/O port.
356 @return The value written the I/O port.
367 Reads a 16-bit I/O port, performs a bitwise OR, writes the
368 result back to the 16-bit I/O port, and saves the value in the S3 script to
369 be replayed on S3 resume.
371 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
372 between the read result and the value specified by OrData, and writes the
373 result to the 16-bit I/O port specified by Port. The value written to the I/O
374 port is returned. This function must guarantee that all I/O read and write
375 operations are serialized.
377 If 16-bit I/O port operations are not supported, then ASSERT().
379 @param[in] Port The I/O port to write.
380 @param[in] OrData The value to OR with the read value from the I/O port.
382 @return The value written back to the I/O port.
393 Reads a 16-bit I/O port, performs a bitwise AND, writes the result back
394 to the 16-bit I/O port , and saves the value in the S3 script to be replayed
397 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
398 the read result and the value specified by AndData, and writes the result to
399 the 16-bit I/O port specified by Port. The value written to the I/O port is
400 returned. This function must guarantee that all I/O read and write operations
403 If 16-bit I/O port operations are not supported, then ASSERT().
405 @param[in] Port The I/O port to write.
406 @param[in] AndData The value to AND with the read value from the I/O port.
408 @return The value written back to the I/O port.
419 Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
420 inclusive OR, writes the result back to the 16-bit I/O port, and saves
421 the value in the S3 script to be replayed on S3 resume.
423 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
424 the read result and the value specified by AndData, performs a bitwise OR
425 between the result of the AND operation and the value specified by OrData,
426 and writes the result to the 16-bit I/O port specified by Port. The value
427 written to the I/O port is returned. This function must guarantee that all
428 I/O read and write operations are serialized.
430 If 16-bit I/O port operations are not supported, then ASSERT().
432 @param[in] Port The I/O port to write.
433 @param[in] AndData The value to AND with the read value from the I/O port.
434 @param[in] OrData The value to OR with the result of the AND operation.
436 @return The value written back to the I/O port.
448 Reads a bit field of an I/O register saves the value in the S3 script to be
449 replayed on S3 resume.
451 Reads the bit field in a 16-bit I/O register. The bit field is specified by
452 the StartBit and the EndBit. The value of the bit field is returned.
454 If 16-bit I/O port operations are not supported, then ASSERT().
455 If StartBit is greater than 15, then ASSERT().
456 If EndBit is greater than 15, then ASSERT().
457 If EndBit is less than StartBit, then ASSERT().
459 @param[in] Port The I/O port to read.
460 @param[in] StartBit The ordinal of the least significant bit in the bit field.
462 @param[in] EndBit The ordinal of the most significant bit in the bit field.
465 @return The value read.
477 Writes a bit field to an I/O register, and saves the value in the S3 script
478 to be replayed on S3 resume.
480 Writes Value to the bit field of the I/O register. The bit field is specified
481 by the StartBit and the EndBit. All other bits in the destination I/O
482 register are preserved. The value written to the I/O port is returned. Extra
483 left bits in Value are stripped.
485 If 16-bit I/O port operations are not supported, then ASSERT().
486 If StartBit is greater than 15, then ASSERT().
487 If EndBit is greater than 15, then ASSERT().
488 If EndBit is less than StartBit, then ASSERT().
489 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
491 @param[in] Port The I/O port to write.
492 @param[in] StartBit The ordinal of the least significant bit in the bit field.
494 @param[in] EndBit The ordinal of the most significant bit in the bit field.
496 @param[in] Value New value of the bit field.
498 @return The value written back to the I/O port.
503 S3IoBitFieldWrite16 (
511 Reads a bit field in a 16-bit port, performs a bitwise OR, writes the
512 result back to the bit field in the 16-bit port, and saves the value in the
513 S3 script to be replayed on S3 resume.
515 Reads the 16-bit I/O port specified by Port, performs a bitwise OR
516 between the read result and the value specified by OrData, and writes the
517 result to the 16-bit I/O port specified by Port. The value written to the I/O
518 port is returned. This function must guarantee that all I/O read and write
519 operations are serialized. Extra left bits in OrData are stripped.
521 If 16-bit I/O port operations are not supported, then ASSERT().
522 If StartBit is greater than 15, then ASSERT().
523 If EndBit is greater than 15, then ASSERT().
524 If EndBit is less than StartBit, then ASSERT().
525 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
527 @param[in] Port The I/O port to write.
528 @param[in] StartBit The ordinal of the least significant bit in the bit field.
530 @param[in] EndBit The ordinal of the most significant bit in the bit field.
532 @param[in] OrData The value to OR with the read value from the I/O port.
534 @return The value written back to the I/O port.
547 Reads a bit field in a 16-bit port, performs a bitwise AND, writes the
548 result back to the bit field in the 16-bit port, and saves the value in the
549 S3 script to be replayed on S3 resume.
551 Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
552 the read result and the value specified by AndData, and writes the result to
553 the 16-bit I/O port specified by Port. The value written to the I/O port is
554 returned. This function must guarantee that all I/O read and write operations
555 are serialized. Extra left bits in AndData are stripped.
557 If 16-bit I/O port operations are not supported, then ASSERT().
558 If StartBit is greater than 15, then ASSERT().
559 If EndBit is greater than 15, then ASSERT().
560 If EndBit is less than StartBit, then ASSERT().
561 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
563 @param[in] Port The I/O port to write.
564 @param[in] StartBit The ordinal of the least significant bit in the bit field.
566 @param[in] EndBit The ordinal of the most significant bit in the bit field.
568 @param[in] AndData The value to AND with the read value from the I/O port.
570 @return The value written back to the I/O port.
583 Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
584 bitwise OR, writes the result back to the bit field in the
585 16-bit port, and saves the value in the S3 script to be replayed on S3
588 Reads the 16-bit I/O port specified by Port, performs a bitwise AND followed
589 by a bitwise OR between the read result and the value specified by
590 AndData, and writes the result to the 16-bit I/O port specified by Port. The
591 value written to the I/O port is returned. This function must guarantee that
592 all I/O read and write operations are serialized. Extra left bits in both
593 AndData and OrData are stripped.
595 If 16-bit I/O port operations are not supported, then ASSERT().
596 If StartBit is greater than 15, then ASSERT().
597 If EndBit is greater than 15, then ASSERT().
598 If EndBit is less than StartBit, then ASSERT().
599 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
600 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
602 @param[in] Port The I/O port to write.
603 @param[in] StartBit The ordinal of the least significant bit in the bit field.
605 @param[in] EndBit The ordinal of the most significant bit in the bit field.
607 @param[in] AndData The value to AND with the read value from the I/O port.
608 @param[in] OrData The value to OR with the result of the AND operation.
610 @return The value written back to the I/O port.
615 S3IoBitFieldAndThenOr16 (
624 Reads a 32-bit I/O port, and saves the value in the S3 script to be replayed
627 Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned.
628 This function must guarantee that all I/O read and write operations are
631 If 32-bit I/O port operations are not supported, then ASSERT().
633 @param[in] Port The I/O port to read.
635 @return The value read.
645 Writes a 32-bit I/O port, and saves the value in the S3 script to be replayed
648 Writes the 32-bit I/O port specified by Port with the value specified by Value
649 and returns Value. This function must guarantee that all I/O read and write
650 operations are serialized.
652 If 32-bit I/O port operations are not supported, then ASSERT().
654 @param[in] Port The I/O port to write.
655 @param[in] Value The value to write to the I/O port.
657 @return The value written the I/O port.
668 Reads a 32-bit I/O port, performs a bitwise OR, writes the
669 result back to the 32-bit I/O port, and saves the value in the S3 script to
670 be replayed on S3 resume.
672 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
673 between the read result and the value specified by OrData, and writes the
674 result to the 32-bit I/O port specified by Port. The value written to the I/O
675 port is returned. This function must guarantee that all I/O read and write
676 operations are serialized.
678 If 32-bit I/O port operations are not supported, then ASSERT().
680 @param[in] Port The I/O port to write.
681 @param[in] OrData The value to OR with the read value from the I/O port.
683 @return The value written back to the I/O port.
694 Reads a 32-bit I/O port, performs a bitwise AND, writes the result back
695 to the 32-bit I/O port, and saves the value in the S3 script to be replayed
698 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
699 the read result and the value specified by AndData, and writes the result to
700 the 32-bit I/O port specified by Port. The value written to the I/O port is
701 returned. This function must guarantee that all I/O read and write operations
704 If 32-bit I/O port operations are not supported, then ASSERT().
706 @param[in] Port The I/O port to write.
707 @param[in] AndData The value to AND with the read value from the I/O port.
709 @return The value written back to the I/O port.
720 Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
721 inclusive OR, writes the result back to the 32-bit I/O port, and saves
722 the value in the S3 script to be replayed on S3 resume.
724 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
725 the read result and the value specified by AndData, performs a bitwise OR
726 between the result of the AND operation and the value specified by OrData,
727 and writes the result to the 32-bit I/O port specified by Port. The value
728 written to the I/O port is returned. This function must guarantee that all
729 I/O read and write operations are serialized.
731 If 32-bit I/O port operations are not supported, then ASSERT().
733 @param[in] Port The I/O port to write.
734 @param[in] AndData The value to AND with the read value from the I/O port.
735 @param[in] OrData The value to OR with the result of the AND operation.
737 @return The value written back to the I/O port.
749 Reads a bit field of an I/O register, and saves the value in the S3 script to
750 be replayed on S3 resume.
752 Reads the bit field in a 32-bit I/O register. The bit field is specified by
753 the StartBit and the EndBit. The value of the bit field is returned.
755 If 32-bit I/O port operations are not supported, then ASSERT().
756 If StartBit is greater than 31, then ASSERT().
757 If EndBit is greater than 31, then ASSERT().
758 If EndBit is less than StartBit, then ASSERT().
760 @param[in] Port The I/O port to read.
761 @param[in] StartBit The ordinal of the least significant bit in the bit field.
763 @param[in] EndBit The ordinal of the most significant bit in the bit field.
766 @return The value read.
778 Writes a bit field to an I/O register, and saves the value in the S3 script to
779 be replayed on S3 resume.
781 Writes Value to the bit field of the I/O register. The bit field is specified
782 by the StartBit and the EndBit. All other bits in the destination I/O
783 register are preserved. The value written to the I/O port is returned. Extra
784 left bits in Value are stripped.
786 If 32-bit I/O port operations are not supported, then ASSERT().
787 If StartBit is greater than 31, then ASSERT().
788 If EndBit is greater than 31, then ASSERT().
789 If EndBit is less than StartBit, then ASSERT().
790 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
792 @param[in] Port The I/O port to write.
793 @param[in] StartBit The ordinal of the least significant bit in the bit field.
795 @param[in] EndBit The ordinal of the most significant bit in the bit field.
797 @param[in] Value New value of the bit field.
799 @return The value written back to the I/O port.
804 S3IoBitFieldWrite32 (
812 Reads a bit field in a 32-bit port, performs a bitwise OR, writes the
813 result back to the bit field in the 32-bit port, and saves the value in the
814 S3 script to be replayed on S3 resume.
816 Reads the 32-bit I/O port specified by Port, performs a bitwise OR
817 between the read result and the value specified by OrData, and writes the
818 result to the 32-bit I/O port specified by Port. The value written to the I/O
819 port is returned. This function must guarantee that all I/O read and write
820 operations are serialized. Extra left bits in OrData are stripped.
822 If 32-bit I/O port operations are not supported, then ASSERT().
823 If StartBit is greater than 31, then ASSERT().
824 If EndBit is greater than 31, then ASSERT().
825 If EndBit is less than StartBit, then ASSERT().
826 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
828 @param[in] Port The I/O port to write.
829 @param[in] StartBit The ordinal of the least significant bit in the bit field.
831 @param[in] EndBit The ordinal of the most significant bit in the bit field.
833 @param[in] OrData The value to OR with the read value from the I/O port.
835 @return The value written back to the I/O port.
848 Reads a bit field in a 32-bit port, performs a bitwise AND, writes the
849 result back to the bit field in the 32-bit port, and saves the value in the
850 S3 script to be replayed on S3 resume.
852 Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
853 the read result and the value specified by AndData, and writes the result to
854 the 32-bit I/O port specified by Port. The value written to the I/O port is
855 returned. This function must guarantee that all I/O read and write operations
856 are serialized. Extra left bits in AndData are stripped.
858 If 32-bit I/O port operations are not supported, then ASSERT().
859 If StartBit is greater than 31, then ASSERT().
860 If EndBit is greater than 31, then ASSERT().
861 If EndBit is less than StartBit, then ASSERT().
862 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
864 @param[in] Port The I/O port to write.
865 @param[in] StartBit The ordinal of the least significant bit in the bit field.
867 @param[in] EndBit The ordinal of the most significant bit in the bit field.
869 @param[in] AndData The value to AND with the read value from the I/O port.
871 @return The value written back to the I/O port.
884 Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
885 bitwise OR, writes the result back to the bit field in the
886 32-bit port, and saves the value in the S3 script to be replayed on S3
889 Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
890 by a bitwise OR between the read result and the value specified by
891 AndData, and writes the result to the 32-bit I/O port specified by Port. The
892 value written to the I/O port is returned. This function must guarantee that
893 all I/O read and write operations are serialized. Extra left bits in both
894 AndData and OrData are stripped.
896 If 32-bit I/O port operations are not supported, then ASSERT().
897 If StartBit is greater than 31, then ASSERT().
898 If EndBit is greater than 31, then ASSERT().
899 If EndBit is less than StartBit, then ASSERT().
900 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
901 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
903 @param[in] Port The I/O port to write.
904 @param[in] StartBit The ordinal of the least significant bit in the bit field.
906 @param[in] EndBit The ordinal of the most significant bit in the bit field.
908 @param[in] AndData The value to AND with the read value from the I/O port.
909 @param[in] OrData The value to OR with the result of the AND operation.
911 @return The value written back to the I/O port.
916 S3IoBitFieldAndThenOr32 (
925 Reads a 64-bit I/O port, and saves the value in the S3 script to be replayed
928 Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
929 This function must guarantee that all I/O read and write operations are
932 If 64-bit I/O port operations are not supported, then ASSERT().
934 @param[in] Port The I/O port to read.
936 @return The value read.
946 Writes a 64-bit I/O port, and saves the value in the S3 script to be replayed
949 Writes the 64-bit I/O port specified by Port with the value specified by Value
950 and returns Value. This function must guarantee that all I/O read and write
951 operations are serialized.
953 If 64-bit I/O port operations are not supported, then ASSERT().
955 @param[in] Port The I/O port to write.
956 @param[in] Value The value to write to the I/O port.
958 @return The value written to the I/O port.
969 Reads a 64-bit I/O port, performs a bitwise OR, writes the
970 result back to the 64-bit I/O port, and saves the value in the S3 script to
971 be replayed on S3 resume.
973 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
974 between the read result and the value specified by OrData, and writes the
975 result to the 64-bit I/O port specified by Port. The value written to the I/O
976 port is returned. This function must guarantee that all I/O read and write
977 operations are serialized.
979 If 64-bit I/O port operations are not supported, then ASSERT().
981 @param[in] Port The I/O port to write.
982 @param[in] OrData The value to OR with the read value from the I/O port.
984 @return The value written back to the I/O port.
995 Reads a 64-bit I/O port, performs a bitwise AND, writes the result back
996 to the 64-bit I/O port, and saves the value in the S3 script to be replayed
999 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1000 the read result and the value specified by AndData, and writes the result to
1001 the 64-bit I/O port specified by Port. The value written to the I/O port is
1002 returned. This function must guarantee that all I/O read and write operations
1005 If 64-bit I/O port operations are not supported, then ASSERT().
1007 @param[in] Port The I/O port to write.
1008 @param[in] AndData The value to AND with the read value from the I/O port.
1010 @return The value written back to the I/O port.
1021 Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
1022 inclusive OR, writes the result back to the 64-bit I/O port, and saves
1023 the value in the S3 script to be replayed on S3 resume.
1025 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1026 the read result and the value specified by AndData, performs a bitwise OR
1027 between the result of the AND operation and the value specified by OrData,
1028 and writes the result to the 64-bit I/O port specified by Port. The value
1029 written to the I/O port is returned. This function must guarantee that all
1030 I/O read and write operations are serialized.
1032 If 64-bit I/O port operations are not supported, then ASSERT().
1034 @param[in] Port The I/O port to write.
1035 @param[in] AndData The value to AND with the read value from the I/O port.
1036 @param[in] OrData The value to OR with the result of the AND operation.
1038 @return The value written back to the I/O port.
1050 Reads a bit field of an I/O register, and saves the value in the S3 script to
1051 be replayed on S3 resume.
1053 Reads the bit field in a 64-bit I/O register. The bit field is specified by
1054 the StartBit and the EndBit. The value of the bit field is returned.
1056 If 64-bit I/O port operations are not supported, then ASSERT().
1057 If StartBit is greater than 63, then ASSERT().
1058 If EndBit is greater than 63, then ASSERT().
1059 If EndBit is less than StartBit, then ASSERT().
1061 @param[in] Port The I/O port to read.
1062 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1064 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1067 @return The value read.
1072 S3IoBitFieldRead64 (
1079 Writes a bit field to an I/O register, and saves the value in the S3 script to
1080 be replayed on S3 resume.
1082 Writes Value to the bit field of the I/O register. The bit field is specified
1083 by the StartBit and the EndBit. All other bits in the destination I/O
1084 register are preserved. The value written to the I/O port is returned. Extra
1085 left bits in Value are stripped.
1087 If 64-bit I/O port operations are not supported, then ASSERT().
1088 If StartBit is greater than 63, then ASSERT().
1089 If EndBit is greater than 63, then ASSERT().
1090 If EndBit is less than StartBit, then ASSERT().
1091 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1093 @param[in] Port The I/O port to write.
1094 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1096 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1098 @param[in] Value New value of the bit field.
1100 @return The value written back to the I/O port.
1105 S3IoBitFieldWrite64 (
1113 Reads a bit field in a 64-bit port, performs a bitwise OR, writes the
1114 result back to the bit field in the 64-bit port, and saves the value in the
1115 S3 script to be replayed on S3 resume.
1117 Reads the 64-bit I/O port specified by Port, performs a bitwise OR
1118 between the read result and the value specified by OrData, and writes the
1119 result to the 64-bit I/O port specified by Port. The value written to the I/O
1120 port is returned. This function must guarantee that all I/O read and write
1121 operations are serialized. Extra left bits in OrData are stripped.
1123 If 64-bit I/O port operations are not supported, then ASSERT().
1124 If StartBit is greater than 63, then ASSERT().
1125 If EndBit is greater than 63, then ASSERT().
1126 If EndBit is less than StartBit, then ASSERT().
1127 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1129 @param[in] Port The I/O port to write.
1130 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1132 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1134 @param[in] OrData The value to OR with the read value from the I/O port.
1136 @return The value written back to the I/O port.
1149 Reads a bit field in a 64-bit port, performs a bitwise AND, writes the
1150 result back to the bit field in the 64-bit port, and saves the value in the
1151 S3 script to be replayed on S3 resume.
1153 Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
1154 the read result and the value specified by AndData, and writes the result to
1155 the 64-bit I/O port specified by Port. The value written to the I/O port is
1156 returned. This function must guarantee that all I/O read and write operations
1157 are serialized. Extra left bits in AndData are stripped.
1159 If 64-bit I/O port operations are not supported, then ASSERT().
1160 If StartBit is greater than 63, then ASSERT().
1161 If EndBit is greater than 63, then ASSERT().
1162 If EndBit is less than StartBit, then ASSERT().
1163 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1165 @param[in] Port The I/O port to write.
1166 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1168 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1170 @param[in] AndData The value to AND with the read value from the I/O port.
1172 @return The value written back to the I/O port.
1185 Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
1186 bitwise OR, writes the result back to the bit field in the
1187 64-bit port, and saves the value in the S3 script to be replayed on S3
1190 Reads the 64-bit I/O port specified by Port, performs a bitwise AND followed
1191 by a bitwise OR between the read result and the value specified by
1192 AndData, and writes the result to the 64-bit I/O port specified by Port. The
1193 value written to the I/O port is returned. This function must guarantee that
1194 all I/O read and write operations are serialized. Extra left bits in both
1195 AndData and OrData are stripped.
1197 If 64-bit I/O port operations are not supported, then ASSERT().
1198 If StartBit is greater than 63, then ASSERT().
1199 If EndBit is greater than 63, then ASSERT().
1200 If EndBit is less than StartBit, then ASSERT().
1201 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1202 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1204 @param[in] Port The I/O port to write.
1205 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1207 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1209 @param[in] AndData The value to AND with the read value from the I/O port.
1210 @param[in] OrData The value to OR with the result of the AND operation.
1212 @return The value written back to the I/O port.
1217 S3IoBitFieldAndThenOr64 (
1226 Reads an 8-bit MMIO register, and saves the value in the S3 script to be
1227 replayed on S3 resume.
1229 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
1230 returned. This function must guarantee that all MMIO read and write
1231 operations are serialized.
1233 If 8-bit MMIO register operations are not supported, then ASSERT().
1235 @param[in] Address The MMIO register to read.
1237 @return The value read.
1247 Writes an 8-bit MMIO register, and saves the value in the S3 script to be
1248 replayed on S3 resume.
1250 Writes the 8-bit MMIO register specified by Address with the value specified
1251 by Value and returns Value. This function must guarantee that all MMIO read
1252 and write operations are serialized.
1254 If 8-bit MMIO register operations are not supported, then ASSERT().
1256 @param[in] Address The MMIO register to write.
1257 @param[in] Value The value to write to the MMIO register.
1259 @return The value written the MMIO register.
1270 Reads an 8-bit MMIO register, performs a bitwise OR, writes the
1271 result back to the 8-bit MMIO register, and saves the value in the S3 script
1272 to be replayed on S3 resume.
1274 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1275 inclusive OR between the read result and the value specified by OrData, and
1276 writes the result to the 8-bit MMIO register specified by Address. The value
1277 written to the MMIO register is returned. This function must guarantee that
1278 all MMIO read and write operations are serialized.
1280 If 8-bit MMIO register operations are not supported, then ASSERT().
1282 @param[in] Address The MMIO register to write.
1283 @param[in] OrData The value to OR with the read value from the MMIO register.
1285 @return The value written back to the MMIO register.
1296 Reads an 8-bit MMIO register, performs a bitwise AND, writes the result
1297 back to the 8-bit MMIO register, and saves the value in the S3 script to be
1298 replayed on S3 resume.
1300 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1301 between the read result and the value specified by AndData, and writes the
1302 result to the 8-bit MMIO register specified by Address. The value written to
1303 the MMIO register is returned. This function must guarantee that all MMIO
1304 read and write operations are serialized.
1306 If 8-bit MMIO register operations are not supported, then ASSERT().
1308 @param[in] Address The MMIO register to write.
1309 @param[in] AndData The value to AND with the read value from the MMIO register.
1311 @return The value written back to the MMIO register.
1322 Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
1323 inclusive OR, writes the result back to the 8-bit MMIO register, and saves
1324 the value in the S3 script to be replayed on S3 resume.
1326 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1327 between the read result and the value specified by AndData, performs a
1328 bitwise OR between the result of the AND operation and the value specified by
1329 OrData, and writes the result to the 8-bit MMIO register specified by
1330 Address. The value written to the MMIO register is returned. This function
1331 must guarantee that all MMIO read and write operations are serialized.
1333 If 8-bit MMIO register operations are not supported, then ASSERT().
1335 @param[in] Address The MMIO register to write.
1336 @param[in] AndData The value to AND with the read value from the MMIO register.
1337 @param[in] OrData The value to OR with the result of the AND operation.
1339 @return The value written back to the MMIO register.
1351 Reads a bit field of a MMIO register, and saves the value in the S3 script to
1352 be replayed on S3 resume.
1354 Reads the bit field in an 8-bit MMIO register. The bit field is specified by
1355 the StartBit and the EndBit. The value of the bit field is returned.
1357 If 8-bit MMIO register operations are not supported, then ASSERT().
1358 If StartBit is greater than 7, then ASSERT().
1359 If EndBit is greater than 7, then ASSERT().
1360 If EndBit is less than StartBit, then ASSERT().
1362 @param[in] Address MMIO register to read.
1363 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1365 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1368 @return The value read.
1373 S3MmioBitFieldRead8 (
1380 Writes a bit field to an MMIO register, and saves the value in the S3 script to
1381 be replayed on S3 resume.
1383 Writes Value to the bit field of the MMIO register. The bit field is
1384 specified by the StartBit and the EndBit. All other bits in the destination
1385 MMIO register are preserved. The new value of the 8-bit register is returned.
1387 If 8-bit MMIO register operations are not supported, then ASSERT().
1388 If StartBit is greater than 7, then ASSERT().
1389 If EndBit is greater than 7, then ASSERT().
1390 If EndBit is less than StartBit, then ASSERT().
1391 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1393 @param[in] Address The MMIO register to write.
1394 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1396 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1398 @param[in] Value New value of the bit field.
1400 @return The value written back to the MMIO register.
1405 S3MmioBitFieldWrite8 (
1413 Reads a bit field in an 8-bit MMIO register, performs a bitwise OR,
1414 writes the result back to the bit field in the 8-bit MMIO register, and saves
1415 the value in the S3 script to be replayed on S3 resume.
1417 Reads the 8-bit MMIO register specified by Address, performs a bitwise
1418 inclusive OR between the read result and the value specified by OrData, and
1419 writes the result to the 8-bit MMIO register specified by Address. The value
1420 written to the MMIO register is returned. This function must guarantee that
1421 all MMIO read and write operations are serialized. Extra left bits in OrData
1424 If 8-bit MMIO register operations are not supported, then ASSERT().
1425 If StartBit is greater than 7, then ASSERT().
1426 If EndBit is greater than 7, then ASSERT().
1427 If EndBit is less than StartBit, then ASSERT().
1428 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1430 @param[in] Address The MMIO register to write.
1431 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1433 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1435 @param[in] OrData The value to OR with the read value from the MMIO register.
1437 @return The value written back to the MMIO register.
1450 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND, and
1451 writes the result back to the bit field in the 8-bit MMIO register, and saves
1452 the value in the S3 script to be replayed on S3 resume.
1454 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1455 between the read result and the value specified by AndData, and writes the
1456 result to the 8-bit MMIO register specified by Address. The value written to
1457 the MMIO register is returned. This function must guarantee that all MMIO
1458 read and write operations are serialized. Extra left bits in AndData are
1461 If 8-bit MMIO register operations are not supported, then ASSERT().
1462 If StartBit is greater than 7, then ASSERT().
1463 If EndBit is greater than 7, then ASSERT().
1464 If EndBit is less than StartBit, then ASSERT().
1465 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1467 @param[in] Address The MMIO register to write.
1468 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1470 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1472 @param[in] AndData The value to AND with the read value from the MMIO register.
1474 @return The value written back to the MMIO register.
1479 S3MmioBitFieldAnd8 (
1487 Reads a bit field in an 8-bit MMIO register, performs a bitwise AND followed
1488 by a bitwise OR, writes the result back to the bit field in the
1489 8-bit MMIO register, and saves the value in the S3 script to be replayed
1492 Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
1493 followed by a bitwise OR between the read result and the value
1494 specified by AndData, and writes the result to the 8-bit MMIO register
1495 specified by Address. The value written to the MMIO register is returned.
1496 This function must guarantee that all MMIO read and write operations are
1497 serialized. Extra left bits in both AndData and OrData are stripped.
1499 If 8-bit MMIO register operations are not supported, then ASSERT().
1500 If StartBit is greater than 7, then ASSERT().
1501 If EndBit is greater than 7, then ASSERT().
1502 If EndBit is less than StartBit, then ASSERT().
1503 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1504 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1506 @param[in] Address The MMIO register to write.
1507 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1509 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1511 @param[in] AndData The value to AND with the read value from the MMIO register.
1512 @param[in] OrData The value to OR with the result of the AND operation.
1514 @return The value written back to the MMIO register.
1519 S3MmioBitFieldAndThenOr8 (
1528 Reads a 16-bit MMIO register, and saves the value in the S3 script to be replayed
1531 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
1532 returned. This function must guarantee that all MMIO read and write
1533 operations are serialized.
1535 If 16-bit MMIO register operations are not supported, then ASSERT().
1537 @param[in] Address The MMIO register to read.
1539 @return The value read.
1549 Writes a 16-bit MMIO register, and saves the value in the S3 script to be replayed
1552 Writes the 16-bit MMIO register specified by Address with the value specified
1553 by Value and returns Value. This function must guarantee that all MMIO read
1554 and write operations are serialized, and saves the value in the S3 script to be
1555 replayed on S3 resume.
1557 If 16-bit MMIO register operations are not supported, then ASSERT().
1559 @param[in] Address The MMIO register to write.
1560 @param[in] Value The value to write to the MMIO register.
1562 @return The value written the MMIO register.
1573 Reads a 16-bit MMIO register, performs a bitwise OR, writes the
1574 result back to the 16-bit MMIO register, and saves the value in the S3 script
1575 to be replayed on S3 resume.
1577 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1578 inclusive OR between the read result and the value specified by OrData, and
1579 writes the result to the 16-bit MMIO register specified by Address. The value
1580 written to the MMIO register is returned. This function must guarantee that
1581 all MMIO read and write operations are serialized.
1583 If 16-bit MMIO register operations are not supported, then ASSERT().
1585 @param[in] Address The MMIO register to write.
1586 @param[in] OrData The value to OR with the read value from the MMIO register.
1588 @return The value written back to the MMIO register.
1599 Reads a 16-bit MMIO register, performs a bitwise AND, writes the result
1600 back to the 16-bit MMIO register, and saves the value in the S3 script to be
1601 replayed on S3 resume.
1603 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1604 between the read result and the value specified by AndData, and writes the
1605 result to the 16-bit MMIO register specified by Address. The value written to
1606 the MMIO register is returned. This function must guarantee that all MMIO
1607 read and write operations are serialized.
1609 If 16-bit MMIO register operations are not supported, then ASSERT().
1611 @param[in] Address The MMIO register to write.
1612 @param[in] AndData The value to AND with the read value from the MMIO register.
1614 @return The value written back to the MMIO register.
1625 Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
1626 inclusive OR, writes the result back to the 16-bit MMIO register, and
1627 saves the value in the S3 script to be replayed on S3 resume.
1629 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1630 between the read result and the value specified by AndData, performs a
1631 bitwise OR between the result of the AND operation and the value specified by
1632 OrData, and writes the result to the 16-bit MMIO register specified by
1633 Address. The value written to the MMIO register is returned. This function
1634 must guarantee that all MMIO read and write operations are serialized.
1636 If 16-bit MMIO register operations are not supported, then ASSERT().
1638 @param[in] Address The MMIO register to write.
1639 @param[in] AndData The value to AND with the read value from the MMIO register.
1640 @param[in] OrData The value to OR with the result of the AND operation.
1642 @return The value written back to the MMIO register.
1654 Reads a bit field of a MMIO register, and saves the value in the S3 script to
1655 be replayed on S3 resume.
1657 Reads the bit field in a 16-bit MMIO register. The bit field is specified by
1658 the StartBit and the EndBit. The value of the bit field is returned.
1660 If 16-bit MMIO register operations are not supported, then ASSERT().
1661 If StartBit is greater than 15, then ASSERT().
1662 If EndBit is greater than 15, then ASSERT().
1663 If EndBit is less than StartBit, then ASSERT().
1665 @param[in] Address MMIO register to read.
1666 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1668 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1671 @return The value read.
1676 S3MmioBitFieldRead16 (
1683 Writes a bit field to a MMIO register, and saves the value in the S3 script to
1684 be replayed on S3 resume.
1686 Writes Value to the bit field of the MMIO register. The bit field is
1687 specified by the StartBit and the EndBit. All other bits in the destination
1688 MMIO register are preserved. The new value of the 16-bit register is returned.
1690 If 16-bit MMIO register operations are not supported, then ASSERT().
1691 If StartBit is greater than 15, then ASSERT().
1692 If EndBit is greater than 15, then ASSERT().
1693 If EndBit is less than StartBit, then ASSERT().
1694 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1696 @param[in] Address The MMIO register to write.
1697 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1699 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1701 @param[in] Value New value of the bit field.
1703 @return The value written back to the MMIO register.
1708 S3MmioBitFieldWrite16 (
1716 Reads a bit field in a 16-bit MMIO register, performs a bitwise OR,
1717 writes the result back to the bit field in the 16-bit MMIO register, and
1718 saves the value in the S3 script to be replayed on S3 resume.
1720 Reads the 16-bit MMIO register specified by Address, performs a bitwise
1721 inclusive OR between the read result and the value specified by OrData, and
1722 writes the result to the 16-bit MMIO register specified by Address. The value
1723 written to the MMIO register is returned. This function must guarantee that
1724 all MMIO read and write operations are serialized. Extra left bits in OrData
1727 If 16-bit MMIO register operations are not supported, then ASSERT().
1728 If StartBit is greater than 15, then ASSERT().
1729 If EndBit is greater than 15, then ASSERT().
1730 If EndBit is less than StartBit, then ASSERT().
1731 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1733 @param[in] Address The MMIO register to write.
1734 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1736 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1738 @param[in] OrData The value to OR with the read value from the MMIO register.
1740 @return The value written back to the MMIO register.
1745 S3MmioBitFieldOr16 (
1753 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
1754 writes the result back to the bit field in the 16-bit MMIO register and
1755 saves the value in the S3 script to be replayed on S3 resume.
1757 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1758 between the read result and the value specified by AndData, and writes the
1759 result to the 16-bit MMIO register specified by Address. The value written to
1760 the MMIO register is returned. This function must guarantee that all MMIO
1761 read and write operations are serialized. Extra left bits in AndData are
1764 If 16-bit MMIO register operations are not supported, then ASSERT().
1765 If StartBit is greater than 15, then ASSERT().
1766 If EndBit is greater than 15, then ASSERT().
1767 If EndBit is less than StartBit, then ASSERT().
1768 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1770 @param[in] Address The MMIO register to write.
1771 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1773 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1775 @param[in] AndData The value to AND with the read value from the MMIO register.
1777 @return The value written back to the MMIO register.
1782 S3MmioBitFieldAnd16 (
1790 Reads a bit field in a 16-bit MMIO register, performs a bitwise AND followed
1791 by a bitwise OR, writes the result back to the bit field in the
1792 16-bit MMIO register, and saves the value in the S3 script to be replayed
1795 Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
1796 followed by a bitwise OR between the read result and the value
1797 specified by AndData, and writes the result to the 16-bit MMIO register
1798 specified by Address. The value written to the MMIO register is returned.
1799 This function must guarantee that all MMIO read and write operations are
1800 serialized. Extra left bits in both AndData and OrData are stripped.
1802 If 16-bit MMIO register operations are not supported, then ASSERT().
1803 If StartBit is greater than 15, then ASSERT().
1804 If EndBit is greater than 15, then ASSERT().
1805 If EndBit is less than StartBit, then ASSERT().
1806 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1807 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1809 @param[in] Address The MMIO register to write.
1810 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1812 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1814 @param[in] AndData The value to AND with the read value from the MMIO register.
1815 @param[in] OrData The value to OR with the result of the AND operation.
1817 @return The value written back to the MMIO register.
1822 S3MmioBitFieldAndThenOr16 (
1831 Reads a 32-bit MMIO register saves the value in the S3 script to be
1832 replayed on S3 resume.
1834 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
1835 returned. This function must guarantee that all MMIO read and write
1836 operations are serialized.
1838 If 32-bit MMIO register operations are not supported, then ASSERT().
1840 @param[in] Address The MMIO register to read.
1842 @return The value read.
1852 Writes a 32-bit MMIO register, and saves the value in the S3 script to be
1853 replayed on S3 resume.
1855 Writes the 32-bit MMIO register specified by Address with the value specified
1856 by Value and returns Value. This function must guarantee that all MMIO read
1857 and write operations are serialized.
1859 If 32-bit MMIO register operations are not supported, then ASSERT().
1861 @param[in] Address The MMIO register to write.
1862 @param[in] Value The value to write to the MMIO register.
1864 @return The value written the MMIO register.
1875 Reads a 32-bit MMIO register, performs a bitwise OR, writes the
1876 result back to the 32-bit MMIO register, and saves the value in the S3 script
1877 to be replayed on S3 resume.
1879 Reads the 32-bit MMIO register specified by Address, performs a bitwise
1880 inclusive OR between the read result and the value specified by OrData, and
1881 writes the result to the 32-bit MMIO register specified by Address. The value
1882 written to the MMIO register is returned. This function must guarantee that
1883 all MMIO read and write operations are serialized.
1885 If 32-bit MMIO register operations are not supported, then ASSERT().
1887 @param[in] Address The MMIO register to write.
1888 @param[in] OrData The value to OR with the read value from the MMIO register.
1890 @return The value written back to the MMIO register.
1901 Reads a 32-bit MMIO register, performs a bitwise AND, writes the result
1902 back to the 32-bit MMIO register, and saves the value in the S3 script to be
1903 replayed on S3 resume.
1905 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1906 between the read result and the value specified by AndData, and writes the
1907 result to the 32-bit MMIO register specified by Address. The value written to
1908 the MMIO register is returned. This function must guarantee that all MMIO
1909 read and write operations are serialized.
1911 If 32-bit MMIO register operations are not supported, then ASSERT().
1913 @param[in] Address The MMIO register to write.
1914 @param[in] AndData The value to AND with the read value from the MMIO register.
1916 @return The value written back to the MMIO register.
1927 Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
1928 inclusive OR, writes the result back to the 32-bit MMIO register, and
1929 saves the value in the S3 script to be replayed on S3 resume.
1931 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
1932 between the read result and the value specified by AndData, performs a
1933 bitwise OR between the result of the AND operation and the value specified by
1934 OrData, and writes the result to the 32-bit MMIO register specified by
1935 Address. The value written to the MMIO register is returned. This function
1936 must guarantee that all MMIO read and write operations are serialized.
1938 If 32-bit MMIO register operations are not supported, then ASSERT().
1940 @param[in] Address The MMIO register to write.
1941 @param[in] AndData The value to AND with the read value from the MMIO register.
1942 @param[in] OrData The value to OR with the result of the AND operation.
1944 @return The value written back to the MMIO register.
1956 Reads a bit field of a MMIO register, and saves the value in the S3 script
1957 to be replayed on S3 resume.
1959 Reads the bit field in a 32-bit MMIO register. The bit field is specified by
1960 the StartBit and the EndBit. The value of the bit field is returned.
1962 If 32-bit MMIO register operations are not supported, then ASSERT().
1963 If StartBit is greater than 31, then ASSERT().
1964 If EndBit is greater than 31, then ASSERT().
1965 If EndBit is less than StartBit, then ASSERT().
1967 @param[in] Address MMIO register to read.
1968 @param[in] StartBit The ordinal of the least significant bit in the bit field.
1970 @param[in] EndBit The ordinal of the most significant bit in the bit field.
1973 @return The value read.
1978 S3MmioBitFieldRead32 (
1985 Writes a bit field to a MMIO register, and saves the value in the S3 script
1986 to be replayed on S3 resume.
1988 Writes Value to the bit field of the MMIO register. The bit field is
1989 specified by the StartBit and the EndBit. All other bits in the destination
1990 MMIO register are preserved. The new value of the 32-bit register is returned.
1992 If 32-bit MMIO register operations are not supported, then ASSERT().
1993 If StartBit is greater than 31, then ASSERT().
1994 If EndBit is greater than 31, then ASSERT().
1995 If EndBit is less than StartBit, then ASSERT().
1996 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
1998 @param[in] Address The MMIO register to write.
1999 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2001 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2003 @param[in] Value New value of the bit field.
2005 @return The value written back to the MMIO register.
2010 S3MmioBitFieldWrite32 (
2018 Reads a bit field in a 32-bit MMIO register, performs a bitwise OR,
2019 writes the result back to the bit field in the 32-bit MMIO register, and
2020 saves the value in the S3 script to be replayed on S3 resume.
2022 Reads the 32-bit MMIO register specified by Address, performs a bitwise
2023 inclusive OR between the read result and the value specified by OrData, and
2024 writes the result to the 32-bit MMIO register specified by Address. The value
2025 written to the MMIO register is returned. This function must guarantee that
2026 all MMIO read and write operations are serialized. Extra left bits in OrData
2029 If 32-bit MMIO register operations are not supported, then ASSERT().
2030 If StartBit is greater than 31, then ASSERT().
2031 If EndBit is greater than 31, then ASSERT().
2032 If EndBit is less than StartBit, then ASSERT().
2033 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2035 @param[in] Address The MMIO register to write.
2036 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2038 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2040 @param[in] OrData The value to OR with the read value from the MMIO register.
2042 @return The value written back to the MMIO register.
2047 S3MmioBitFieldOr32 (
2055 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
2056 writes the result back to the bit field in the 32-bit MMIO register and
2057 saves the value in the S3 script to be replayed on S3 resume.
2059 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2060 between the read result and the value specified by AndData, and writes the
2061 result to the 32-bit MMIO register specified by Address. The value written to
2062 the MMIO register is returned. This function must guarantee that all MMIO
2063 read and write operations are serialized. Extra left bits in AndData are
2066 If 32-bit MMIO register operations are not supported, then ASSERT().
2067 If StartBit is greater than 31, then ASSERT().
2068 If EndBit is greater than 31, then ASSERT().
2069 If EndBit is less than StartBit, then ASSERT().
2070 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2072 @param[in] Address The MMIO register to write.
2073 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2075 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2077 @param[in] AndData The value to AND with the read value from the MMIO register.
2079 @return The value written back to the MMIO register.
2084 S3MmioBitFieldAnd32 (
2092 Reads a bit field in a 32-bit MMIO register, performs a bitwise AND followed
2093 by a bitwise OR, writes the result back to the bit field in the
2094 32-bit MMIO register, and saves the value in the S3 script to be replayed
2097 Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
2098 followed by a bitwise OR between the read result and the value
2099 specified by AndData, and writes the result to the 32-bit MMIO register
2100 specified by Address. The value written to the MMIO register is returned.
2101 This function must guarantee that all MMIO read and write operations are
2102 serialized. Extra left bits in both AndData and OrData are stripped.
2104 If 32-bit MMIO register operations are not supported, then ASSERT().
2105 If StartBit is greater than 31, then ASSERT().
2106 If EndBit is greater than 31, then ASSERT().
2107 If EndBit is less than StartBit, then ASSERT().
2108 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2109 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2111 @param[in] Address The MMIO register to write.
2112 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2114 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2116 @param[in] AndData The value to AND with the read value from the MMIO register.
2117 @param[in] OrData The value to OR with the result of the AND operation.
2119 @return The value written back to the MMIO register.
2124 S3MmioBitFieldAndThenOr32 (
2133 Reads a 64-bit MMIO register, and saves the value in the S3 script to be
2134 replayed on S3 resume.
2136 Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
2137 returned. This function must guarantee that all MMIO read and write
2138 operations are serialized.
2140 If 64-bit MMIO register operations are not supported, then ASSERT().
2142 @param[in] Address The MMIO register to read.
2144 @return The value read.
2154 Writes a 64-bit MMIO register, and saves the value in the S3 script to be
2155 replayed on S3 resume.
2157 Writes the 64-bit MMIO register specified by Address with the value specified
2158 by Value and returns Value. This function must guarantee that all MMIO read
2159 and write operations are serialized.
2161 If 64-bit MMIO register operations are not supported, then ASSERT().
2163 @param[in] Address The MMIO register to write.
2164 @param[in] Value The value to write to the MMIO register.
2166 @return The value written the MMIO register.
2177 Reads a 64-bit MMIO register, performs a bitwise OR, writes the
2178 result back to the 64-bit MMIO register, and saves the value in the S3 script
2179 to be replayed on S3 resume.
2181 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2182 inclusive OR between the read result and the value specified by OrData, and
2183 writes the result to the 64-bit MMIO register specified by Address. The value
2184 written to the MMIO register is returned. This function must guarantee that
2185 all MMIO read and write operations are serialized.
2187 If 64-bit MMIO register operations are not supported, then ASSERT().
2189 @param[in] Address The MMIO register to write.
2190 @param[in] OrData The value to OR with the read value from the MMIO register.
2192 @return The value written back to the MMIO register.
2203 Reads a 64-bit MMIO register, performs a bitwise AND, writes the result
2204 back to the 64-bit MMIO register, and saves the value in the S3 script to be
2205 replayed on S3 resume.
2207 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2208 between the read result and the value specified by AndData, and writes the
2209 result to the 64-bit MMIO register specified by Address. The value written to
2210 the MMIO register is returned. This function must guarantee that all MMIO
2211 read and write operations are serialized.
2213 If 64-bit MMIO register operations are not supported, then ASSERT().
2215 @param[in] Address The MMIO register to write.
2216 @param[in] AndData The value to AND with the read value from the MMIO register.
2218 @return The value written back to the MMIO register.
2229 Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
2230 inclusive OR, writes the result back to the 64-bit MMIO register, and
2231 saves the value in the S3 script to be replayed on S3 resume.
2233 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2234 between the read result and the value specified by AndData, performs a
2235 bitwise OR between the result of the AND operation and the value specified by
2236 OrData, and writes the result to the 64-bit MMIO register specified by
2237 Address. The value written to the MMIO register is returned. This function
2238 must guarantee that all MMIO read and write operations are serialized.
2240 If 64-bit MMIO register operations are not supported, then ASSERT().
2242 @param[in] Address The MMIO register to write.
2243 @param[in] AndData The value to AND with the read value from the MMIO register.
2244 @param[in] OrData The value to OR with the result of the AND operation.
2246 @return The value written back to the MMIO register.
2258 Reads a bit field of a MMIO register saves the value in the S3 script to
2259 be replayed on S3 resume.
2261 Reads the bit field in a 64-bit MMIO register. The bit field is specified by
2262 the StartBit and the EndBit. The value of the bit field is returned.
2264 If 64-bit MMIO register operations are not supported, then ASSERT().
2265 If StartBit is greater than 63, then ASSERT().
2266 If EndBit is greater than 63, then ASSERT().
2267 If EndBit is less than StartBit, then ASSERT().
2269 @param[in] Address MMIO register to read.
2270 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2272 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2275 @return The value read.
2280 S3MmioBitFieldRead64 (
2287 Writes a bit field to a MMIO register, and saves the value in the S3 script to
2288 be replayed on S3 resume.
2290 Writes Value to the bit field of the MMIO register. The bit field is
2291 specified by the StartBit and the EndBit. All other bits in the destination
2292 MMIO register are preserved. The new value of the 64-bit register is returned.
2294 If 64-bit MMIO register operations are not supported, then ASSERT().
2295 If StartBit is greater than 63, then ASSERT().
2296 If EndBit is greater than 63, then ASSERT().
2297 If EndBit is less than StartBit, then ASSERT().
2298 If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2300 @param[in] Address The MMIO register to write.
2301 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2303 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2305 @param[in] Value New value of the bit field.
2307 @return The value written back to the MMIO register.
2312 S3MmioBitFieldWrite64 (
2320 Reads a bit field in a 64-bit MMIO register, performs a bitwise OR,
2321 writes the result back to the bit field in the 64-bit MMIO register, and
2322 saves the value in the S3 script to be replayed on S3 resume.
2324 Reads the 64-bit MMIO register specified by Address, performs a bitwise
2325 inclusive 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. Extra left bits in OrData
2331 If 64-bit MMIO register operations are not supported, then ASSERT().
2332 If StartBit is greater than 63, then ASSERT().
2333 If EndBit is greater than 63, then ASSERT().
2334 If EndBit is less than StartBit, then ASSERT().
2335 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2337 @param[in] Address The MMIO register to write.
2338 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2340 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2342 @param[in] OrData The value to OR with the read value from the MMIO register.
2344 @return The value written back to the MMIO register.
2349 S3MmioBitFieldOr64 (
2357 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND, and
2358 writes the result back to the bit field in the 64-bit MMIO register, and saves
2359 the value in the S3 script to be replayed on S3 resume.
2361 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2362 between the read result and the value specified by AndData, and writes the
2363 result to the 64-bit MMIO register specified by Address. The value written to
2364 the MMIO register is returned. This function must guarantee that all MMIO
2365 read and write operations are serialized. Extra left bits in AndData are
2368 If 64-bit MMIO register operations are not supported, then ASSERT().
2369 If StartBit is greater than 63, then ASSERT().
2370 If EndBit is greater than 63, then ASSERT().
2371 If EndBit is less than StartBit, then ASSERT().
2372 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2374 @param[in] Address The MMIO register to write.
2375 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2377 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2379 @param[in] AndData The value to AND with the read value from the MMIO register.
2381 @return The value written back to the MMIO register.
2386 S3MmioBitFieldAnd64 (
2394 Reads a bit field in a 64-bit MMIO register, performs a bitwise AND followed
2395 by a bitwise OR, writes the result back to the bit field in the
2396 64-bit MMIO register, and saves the value in the S3 script to be replayed
2399 Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
2400 followed by a bitwise OR between the read result and the value
2401 specified by AndData, and writes the result to the 64-bit MMIO register
2402 specified by Address. The value written to the MMIO register is returned.
2403 This function must guarantee that all MMIO read and write operations are
2404 serialized. Extra left bits in both AndData and OrData are stripped.
2406 If 64-bit MMIO register operations are not supported, then ASSERT().
2407 If StartBit is greater than 63, then ASSERT().
2408 If EndBit is greater than 63, then ASSERT().
2409 If EndBit is less than StartBit, then ASSERT().
2410 If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2411 If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
2413 @param[in] Address The MMIO register to write.
2414 @param[in] StartBit The ordinal of the least significant bit in the bit field.
2416 @param[in] EndBit The ordinal of the most significant bit in the bit field.
2418 @param[in] AndData The value to AND with the read value from the MMIO register.
2419 @param[in] OrData The value to OR with the result of the AND operation.
2421 @return The value written back to the MMIO register.
2426 S3MmioBitFieldAndThenOr64 (
2435 Copies data from MMIO region to system memory by using 8-bit access,
2436 and saves the value in the S3 script to be replayed on S3 resume.
2438 Copy data from MMIO region specified by starting address StartAddress
2439 to system memory specified by Buffer by using 8-bit access. The total
2440 number of bytes to be copied is specified by Length. Buffer is returned.
2442 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2443 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2446 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2447 @param[in] Length Size in bytes of the copy.
2448 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2456 IN UINTN StartAddress
,
2462 Copies data from MMIO region to system memory by using 16-bit access,
2463 and saves the value in the S3 script to be replayed on S3 resume.
2465 Copy data from MMIO region specified by starting address StartAddress
2466 to system memory specified by Buffer by using 16-bit access. The total
2467 number of bytes to be copied is specified by Length. Buffer is returned.
2469 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2471 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2472 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2474 If Length is not aligned on a 16-bit boundary, then ASSERT().
2475 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2477 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2478 @param[in] Length Size in bytes of the copy.
2479 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2486 S3MmioReadBuffer16 (
2487 IN UINTN StartAddress
,
2493 Copies data from MMIO region to system memory by using 32-bit access,
2494 and saves the value in the S3 script to be replayed on S3 resume.
2496 Copy data from MMIO region specified by starting address StartAddress
2497 to system memory specified by Buffer by using 32-bit access. The total
2498 number of byte to be copied is specified by Length. Buffer is returned.
2500 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2502 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2503 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2505 If Length is not aligned on a 32-bit boundary, then ASSERT().
2506 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2508 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2509 @param[in] Length Size in bytes of the copy.
2510 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2517 S3MmioReadBuffer32 (
2518 IN UINTN StartAddress
,
2524 Copies data from MMIO region to system memory by using 64-bit access,
2525 and saves the value in the S3 script to be replayed on S3 resume.
2527 Copy data from MMIO region specified by starting address StartAddress
2528 to system memory specified by Buffer by using 64-bit access. The total
2529 number of byte to be copied is specified by Length. Buffer is returned.
2531 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2533 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2534 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
2536 If Length is not aligned on a 64-bit boundary, then ASSERT().
2537 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2539 @param[in] StartAddress Starting address for the MMIO region to be copied from.
2540 @param[in] Length Size in bytes of the copy.
2541 @param[out] Buffer Pointer to a system memory buffer receiving the data read.
2548 S3MmioReadBuffer64 (
2549 IN UINTN StartAddress
,
2555 Copies data from system memory to MMIO region by using 8-bit access,
2556 and saves the value in the S3 script to be replayed on S3 resume.
2558 Copy data from system memory specified by Buffer to MMIO region specified
2559 by starting address StartAddress by using 8-bit access. The total number
2560 of byte to be copied is specified by Length. Buffer is returned.
2562 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2563 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2566 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2567 @param[in] Length Size in bytes of the copy.
2568 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2575 S3MmioWriteBuffer8 (
2576 IN UINTN StartAddress
,
2578 IN CONST UINT8
*Buffer
2582 Copies data from system memory to MMIO region by using 16-bit access,
2583 and saves the value in the S3 script to be replayed on S3 resume.
2585 Copy data from system memory specified by Buffer to MMIO region specified
2586 by starting address StartAddress by using 16-bit access. The total number
2587 of bytes to be copied is specified by Length. Buffer is returned.
2589 If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
2591 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2592 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2594 If Length is not aligned on a 16-bit boundary, then ASSERT().
2596 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
2598 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2599 @param[in] Length Size in bytes of the copy.
2600 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2607 S3MmioWriteBuffer16 (
2608 IN UINTN StartAddress
,
2610 IN CONST UINT16
*Buffer
2614 Copies data from system memory to MMIO region by using 32-bit access,
2615 and saves the value in the S3 script to be replayed on S3 resume.
2617 Copy data from system memory specified by Buffer to MMIO region specified
2618 by starting address StartAddress by using 32-bit access. The total number
2619 of bytes to be copied is specified by Length. Buffer is returned.
2621 If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
2623 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2624 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2626 If Length is not aligned on a 32-bit boundary, then ASSERT().
2628 If Buffer is not aligned on a 32-bit boundary, then ASSERT().
2630 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2631 @param[in] Length Size in bytes of the copy.
2632 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2639 S3MmioWriteBuffer32 (
2640 IN UINTN StartAddress
,
2642 IN CONST UINT32
*Buffer
2646 Copies data from system memory to MMIO region by using 64-bit access,
2647 and saves the value in the S3 script to be replayed on S3 resume.
2649 Copy data from system memory specified by Buffer to MMIO region specified
2650 by starting address StartAddress by using 64-bit access. The total number
2651 of bytes to be copied is specified by Length. Buffer is returned.
2653 If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
2655 If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
2656 If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
2658 If Length is not aligned on a 64-bit boundary, then ASSERT().
2660 If Buffer is not aligned on a 64-bit boundary, then ASSERT().
2662 @param[in] StartAddress Starting address for the MMIO region to be copied to.
2663 @param[in] Length Size in bytes of the copy.
2664 @param[in] Buffer Pointer to a system memory buffer containing the data to write.
2671 S3MmioWriteBuffer64 (
2672 IN UINTN StartAddress
,
2674 IN CONST UINT64
*Buffer