The S3Ready() functional code in AcpiS3SaveDxe of IntelFrameworkModulePkg
is to do ACPI S3 Context save. In fact, that is not really related to
Intel framework ACPI S3 protocol.

IntelFrameworkModulePkg will be deprecated step by step, so move the
functional code to MdeModulePkg and S3SaveStateDxe is a good place.
The ACPI global variable related code is leaved as is in IntelFrameworkModulePkg
AcpiS3SaveDxe for compatibility.
PcdS3BootScriptStackSize is also moved from IntelFrameworkModulePkg.

The functional code need to get ACPI FACS table and consume LockBoxLib,
so need to be before DxeSmmReadyToLock that will shut down SMM lock box
interface, EndOfDxe is a good time point (OVMF AcpiS3SaveDxe has the
reference implementation).

After the movement, AcpiS3SaveDxe in OvmfPkg could be retired.
With this patch series, I did S3 test on real platform and normal boot for OVMF,
and tks Laszlo did the normal boot and S3 test on OVMF.

V2:
Major change to V1 is to introduce a new PCD PcdAcpiS3Enable.
It is for the concern to V1, detailed discussion about V1 is at
http://article.gmane.org/gmane.comp.bios.edk2.devel/10261

V3:
Minor updates to 2/8 and 3/8 according to Laszlo's feedback, tks.
Include PcdLib.h in *.h and PcdLib in *.inf for 4/8.
Use EFI_UNSUPPORTED as the return error status to instead of EFI_LOAD_ERROR.

Cc: Jiewen Yao <[email protected]>
Cc: Feng Tian <[email protected]>
Cc: Jeff Fan <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Jordan Justen <[email protected]>
Star Zeng (8):
  MdeModulePkg: Introduce new PCD PcdAcpiS3Enable
  OvmfPkg: Set PcdAcpiS3Enable according to QemuFwCfgS3Enabled()
  OvmfPkg: Install LockBox protocol in constructor of LockBoxDxeLib
  MdeModulePkg S3SaveStateDxe: Consume PcdAcpiS3Enable to control the
    code
  MdeModulePkg S3SaveStateDxe: Move S3Ready() functional code from
    AcpiS3SaveDxe
  OvmfPkg: Retire AcpiS3SaveDxe
  IntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to
    control the code
  IntelFrameworkModulePkg AcpiS3SaveDxe: Remove S3Ready() functional
    code

 .../IntelFrameworkModulePkg.dec                    |   8 +-
 .../IntelFrameworkModulePkg.uni                    |   6 +-
 .../Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c      | 459 +--------------------
 .../Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf |  12 +-
 .../Acpi/AcpiS3SaveDxe/AcpiVariableThunkPlatform.c |   6 +-
 MdeModulePkg/MdeModulePkg.dec                      |  12 +
 MdeModulePkg/MdeModulePkg.uni                      |  10 +
 .../Acpi/S3SaveStateDxe/AcpiS3ContextSave.c        | 212 +++++-----
 .../Acpi/S3SaveStateDxe/InternalS3SaveState.h      |  19 +-
 .../Universal/Acpi/S3SaveStateDxe/S3SaveState.c    |  17 +-
 .../Acpi/S3SaveStateDxe/S3SaveStateDxe.inf         |  22 +-
 OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf            |  77 ----
 OvmfPkg/Library/LockBoxLib/LockBoxDxe.c            |  31 +-
 OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf       |   6 +-
 OvmfPkg/OvmfPkgIa32.dsc                            |   2 +-
 OvmfPkg/OvmfPkgIa32.fdf                            |   3 +-
 OvmfPkg/OvmfPkgIa32X64.dsc                         |   2 +-
 OvmfPkg/OvmfPkgIa32X64.fdf                         |   3 +-
 OvmfPkg/OvmfPkgX64.dsc                             |   2 +-
 OvmfPkg/OvmfPkgX64.fdf                             |   3 +-
 OvmfPkg/PlatformPei/Platform.c                     |   6 +-
 OvmfPkg/PlatformPei/PlatformPei.inf                |   3 +-
 22 files changed, 231 insertions(+), 690 deletions(-)
 rename OvmfPkg/AcpiS3SaveDxe/AcpiS3Save.c => 
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c (74%)
 delete mode 100644 OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf

-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to