Ard Biesheuvel 155f9d424c 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 <lersek@redhat.com>:

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 <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>
[lersek@redhat.com: updated commit message]
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <Jiewen.Yao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18036 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:02:19 +00:00

146 lines
6.7 KiB
INI

## @file
# General BDS library.
#
# General BDS defines and produce general interfaces for platform BDS driver including:
# 1) BDS boot policy interface;
# 2) BDS boot device connect interface;
# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = GenericBdsLib
MODULE_UNI_FILE = GenericBdsLib.uni
FILE_GUID = e405ec31-ccaa-4dd4-83e8-0aec01703f7e
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION
CONSTRUCTOR = GenericBdsLibConstructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
[Sources]
DevicePath.c
Performance.c
BdsConnect.c
BdsMisc.c
BdsConsole.c
BdsBoot.c
InternalBdsLib.h
String.h
String.c
GenericBdsStrings.uni
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
IntelFrameworkPkg/IntelFrameworkPkg.dec
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
DevicePathLib
PeCoffGetEntryPointLib
BaseLib
HobLib
UefiRuntimeServicesTableLib
DxeServicesTableLib
MemoryAllocationLib
UefiLib
UefiBootServicesTableLib
BaseMemoryLib
DebugLib
PrintLib
PcdLib
PerformanceLib
TimerLib
DxeServicesLib
HiiLib
ReportStatusCodeLib
[Guids]
## SOMETIMES_CONSUMES ## HOB # The hob holding memory type information
## SOMETIMES_CONSUMES ## SystemTable # The identifier of memory type information type in system table
## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation"
gEfiMemoryTypeInformationGuid
## SOMETIMES_CONSUMES ## Variable:L"BootXXXX" # Boot option variable
## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable
## SOMETIMES_CONSUMES ## Variable:L"DriverXXXX" # Driver load option.
## SOMETIMES_PRODUCES ## Variable:L"DriverXXXX" # Driver load option.
## SOMETIMES_CONSUMES ## Variable:L"BootNext" # Next Boot Option
## SOMETIMES_PRODUCES ## Variable:L"BootNext" # Next Boot Option
## SOMETIMES_CONSUMES ## Variable:L"BootOrder" # The boot option array
## SOMETIMES_PRODUCES ## Variable:L"BootOrder" # The boot option array
## SOMETIMES_CONSUMES ## Variable:L"DriverOrder" # The driver order list
## SOMETIMES_CONSUMES ## Variable:L"ConIn" # The device path of console in device
## SOMETIMES_PRODUCES ## Variable:L"ConIn" # The device path of console in device
## SOMETIMES_CONSUMES ## Variable:L"ConOut" # The device path of console out device
## SOMETIMES_PRODUCES ## Variable:L"ConOut" # The device path of console out device
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" # The device path of error out device
## SOMETIMES_PRODUCES ## Variable:L"ErrOut" # The device path of error out device
## SOMETIMES_PRODUCES ## Variable:L"BootCurrent" # The boot option of current boot
## SOMETIMES_PRODUCES ## Variable:L"BootNext" # The number of next boot option
gEfiGlobalVariableGuid
gEfiFileInfoGuid ## SOMETIMES_CONSUMES ## GUID
gPerformanceProtocolGuid ## SOMETIMES_PRODUCES ## Variable:L"PerfDataMemAddr" # The ACPI address of performance data
gLastEnumLangGuid ## SOMETIMES_PRODUCES ## Variable:L"LastEnumLang" # Platform language at last time enumeration.
gHdBootDevicePathVariablGuid ## SOMETIMES_PRODUCES ## Variable:L"HDDP" # The device path of Boot file on Hard device.
gBdsLibStringPackageGuid ## CONSUMES ## HII # HII String PackageList Guid
## SOMETIMES_PRODUCES ## Variable:L"LegacyDevOrder"
## SOMETIMES_CONSUMES ## Variable:L"LegacyDevOrder"
gEfiLegacyDevOrderVariableGuid
gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID
[Protocols]
gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES
gEfiLoadFileProtocolGuid ## SOMETIMES_CONSUMES
gEfiSimpleTextOutProtocolGuid ## CONSUMES
gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMES
gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMES
gEfiSimpleNetworkProtocolGuid ## SOMETIMES_CONSUMES
gEfiDebugPortProtocolGuid ## SOMETIMES_CONSUMES
gEfiSimpleTextInProtocolGuid ## CONSUMES
gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMES
gEfiLegacyBiosProtocolGuid ## SOMETIMES_CONSUMES
gEfiCpuArchProtocolGuid ## CONSUMES
gEfiDevicePathProtocolGuid ## CONSUMES
gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES
gEfiUgaDrawProtocolGuid |gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## SOMETIMES_CONSUMES
gEfiOEMBadgingProtocolGuid ## SOMETIMES_CONSUMES
gEfiHiiFontProtocolGuid ## CONSUMES
gEfiUserManagerProtocolGuid ## SOMETIMES_CONSUMES
gEfiUsbIoProtocolGuid ## SOMETIMES_CONSUMES
gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES
[FeaturePcd]
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootlogoOnlyEnable ## CONSUMES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderLoad ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdProgressCodeOsLoaderStart ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable ## CONSUMES
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile ## CONSUMES
#
# [BootMode]
# RECOVERY_FULL ## SOMETIMES_CONSUMES # Memory Type Information variable
#