]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: S3 Suspend: import specialized copy of AcpiS3SaveDxe
authorLaszlo Ersek <lersek@redhat.com>
Tue, 4 Mar 2014 08:03:31 +0000 (08:03 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Mar 2014 08:03:31 +0000 (08:03 +0000)
"IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf"
currently specifies a DepEx on gEfiMpServiceProtocolGuid (MP Services).

The justification is the following code sequence:

  InstallAcpiS3Save()
    if PcdFrameworkCompatibilitySupport is set:
      InstallAcpiS3SaveThunk()
        if EFI_MP_SERVICES_PROTOCOL is available:
          GetVariable(ACPI_GLOBAL_VARIABLE)

In English, the AcpiS3SaveDxe driver insists on the presence of MP
Services *unconditionally* because,

- if PcdFrameworkCompatibilitySupport is set (the default is false),
- and MP Services are available (which is constant true under the above
  condition),

then the AcpiS3SaveDxe driver would like to get the ACPI_GLOBAL_VARIABLE
variable from the MP Services driver, rather than setting it itself.

The DepEx prevents AcpiS3SaveDxe from loading under OvmfPkg, since we
provide no MP Services implementation. This is particularly broken since
the default PcdFrameworkCompatibilitySupport value is FALSE, making the
entire code that would look at EFI_MP_SERVICES_PROTOCOL dead.

Copy AcpiS3SaveDxe to OvmfPkg, substitute PcdFrameworkCompatibilitySupport
with constant FALSE, and remove all code that becomes dead, including the
DepEx.

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@15302 6f19259b-4bc3-4df7-8a09-765794883524


No differences found