UefiCpuPkg/CpuS3DataDxe: Consume PcdAcpiS3Enable to control the code
If PcdAcpiS3Enable is disabled, then return an EFI_UNSUPPORTED error which forces the module to be unloaded. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
committed by
Michael Kinney
parent
5322ee484b
commit
ca98f60382
@@ -133,6 +133,7 @@ CpuS3DataOnEndOfDxe (
|
|||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||||
|
@retval EFI_UNSUPPORTED Do not support ACPI S3.
|
||||||
@retval other Some error occurs when executing this entry point.
|
@retval other Some error occurs when executing this entry point.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@@ -160,6 +161,10 @@ CpuS3DataInitialize (
|
|||||||
VOID *Idt;
|
VOID *Idt;
|
||||||
EFI_EVENT Event;
|
EFI_EVENT Event;
|
||||||
|
|
||||||
|
if (!PcdGetBool (PcdAcpiS3Enable)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate ACPI NVS memory below 4G memory for use on ACPI S3 resume.
|
// Allocate ACPI NVS memory below 4G memory for use on ACPI S3 resume.
|
||||||
//
|
//
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
UefiCpuPkg/UefiCpuPkg.dec
|
UefiCpuPkg/UefiCpuPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
@@ -60,6 +61,7 @@
|
|||||||
[Pcd]
|
[Pcd]
|
||||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
|
||||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuS3DataAddress ## PRODUCES
|
gUefiCpuPkgTokenSpaceGuid.PcdCpuS3DataAddress ## PRODUCES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiMpServiceProtocolGuid
|
gEfiMpServiceProtocolGuid
|
||||||
|
Reference in New Issue
Block a user