]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 26 Jul 2015 08:02:19 +0000 (08:02 +0000)
committerjljusten <jljusten@Edk2>
Sun, 26 Jul 2015 08:02:19 +0000 (08:02 +0000)
The AcpiS3->S3Save() call needs to occur before the end-of-DXE event
is signalled. The end-of-DXE event needs to be signalled prior to
invoking any UEFI drivers, applications, or connecting consoles.

This means the call to S3Save() that occurs in BdsLibBootViaBootOption()
violates the ordering constraints, and should be removed. Since it is
the responsibility of the platform BDS to signal the end-of-DXE event,
it should also perform the AcpiS3->S3Save() call at an appropriate time.

Commit message update from Laszlo Ersek <lersek@redhat.com>:

Following Jiewen Yao's idea in

 http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16146

platforms that
(1) use this exact instance of GenericBdsLib, *and*
(2) support S3

should now collect the S3 state
(3) in an End-of-Dxe callback in their AcpiS3SaveDxe drivers, *or*
(4) with an explicit AcpiS3->S3Save() call made to their AcpiS3SaveDxe
    drivers from their PlatformBdsLib instances.

OvmfPkg, which uses this GenericBdsLib instance, and has its own
AcpiS3SaveDxe fork, follows (3).

Vlv2TbltDevicePkg, which has a GenericBdsLib fork, and uses
IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe, follows (4).

There are no other platforms in the public edk2 repository that support
S3.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>
[lersek@redhat.com: updated commit message]
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <Jiewen.Yao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18036 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h

index e02a71015edcbbd066447c1e4b92c2a284c33733..4b7eca7bbd3409850b65308e5168eff96c82d34d 100644 (file)
@@ -2233,22 +2233,12 @@ BdsLibBootViaBootOption (
   EFI_DEVICE_PATH_PROTOCOL  *FilePath;\r
   EFI_LOADED_IMAGE_PROTOCOL *ImageInfo;\r
   EFI_DEVICE_PATH_PROTOCOL  *WorkingDevicePath;\r
-  EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save;\r
   LIST_ENTRY                TempBootLists;\r
   EFI_BOOT_LOGO_PROTOCOL    *BootLogo;\r
 \r
   *ExitDataSize = 0;\r
   *ExitData     = NULL;\r
 \r
-  //\r
-  // Notes: this code can be remove after the s3 script table\r
-  // hook on the event EVT_SIGNAL_READY_TO_BOOT or\r
-  // EVT_SIGNAL_LEGACY_BOOT\r
-  //\r
-  Status = gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID **) &AcpiS3Save);\r
-  if (!EFI_ERROR (Status)) {\r
-    AcpiS3Save->S3Save (AcpiS3Save, NULL);\r
-  }\r
   //\r
   // If it's Device Path that starts with a hard drive path, append it with the front part to compose a\r
   // full device path\r
index 5381e331ff8ce6ad25ce598f73136ee8fe2987ad..5a138a9169b339e8227cc5d267d73aa4f3ab4ee4 100644 (file)
   gEfiLegacyBiosProtocolGuid                    ## SOMETIMES_CONSUMES\r
   gEfiCpuArchProtocolGuid                       ## CONSUMES\r
   gEfiDevicePathProtocolGuid                    ## CONSUMES\r
-  gEfiAcpiS3SaveProtocolGuid                    ## SOMETIMES_CONSUMES\r
   gEfiGraphicsOutputProtocolGuid                ## SOMETIMES_CONSUMES\r
   gEfiUgaDrawProtocolGuid |gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## SOMETIMES_CONSUMES\r
   gEfiOEMBadgingProtocolGuid                    ## SOMETIMES_CONSUMES\r
index c32579bfc577c5b266e6edbef5ceb55fb165a870..7201d8a335277e58831de93ee250b20f28653038 100644 (file)
@@ -33,7 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SimpleNetwork.h>\r
 #include <Protocol/FirmwareVolume2.h>\r
 #include <Protocol/PciIo.h>\r
-#include <Protocol/AcpiS3Save.h>\r
 #include <Protocol/OEMBadging.h>\r
 #include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/UgaDraw.h>\r