TianoCore EDK2 master
Loading...
Searching...
No Matches
S3SaveState.c
Go to the documentation of this file.
1
10
12EFI_S3_SAVE_STATE_PROTOCOL mS3SaveState = {
17};
18
31 IN VA_LIST Marker
32 )
33{
35 UINT64 Address;
36 UINTN Count;
37 UINT8 *Buffer;
38
39 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
40 Address = VA_ARG (Marker, UINT64);
41 Count = VA_ARG (Marker, UINTN);
42 Buffer = VA_ARG (Marker, UINT8 *);
43
44 return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer);
45}
46
59 IN VA_LIST Marker
60 )
61{
63 UINT64 Address;
64 UINT8 *Data;
65 UINT8 *DataMask;
66
67 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
68 Address = VA_ARG (Marker, UINT64);
69 Data = VA_ARG (Marker, UINT8 *);
70 DataMask = VA_ARG (Marker, UINT8 *);
71
72 return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask);
73}
74
87 IN VA_LIST Marker
88 )
89{
91 UINT64 Address;
92 UINTN Count;
93 UINT8 *Buffer;
94
95 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
96 Address = VA_ARG (Marker, UINT64);
97 Count = VA_ARG (Marker, UINTN);
98 Buffer = VA_ARG (Marker, UINT8 *);
99
100 return S3BootScriptSaveMemWrite (Width, Address, Count, Buffer);
101}
102
115 IN VA_LIST Marker
116 )
117{
119 UINT64 Address;
120 UINT8 *Data;
121 UINT8 *DataMask;
122
123 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
124 Address = VA_ARG (Marker, UINT64);
125 Data = VA_ARG (Marker, UINT8 *);
126 DataMask = VA_ARG (Marker, UINT8 *);
127
128 return S3BootScriptSaveMemReadWrite (Width, Address, Data, DataMask);
129}
130
143 IN VA_LIST Marker
144 )
145{
147 UINT64 Address;
148 UINTN Count;
149 UINT8 *Buffer;
150
151 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
152 Address = VA_ARG (Marker, UINT64);
153 Count = VA_ARG (Marker, UINTN);
154 Buffer = VA_ARG (Marker, UINT8 *);
155
156 return S3BootScriptSavePciCfgWrite (Width, Address, Count, Buffer);
157}
158
171 IN VA_LIST Marker
172 )
173{
175 UINT64 Address;
176 UINT8 *Data;
177 UINT8 *DataMask;
178
179 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
180 Address = VA_ARG (Marker, UINT64);
181 Data = VA_ARG (Marker, UINT8 *);
182 DataMask = VA_ARG (Marker, UINT8 *);
183
184 return S3BootScriptSavePciCfgReadWrite (Width, Address, Data, DataMask);
185}
186
199 IN VA_LIST Marker
200 )
201{
203 UINT64 Address;
204 UINTN Count;
205 UINT8 *Buffer;
206 UINT16 Segment;
207
208 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
209 Segment = VA_ARG (Marker, UINT16);
210 Address = VA_ARG (Marker, UINT64);
211 Count = VA_ARG (Marker, UINTN);
212 Buffer = VA_ARG (Marker, UINT8 *);
213
214 return S3BootScriptSavePciCfg2Write (Width, Segment, Address, Count, Buffer);
215}
216
229 IN VA_LIST Marker
230 )
231{
233 UINT16 Segment;
234 UINT64 Address;
235 UINT8 *Data;
236 UINT8 *DataMask;
237
238 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
239 Segment = VA_ARG (Marker, UINT16);
240 Address = VA_ARG (Marker, UINT64);
241 Data = VA_ARG (Marker, UINT8 *);
242 DataMask = VA_ARG (Marker, UINT8 *);
243
244 return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, DataMask);
245}
246
259 IN VA_LIST Marker
260 )
261{
262 EFI_SMBUS_DEVICE_ADDRESS SlaveAddress;
264 EFI_SMBUS_OPERATION Operation;
265 BOOLEAN PecCheck;
266 VOID *Buffer;
267 UINTN *DataSize;
268 UINTN SmBusAddress;
269
270 SlaveAddress.SmbusDeviceAddress = VA_ARG (Marker, UINTN);
271 Command = VA_ARG (Marker, EFI_SMBUS_DEVICE_COMMAND);
272 Operation = VA_ARG (Marker, EFI_SMBUS_OPERATION);
273 PecCheck = VA_ARG (Marker, BOOLEAN);
274 SmBusAddress = SMBUS_LIB_ADDRESS (SlaveAddress.SmbusDeviceAddress, Command, 0, PecCheck);
275 DataSize = VA_ARG (Marker, UINTN *);
276 Buffer = VA_ARG (Marker, VOID *);
277
278 return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, Buffer);
279}
280
293 IN VA_LIST Marker
294 )
295{
296 UINT32 Duration;
297
298 Duration = VA_ARG (Marker, UINT32);
299
300 return S3BootScriptSaveStall (Duration);
301}
302
316 IN VA_LIST Marker
317 )
318{
319 VOID *EntryPoint;
320
321 EntryPoint = (VOID *)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
322 return S3BootScriptSaveDispatch (EntryPoint);
323}
324
337 IN VA_LIST Marker
338 )
339{
341 UINT64 Address;
342 VOID *Data;
343 VOID *DataMask;
344 UINT64 Delay;
345 UINT64 LoopTimes;
346 UINT32 Remainder;
347
348 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
349 Address = VA_ARG (Marker, UINT64);
350 Data = VA_ARG (Marker, VOID *);
351 DataMask = VA_ARG (Marker, VOID *);
352 Delay = VA_ARG (Marker, UINT64);
353 //
354 // According to the spec, the interval between 2 polls is 100ns,
355 // but the unit of Duration for S3BootScriptSaveMemPoll() is microsecond(1000ns).
356 // Duration * 1000ns * LoopTimes = Delay * 100ns
357 // Duration will be minimum 1(microsecond) to be minimum deviation,
358 // so LoopTimes = Delay / 10.
359 //
360 LoopTimes = DivU64x32Remainder (
361 Delay,
362 10,
363 &Remainder
364 );
365 if (Remainder != 0) {
366 //
367 // If Remainder is not zero, LoopTimes will be rounded up by 1.
368 //
369 LoopTimes += 1;
370 }
371
372 return S3BootScriptSaveMemPoll (Width, Address, DataMask, Data, 1, LoopTimes);
373}
374
388 IN VA_LIST Marker
389 )
390{
391 VOID *EntryPoint;
392 VOID *Context;
393
394 EntryPoint = (VOID *)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
395 Context = (VOID *)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
396
397 return S3BootScriptSaveDispatch2 (EntryPoint, Context);
398}
399
412 IN VA_LIST Marker
413 )
414{
415 UINT32 InformationLength;
416 EFI_PHYSICAL_ADDRESS Information;
417
418 InformationLength = VA_ARG (Marker, UINT32);
419 Information = VA_ARG (Marker, EFI_PHYSICAL_ADDRESS);
420 return S3BootScriptSaveInformation (InformationLength, (VOID *)(UINTN)Information);
421}
422
434 IN VA_LIST Marker
435 )
436{
438 UINT64 Address;
439 VOID *Data;
440 VOID *DataMask;
441 UINT64 Delay;
442
443 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
444 Address = VA_ARG (Marker, UINT64);
445 Data = VA_ARG (Marker, VOID *);
446 DataMask = VA_ARG (Marker, VOID *);
447 Delay = (UINT64)VA_ARG (Marker, UINT64);
448
449 return S3BootScriptSaveIoPoll (Width, Address, Data, DataMask, Delay);
450}
451
464 IN VA_LIST Marker
465 )
466{
468 UINT64 Address;
469 VOID *Data;
470 VOID *DataMask;
471 UINT64 Delay;
472
473 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
474 Address = VA_ARG (Marker, UINT64);
475 Data = VA_ARG (Marker, VOID *);
476 DataMask = VA_ARG (Marker, VOID *);
477 Delay = (UINT64)VA_ARG (Marker, UINT64);
478
479 return S3BootScriptSavePciPoll (Width, Address, Data, DataMask, Delay);
480}
481
494 IN VA_LIST Marker
495 )
496{
498 UINT16 Segment;
499 UINT64 Address;
500 VOID *Data;
501 VOID *DataMask;
502 UINT64 Delay;
503
504 Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH);
505 Segment = VA_ARG (Marker, UINT16);
506 Address = VA_ARG (Marker, UINT64);
507 Data = VA_ARG (Marker, VOID *);
508 DataMask = VA_ARG (Marker, VOID *);
509 Delay = (UINT64)VA_ARG (Marker, UINT64);
510
511 return S3BootScriptSavePci2Poll (Width, Segment, Address, Data, DataMask, Delay);
512}
513
542EFIAPI
545 IN UINTN OpCode,
546 ...
547 )
548{
549 EFI_STATUS Status;
550 VA_LIST Marker;
551
552 //
553 // Build script according to opcode
554 //
555 switch (OpCode) {
556 case EFI_BOOT_SCRIPT_IO_WRITE_OPCODE:
557 VA_START (Marker, OpCode);
558 Status = BootScriptWriteIoWrite (Marker);
559 VA_END (Marker);
560 break;
561
562 case EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE:
563 VA_START (Marker, OpCode);
564 Status = BootScriptWriteIoReadWrite (Marker);
565 VA_END (Marker);
566 break;
567
568 case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
569 VA_START (Marker, OpCode);
570 Status = BootScriptWriteMemWrite (Marker);
571 VA_END (Marker);
572 break;
573
574 case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
575 VA_START (Marker, OpCode);
576 Status = BootScriptWriteMemReadWrite (Marker);
577 VA_END (Marker);
578 break;
579
580 case EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE:
581 VA_START (Marker, OpCode);
582 Status = BootScriptWritePciCfgWrite (Marker);
583 VA_END (Marker);
584 break;
585
586 case EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE:
587 VA_START (Marker, OpCode);
588 Status = BootScriptWritePciCfgReadWrite (Marker);
589 VA_END (Marker);
590 break;
591
592 case EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE:
593 VA_START (Marker, OpCode);
594 Status = BootScriptWriteSmbusExecute (Marker);
595 VA_END (Marker);
596 break;
597
598 case EFI_BOOT_SCRIPT_STALL_OPCODE:
599 VA_START (Marker, OpCode);
600 Status = BootScriptWriteStall (Marker);
601 VA_END (Marker);
602
603 break;
604
605 case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
606 VA_START (Marker, OpCode);
607 Status = BootScriptWriteDispatch (Marker);
608 VA_END (Marker);
609 break;
610
611 case EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE:
612 VA_START (Marker, OpCode);
613 Status = BootScriptWriteDispatch2 (Marker);
614 VA_END (Marker);
615 break;
616
617 case EFI_BOOT_SCRIPT_INFORMATION_OPCODE:
618 VA_START (Marker, OpCode);
619 Status = BootScriptWriteInformation (Marker);
620 VA_END (Marker);
621 break;
622
623 case EFI_BOOT_SCRIPT_MEM_POLL_OPCODE:
624 VA_START (Marker, OpCode);
625 Status = BootScriptWriteMemPoll (Marker);
626 VA_END (Marker);
627 break;
628
629 case EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE:
630 VA_START (Marker, OpCode);
631 Status = BootScriptWritePciCfg2Write (Marker);
632 VA_END (Marker);
633 break;
634
635 case EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE:
636 VA_START (Marker, OpCode);
637 Status = BootScriptWritePciCfg2ReadWrite (Marker);
638 VA_END (Marker);
639 break;
640
641 case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
642 VA_START (Marker, OpCode);
643 Status = BootScriptWriteIoPoll (Marker);
644 VA_END (Marker);
645 break;
646
647 case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
648 VA_START (Marker, OpCode);
649 Status = BootScriptWritePciConfigPoll (Marker);
650 VA_END (Marker);
651 break;
652
653 case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
654 VA_START (Marker, OpCode);
655 Status = BootScriptWritePciConfig2Poll (Marker);
656 VA_END (Marker);
657 break;
658
659 default:
660 Status = EFI_INVALID_PARAMETER;
661 break;
662 }
663
664 return Status;
665}
666
696EFIAPI
699 IN BOOLEAN BeforeOrAfter,
700 IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL,
701 IN UINTN OpCode,
702 ...
703 )
704{
705 EFI_STATUS Status;
706 VA_LIST Marker;
707
708 //
709 // Build script according to opcode
710 //
711 switch (OpCode) {
712 case EFI_BOOT_SCRIPT_IO_WRITE_OPCODE:
713 VA_START (Marker, OpCode);
714 Status = BootScriptWriteIoWrite (Marker);
715 VA_END (Marker);
716 break;
717
718 case EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE:
719 VA_START (Marker, OpCode);
720 Status = BootScriptWriteIoReadWrite (Marker);
721 VA_END (Marker);
722 break;
723
724 case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE:
725 VA_START (Marker, OpCode);
726 Status = BootScriptWriteMemWrite (Marker);
727 VA_END (Marker);
728 break;
729
730 case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE:
731 VA_START (Marker, OpCode);
732 Status = BootScriptWriteMemReadWrite (Marker);
733 VA_END (Marker);
734 break;
735
736 case EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE:
737 VA_START (Marker, OpCode);
738 Status = BootScriptWritePciCfgWrite (Marker);
739 VA_END (Marker);
740 break;
741
742 case EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE:
743 VA_START (Marker, OpCode);
744 Status = BootScriptWritePciCfgReadWrite (Marker);
745 VA_END (Marker);
746 break;
747
748 case EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE:
749 VA_START (Marker, OpCode);
750 Status = BootScriptWriteSmbusExecute (Marker);
751 VA_END (Marker);
752 break;
753
754 case EFI_BOOT_SCRIPT_STALL_OPCODE:
755 VA_START (Marker, OpCode);
756 Status = BootScriptWriteStall (Marker);
757 VA_END (Marker);
758
759 break;
760
761 case EFI_BOOT_SCRIPT_DISPATCH_OPCODE:
762 VA_START (Marker, OpCode);
763 Status = BootScriptWriteDispatch (Marker);
764 VA_END (Marker);
765 break;
766
767 case EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE:
768 VA_START (Marker, OpCode);
769 Status = BootScriptWriteDispatch2 (Marker);
770 VA_END (Marker);
771 break;
772
773 case EFI_BOOT_SCRIPT_INFORMATION_OPCODE:
774 VA_START (Marker, OpCode);
775 Status = BootScriptWriteInformation (Marker);
776 VA_END (Marker);
777 break;
778
779 case EFI_BOOT_SCRIPT_MEM_POLL_OPCODE:
780 VA_START (Marker, OpCode);
781 Status = BootScriptWriteMemPoll (Marker);
782 VA_END (Marker);
783 break;
784
785 case EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE:
786 VA_START (Marker, OpCode);
787 Status = BootScriptWritePciCfg2Write (Marker);
788 VA_END (Marker);
789 break;
790
791 case EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE:
792 VA_START (Marker, OpCode);
793 Status = BootScriptWritePciCfg2ReadWrite (Marker);
794 VA_END (Marker);
795 break;
796
797 case EFI_BOOT_SCRIPT_IO_POLL_OPCODE:
798 VA_START (Marker, OpCode);
799 Status = BootScriptWriteIoPoll (Marker);
800 VA_END (Marker);
801 break;
802
803 case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE:
804 VA_START (Marker, OpCode);
805 Status = BootScriptWritePciConfigPoll (Marker);
806 VA_END (Marker);
807 break;
808
809 case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE:
810 VA_START (Marker, OpCode);
811 Status = BootScriptWritePciConfig2Poll (Marker);
812 VA_END (Marker);
813 break;
814
815 default:
816 Status = EFI_INVALID_PARAMETER;
817 break;
818 }
819
820 if (!EFI_ERROR (Status)) {
821 Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, (VOID **)Position);
822 }
823
824 return Status;
825}
826
855EFIAPI
858 IN BOOLEAN BeforeOrAfter,
859 IN BOOLEAN CreateIfNotFound,
860 IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL,
861 IN CONST CHAR8 *Label
862 )
863{
864 return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID **)Position, Label);
865}
866
885EFIAPI
888 IN EFI_S3_BOOT_SCRIPT_POSITION Position1,
889 IN EFI_S3_BOOT_SCRIPT_POSITION Position2,
890 OUT UINTN *RelativePosition
891 )
892{
893 return S3BootScriptCompare (Position1, Position2, RelativePosition);
894}
895
908EFIAPI
910 IN EFI_HANDLE ImageHandle,
911 IN EFI_SYSTEM_TABLE *SystemTable
912 )
913{
914 EFI_STATUS Status;
915 EFI_EVENT EndOfDxeEvent;
916
917 if (!PcdGetBool (PcdAcpiS3Enable)) {
918 return EFI_UNSUPPORTED;
919 }
920
921 Status = gBS->CreateEventEx (
922 EVT_NOTIFY_SIGNAL,
923 TPL_CALLBACK,
925 NULL,
926 &gEfiEndOfDxeEventGroupGuid,
927 &EndOfDxeEvent
928 );
929 ASSERT_EFI_ERROR (Status);
930
931 return gBS->InstallProtocolInterface (
932 &mHandle,
933 &gEfiS3SaveStateProtocolGuid,
935 &mS3SaveState
936 );
937}
UINT64 UINTN
VOID EFIAPI AcpiS3ContextSaveOnEndOfDxe(IN EFI_EVENT Event, IN VOID *Context)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)
RETURN_STATUS EFIAPI S3BootScriptSaveInformation(IN UINT32 InformationLength, IN VOID *Information)
RETURN_STATUS EFIAPI S3BootScriptSaveIoPoll(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask, IN UINT64 Delay)
RETURN_STATUS EFIAPI S3BootScriptSavePciCfg2ReadWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT16 Segment, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask)
RETURN_STATUS EFIAPI S3BootScriptSavePci2Poll(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT16 Segment, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask, IN UINT64 Delay)
RETURN_STATUS EFIAPI S3BootScriptSaveDispatch2(IN VOID *EntryPoint, IN VOID *Context)
RETURN_STATUS EFIAPI S3BootScriptSaveIoReadWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask)
RETURN_STATUS EFIAPI S3BootScriptSaveIoWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
RETURN_STATUS EFIAPI S3BootScriptSavePciCfgWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
RETURN_STATUS EFIAPI S3BootScriptCompare(IN UINT8 *Position1, IN UINT8 *Position2, OUT UINTN *RelativePosition)
RETURN_STATUS EFIAPI S3BootScriptSaveStall(IN UINTN Duration)
RETURN_STATUS EFIAPI S3BootScriptSaveSmbusExecute(IN UINTN SmBusAddress, IN EFI_SMBUS_OPERATION Operation, IN UINTN *Length, IN VOID *Buffer)
RETURN_STATUS EFIAPI S3BootScriptSaveMemPoll(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *BitMask, IN VOID *BitValue, IN UINTN Duration, IN UINT64 LoopTimes)
RETURN_STATUS EFIAPI S3BootScriptSavePciCfg2Write(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT16 Segment, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
RETURN_STATUS EFIAPI S3BootScriptSaveDispatch(IN VOID *EntryPoint)
RETURN_STATUS EFIAPI S3BootScriptMoveLastOpcode(IN BOOLEAN BeforeOrAfter, IN OUT VOID **Position OPTIONAL)
RETURN_STATUS EFIAPI S3BootScriptSavePciCfgReadWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask)
RETURN_STATUS EFIAPI S3BootScriptSaveMemWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
RETURN_STATUS EFIAPI S3BootScriptLabel(IN BOOLEAN BeforeOrAfter, IN BOOLEAN CreateIfNotFound, IN OUT VOID **Position OPTIONAL, IN CONST CHAR8 *Label)
RETURN_STATUS EFIAPI S3BootScriptSaveMemReadWrite(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask)
RETURN_STATUS EFIAPI S3BootScriptSavePciPoll(IN S3_BOOT_SCRIPT_LIB_WIDTH Width, IN UINT64 Address, IN VOID *Data, IN VOID *DataMask, IN UINT64 Delay)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define VA_ARG(Marker, TYPE)
Definition: Base.h:679
#define VA_START(Marker, Parameter)
Definition: Base.h:661
CHAR8 * VA_LIST
Definition: Base.h:643
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define VA_END(Marker)
Definition: Base.h:691
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define PcdGetBool(TokenName)
Definition: PcdLib.h:401
S3_BOOT_SCRIPT_LIB_WIDTH
EFI_STATUS BootScriptWriteIoWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:30
EFI_STATUS EFIAPI BootScriptLabel(IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN BOOLEAN BeforeOrAfter, IN BOOLEAN CreateIfNotFound, IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, IN CONST CHAR8 *Label)
Definition: S3SaveState.c:856
EFI_STATUS BootScriptWriteInformation(IN VA_LIST Marker)
Definition: S3SaveState.c:411
EFI_STATUS BootScriptWritePciConfigPoll(IN VA_LIST Marker)
Definition: S3SaveState.c:463
EFI_STATUS EFIAPI BootScriptWrite(IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN UINTN OpCode,...)
Definition: S3SaveState.c:543
EFI_STATUS BootScriptWriteStall(IN VA_LIST Marker)
Definition: S3SaveState.c:292
EFI_STATUS EFIAPI BootScriptInsert(IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN BOOLEAN BeforeOrAfter, IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, IN UINTN OpCode,...)
Definition: S3SaveState.c:697
EFI_STATUS BootScriptWritePciCfgReadWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:170
EFI_STATUS BootScriptWriteDispatch2(IN VA_LIST Marker)
Definition: S3SaveState.c:387
EFI_STATUS BootScriptWriteIoReadWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:58
EFI_STATUS BootScriptWriteMemReadWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:114
EFI_STATUS EFIAPI InitializeS3SaveState(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: S3SaveState.c:909
EFI_STATUS BootScriptWritePciCfgWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:142
EFI_STATUS BootScriptWriteDispatch(IN VA_LIST Marker)
Definition: S3SaveState.c:315
EFI_STATUS BootScriptWritePciConfig2Poll(IN VA_LIST Marker)
Definition: S3SaveState.c:493
EFI_STATUS BootScriptWriteMemWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:86
EFI_STATUS BootScriptWriteIoPoll(IN VA_LIST Marker)
Definition: S3SaveState.c:433
EFI_STATUS BootScriptWriteMemPoll(IN VA_LIST Marker)
Definition: S3SaveState.c:336
EFI_STATUS BootScriptWritePciCfg2ReadWrite(IN VA_LIST Marker)
Definition: S3SaveState.c:228
EFI_STATUS EFIAPI BootScriptCompare(IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN EFI_S3_BOOT_SCRIPT_POSITION Position1, IN EFI_S3_BOOT_SCRIPT_POSITION Position2, OUT UINTN *RelativePosition)
Definition: S3SaveState.c:886
EFI_HANDLE mHandle
Definition: S3SaveState.c:11
EFI_STATUS BootScriptWriteSmbusExecute(IN VA_LIST Marker)
Definition: S3SaveState.c:258
EFI_STATUS BootScriptWritePciCfg2Write(IN VA_LIST Marker)
Definition: S3SaveState.c:198
UINTN EFI_SMBUS_DEVICE_COMMAND
Definition: SmBus.h:71
enum _EFI_SMBUS_OPERATION EFI_SMBUS_OPERATION
#define SMBUS_LIB_ADDRESS(SlaveAddress, Command, Length, Pec)
Definition: SmbusLib.h:27
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193