Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek 8f5ca05b0d OvmfPkg: PlatformPei: detect S3 Resume in CMOS and set boot mode accordingly
Data is transferred between S3 Suspend and S3 Resume as follows:

S3 Suspend (DXE):

(1) BdsLibBootViaBootOption()
      EFI_ACPI_S3_SAVE_PROTOCOL [AcpiS3SaveDxe]
      - saves ACPI S3 Context to LockBox  ---------------------+
        (including FACS address -- FACS ACPI table             |
        contains OS waking vector)                             |
                                                               |
      - prepares boot script:                                  |
        EFI_S3_SAVE_STATE_PROTOCOL.Write() [S3SaveStateDxe]    |
          S3BootScriptLib [PiDxeS3BootScriptLib]               |
          - opcodes & arguments are saved in NVS.  --+         |
                                                     |         |
      - issues a notification by installing          |         |
        EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL           |         |
                                                     |         |
(2) EFI_S3_SAVE_STATE_PROTOCOL [S3SaveStateDxe]      |         |
      S3BootScriptLib [PiDxeS3BootScriptLib]         |         |
      - closes script with special opcode  <---------+         |
      - script is available in non-volatile memory             |
        via PcdS3BootScriptTablePrivateDataPtr  --+            |
                                                  |            |
    BootScriptExecutorDxe                         |            |
      S3BootScriptLib [PiDxeS3BootScriptLib]      |            |
      - Knows about boot script location by  <----+            |
        synchronizing with the other library                   |
        instance via                                           |
        PcdS3BootScriptTablePrivateDataPtr.                    |
      - Copies relocated image of itself to                    |
        reserved memory. --------------------------------+     |
      - Saved image contains pointer to boot script.  ---|--+  |
                                                         |  |  |
Runtime:                                                 |  |  |
                                                         |  |  |
(3) OS is booted, writes OS waking vector to FACS,       |  |  |
    suspends machine                                     |  |  |
                                                         |  |  |
S3 Resume (PEI):                                         |  |  |
                                                         |  |  |
(4) PlatformPei sets S3 Boot Mode based on CMOS          |  |  |
                                                         |  |  |
(5) DXE core is skipped and EFI_PEI_S3_RESUME2 is        |  |  |
    called as last step of PEI                           |  |  |
                                                         |  |  |
(6) S3Resume2Pei retrieves from LockBox:                 |  |  |
    - ACPI S3 Context (path to FACS)  <------------------|--|--+
                                      |                  |  |
                                      +------------------|--|--+
    - Boot Script Executor Image  <----------------------+  |  |
                                                            |  |
(7) BootScriptExecutorDxe                                   |  |
      S3BootScriptLib [PiDxeS3BootScriptLib]                |  |
      - executes boot script  <-----------------------------+  |
                                                               |
(8) OS waking vector available from ACPI S3 Context / FACS  <--+
    is called

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: move code into BootModeInitialization]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15290 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-04 08:01:32 +00:00
AppPkg Enable the build command override the .DSC file contents to enable debug output and specify which debug messages are displayed. An example: 2013-11-19 02:37:37 +00:00
ArmPkg ArmPkg: Tidy assembler code 2014-03-01 11:01:00 +00:00
ArmPlatformPkg ArmPlatformPkg/ArmVExpressDxe: Platform specific driver for ARM VExpress based platform 2014-03-01 11:05:44 +00:00
BaseTools Fix CRLF format 2014-01-27 05:36:53 +00:00
BeagleBoardPkg ARM Packages: CRLF fixup 2014-02-12 15:30:34 +00:00
Conf Adding top-level Conf directory for next generation of EDK II build infrastructure tools. 2007-06-20 19:33:23 +00:00
CryptoPkg Update CryptoPkg version: 0.92 -> 0.93 2014-01-10 02:30:22 +00:00
DuetPkg Fix CRLF format 2014-01-22 08:35:25 +00:00
EdkCompatibilityPkg Fix CRLF format 2014-01-23 05:27:14 +00:00
EdkShellBinPkg New EdkShell binaries. 2014-01-10 04:57:57 +00:00
EdkShellPkg EdkShellPkg/ShellR64.patch: Adding missing files from the patch 2014-01-14 15:31:01 +00:00
EmbeddedPkg EmbeddedPkg: Added support for AArch64 2014-03-01 11:01:44 +00:00
EmulatorPkg Update PeiServicesTablePointerLib instance to add new API MigratePeiServicesTablePointer 2014-01-16 02:42:17 +00:00
FatBinPkg New FatDxe binary. 2014-01-10 02:44:43 +00:00
IntelFrameworkModulePkg Fix CRLF format 2014-01-22 08:38:20 +00:00
IntelFrameworkPkg Update IntelFrameworkPkg version: 0.92->0.93 2014-01-10 01:18:20 +00:00
MdeModulePkg Add comment for S3BootScriptSaveMemPoll API, since it does not match PI specification. 2014-03-01 12:25:31 +00:00
MdePkg Add comment for S3BootScriptSaveMemPoll API, since it does not match PI specification. 2014-03-01 12:25:31 +00:00
NetworkPkg Fix CRLF format 2014-01-22 08:39:32 +00:00
Nt32Pkg Follow UEFI spec to add the definition for EFI_SPECIFICATION_VERSION, and update other table version to refer to it. Remove the “/D TIANO_RELEASE_VERSION=0x00080006” option in Nt32Pkg DSC file, since it’s not used in source code. 2013-11-26 07:36:29 +00:00
Omap35xxPkg ARM Packages: CRLF fixup 2014-02-12 15:30:34 +00:00
OptionRomPkg Fix CRLF format 2014-01-22 08:39:50 +00:00
OvmfPkg OvmfPkg: PlatformPei: detect S3 Resume in CMOS and set boot mode accordingly 2014-03-04 08:01:32 +00:00
PcAtChipsetPkg Fix CRLF format 2014-01-22 08:40:06 +00:00
PerformancePkg Refine the select language logic. 2013-09-05 05:39:57 +00:00
SecurityPkg Add description information for the GUID and Library class defined in DEC file 2014-01-28 07:00:06 +00:00
ShellBinPkg ShellBinPkg: ARM binaries update based on 15257. 2014-02-25 10:37:49 +00:00
ShellPkg Convert the value from 'int' to 'CHAR16' to match the type of variable in ShellProtocol.c. 2014-02-28 00:36:03 +00:00
SourceLevelDebugPkg Fix CRLF format 2014-01-22 08:40:49 +00:00
StdLib Fix the non-blocking behavior for connect. The behavior was correct if the code polled the connect routine but was not correct when using select to complete the asynchronous request. This change fixes the select case by moving where some of the operations performed upon the connection completion. 2013-12-13 19:22:39 +00:00
StdLibPrivateInternalFiles EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Update ReadMe.txt in all packages. 2013-10-24 23:14:10 +00:00
UefiCpuPkg Fix ResetVectorVtf0.asm comment typo 2014-01-28 02:30:10 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
edksetup.bat edksetup.bat: Fixed corrupts CYGWIN_HOME 2014-02-24 14:14:13 +00:00
edksetup.sh edksetup.sh: Fix typo and return code 2014-01-30 19:26:53 +00:00