Revision: 18036
          http://sourceforge.net/p/edk2/code/18036
Author:   jljusten
Date:     2015-07-26 08:02:19 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
IntelFrameworkModulePkg/GenericBdsLib: remove AcpiS3->S3Save() call

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 <[email protected]>:

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 <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
[[email protected]: updated commit message]
Cc: Ard Biesheuvel <[email protected]>
Cc: Jeff Fan <[email protected]>
Cc: Jiewen Yao <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>

Modified Paths:
--------------
    trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
    trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
    trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h

Modified: trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c  
2015-07-26 08:02:13 UTC (rev 18035)
+++ trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c  
2015-07-26 08:02:19 UTC (rev 18036)
@@ -2233,7 +2233,6 @@
   EFI_DEVICE_PATH_PROTOCOL  *FilePath;
   EFI_LOADED_IMAGE_PROTOCOL *ImageInfo;
   EFI_DEVICE_PATH_PROTOCOL  *WorkingDevicePath;
-  EFI_ACPI_S3_SAVE_PROTOCOL *AcpiS3Save;
   LIST_ENTRY                TempBootLists;
   EFI_BOOT_LOGO_PROTOCOL    *BootLogo;
 
@@ -2241,15 +2240,6 @@
   *ExitData     = NULL;
 
   //
-  // Notes: this code can be remove after the s3 script table
-  // hook on the event EVT_SIGNAL_READY_TO_BOOT or
-  // EVT_SIGNAL_LEGACY_BOOT
-  //
-  Status = gBS->LocateProtocol (&gEfiAcpiS3SaveProtocolGuid, NULL, (VOID **) 
&AcpiS3Save);
-  if (!EFI_ERROR (Status)) {
-    AcpiS3Save->S3Save (AcpiS3Save, NULL);
-  }
-  //
   // If it's Device Path that starts with a hard drive path, append it with 
the front part to compose a
   // full device path
   //

Modified: 
trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf  
2015-07-26 08:02:13 UTC (rev 18035)
+++ trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf  
2015-07-26 08:02:19 UTC (rev 18036)
@@ -119,7 +119,6 @@
   gEfiLegacyBiosProtocolGuid                    ## SOMETIMES_CONSUMES
   gEfiCpuArchProtocolGuid                       ## CONSUMES
   gEfiDevicePathProtocolGuid                    ## CONSUMES
-  gEfiAcpiS3SaveProtocolGuid                    ## SOMETIMES_CONSUMES
   gEfiGraphicsOutputProtocolGuid                ## SOMETIMES_CONSUMES
   gEfiUgaDrawProtocolGuid |gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## 
SOMETIMES_CONSUMES
   gEfiOEMBadgingProtocolGuid                    ## SOMETIMES_CONSUMES

Modified: 
trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h   
2015-07-26 08:02:13 UTC (rev 18035)
+++ trunk/edk2/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h   
2015-07-26 08:02:19 UTC (rev 18036)
@@ -33,7 +33,6 @@
 #include <Protocol/SimpleNetwork.h>
 #include <Protocol/FirmwareVolume2.h>
 #include <Protocol/PciIo.h>
-#include <Protocol/AcpiS3Save.h>
 #include <Protocol/OEMBadging.h>
 #include <Protocol/GraphicsOutput.h>
 #include <Protocol/UgaDraw.h>


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to