In the PEI fw_cfg instance: - QemuFwCfgS3Enabled() queries S3 enablement via fw_cfg. This behavior is shared with the DXE fw_cfg instance, and the PEI fw_cfg instance already pulls in the function from "QemuFwCfgS3PeiDxe.c". - If QemuFwCfgS3Enabled() returns TRUE, the client module is permitted to call QemuFwCfgS3CallWhenBootScriptReady(). However, in the PEI phase we have no support for capturing ACPI S3 Boot Script opcodes, hence we return RETURN_UNSUPPORTED unconditionally. This behavior is unique to the PEI fw_cfg instance, so add the function to "QemuFwCfgS3Pei.c". - Consequently, the QemuFwCfgS3ScriptWriteBytes(), QemuFwCfgS3ScriptReadBytes(), QemuFwCfgS3ScriptSkipBytes(), and QemuFwCfgS3ScriptCheckValue() functions must never be called. (They could only be called from the client module's callback, but QemuFwCfgS3CallWhenBootScriptReady() will never install such callback in the PEI fw_cfg instance -- see above.) This behavior is not unique to the PEI fw_cfg instance (it is shared with the Base Null instance), so pull in these functions from "QemuFwCfgS3BasePei.c". Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=394 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
45 lines
1.3 KiB
INI
45 lines
1.3 KiB
INI
## @file
|
|
# Limited functionality QemuFwCfgS3Lib instance, for PEI phase modules.
|
|
#
|
|
# QemuFwCfgS3Enabled() queries S3 enablement via fw_cfg. Other library APIs
|
|
# will report lack of support.
|
|
#
|
|
# Copyright (C) 2017, Red Hat, Inc.
|
|
#
|
|
# 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 = 1.25
|
|
BASE_NAME = PeiQemuFwCfgS3LibFwCfg
|
|
FILE_GUID = DD8D28B4-C1DC-4CAF-BB93-074BE80DAE6D
|
|
MODULE_TYPE = PEIM
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = QemuFwCfgS3Lib|PEIM
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build
|
|
# tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 IPF EBC
|
|
#
|
|
|
|
[Sources]
|
|
QemuFwCfgS3BasePei.c
|
|
QemuFwCfgS3Pei.c
|
|
QemuFwCfgS3PeiDxe.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
DebugLib
|
|
QemuFwCfgLib
|