mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2212 In binary model the same binary may have to support both S3 enabled and disabled scenarios, however not all DXE drivers linking PiDxeS3BootScriptLib can return error to invoke library DESTRUCTOR for releasing resource. To support this usage model below PCD is used to skip S3BootScript functions when PCD set to FALSE: gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable Test: Verified on internal platform and S3BootScript functions can be skipped by PCD during boot time. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
69 lines
2.0 KiB
INI
69 lines
2.0 KiB
INI
## @file
|
|
# DXE S3 boot script Library.
|
|
#
|
|
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = DxeS3BootScriptLib
|
|
MODULE_UNI_FILE = DxeS3BootScriptLib.uni
|
|
FILE_GUID = 57F9967B-26CD-4262-837A-55B8AA158254
|
|
MODULE_TYPE = DXE_DRIVER
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = S3BootScriptLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION
|
|
|
|
|
|
CONSTRUCTOR = S3BootScriptLibInitialize
|
|
DESTRUCTOR = S3BootScriptLibDeinitialize
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
|
#
|
|
|
|
[Sources]
|
|
BootScriptSave.c
|
|
BootScriptExecute.c
|
|
InternalBootScriptLib.h
|
|
BootScriptInternalFormat.h
|
|
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
[LibraryClasses]
|
|
UefiBootServicesTableLib
|
|
BaseLib
|
|
BaseMemoryLib
|
|
TimerLib
|
|
DebugLib
|
|
PcdLib
|
|
UefiLib
|
|
SmbusLib
|
|
PciSegmentLib
|
|
IoLib
|
|
LockBoxLib
|
|
|
|
[Protocols]
|
|
gEfiSmmBase2ProtocolGuid ## SOMETIMES_CONSUMES
|
|
gEfiDxeSmmReadyToLockProtocolGuid ## NOTIFY
|
|
gEfiSmmReadyToLockProtocolGuid ## NOTIFY
|
|
gEdkiiSmmExitBootServicesProtocolGuid ## NOTIFY
|
|
gEdkiiSmmLegacyBootProtocolGuid ## NOTIFY
|
|
|
|
[Pcd]
|
|
## CONSUMES
|
|
## SOMETIMES_PRODUCES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr
|
|
## CONSUMES
|
|
## SOMETIMES_PRODUCES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateSmmDataPtr
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptRuntimeTableReservePageNumber ## CONSUMES
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable ## CONSUMES
|