diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-03-04 08:03:56 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-03-04 08:03:56 +0000 |
commit | 5a217a0649b31db2f0e7a65e42f92fbebc3bef96 (patch) | |
tree | f720e5731c7f78ee1aff4d5bf5982dee20543c0a /OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf | |
parent | b017b1b27a18af9519a0a18ed731d8d7c8cefa43 (diff) | |
download | edk2-platforms-5a217a0649b31db2f0e7a65e42f92fbebc3bef96.tar.xz |
OvmfPkg: S3 Suspend: save boot script after ACPI context
The trigger to actually save the boot script is the installation of
EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL, to be performed by any DXE driver.
Installation of the protocol also locks down SMM (as its name indicates)
and (in theory) prevents further LockBox access.
We cannot install this protocol before BdsLibBootViaBootOption() is called
(eg. in OVMF's PlatformBdsPolicyBehavior()), because
BdsLibBootViaBootOption() calls EFI_ACPI_S3_SAVE_PROTOCOL.S3Save(), which
needs LockBox access.
We also can't install the protocol after BdsLibBootViaBootOption()
returns, simply because control is never returned to us.
Therefore modify our EFI_ACPI_S3_SAVE_PROTOCOL implementation so that the
boot script is prepared and installed internally to S3Save().
(The boot script must contain at least one opcode, otherwise
S3BootScriptLib runs into an assertion failure. We add a harmless (no-op)
"information" opcode.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15305 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf')
-rw-r--r-- | OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf index 169e400c70..159cdb82fe 100644 --- a/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf +++ b/OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf @@ -62,6 +62,8 @@ gEfiLegacyBiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiLegacyRegion2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gFrameworkEfiMpServiceProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
+ gEfiS3SaveStateProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+ gEfiDxeSmmReadyToLockProtocolGuid # PROTOCOL ALWAYS_CONSUMED
[FeaturePcd]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformCsmSupport ## CONSUMES
@@ -73,4 +75,4 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
[Depex]
- gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
+ gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND gEfiS3SaveStateProtocolGuid
|