audk/OvmfPkg/XenPlatformPei
Lin, Gary (HPS OE-Linux) cb0d24637d OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization
There are several functions in OvmfPkg/Library using
QemuFwCfgS3Enabled() to detect the S3 support status. However, in
MdeModulePkg, PcdAcpiS3Enable is used to check S3 support. Since
InitializeXenPlatform() didn't set PcdAcpiS3Enable as
InitializePlatform() did, this made the inconsistency between
drivers/functions.

For example, S3SaveStateDxe checked PcdAcpiS3Enable and skipped
S3BootScript because the default value is FALSE. On the other hand,
PlatformBootManagerBeforeConsole() from OvmfPkg/Library called
QemuFwCfgS3Enabled() and found it returned TRUE, so it invoked
SaveS3BootScript(). However, S3SaveStateDxe skipped S3BootScript, so
SaveS3BootScript() asserted due to EFI_NOT_FOUND.

This issue mainly affects "HVM Direct Kernel Boot". When used,
"fw_cfg" is enabled in QEMU and QemuFwCfgS3Enabled() returns true in
that case.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3573
Signed-off-by: Gary Lin <gary.lin@hpe.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Tested-by: Jim Fehlig <jfehlig@suse.com>
2021-08-31 11:07:16 +00:00
..
AmdSev.c OvmfPkg: Obtain SEV encryption mask with the new MemEncryptSevLib API 2021-01-07 19:34:39 +00:00
ClearCache.c OvmfPkg: Introduce XenPlatformPei 2019-08-21 18:03:49 +02:00
Cmos.c OvmfPkg: Introduce XenPlatformPei 2019-08-21 18:03:49 +02:00
Cmos.h OvmfPkg: Introduce XenPlatformPei 2019-08-21 18:03:49 +02:00
Fv.c OvmfPkg: Introduce XenPlatformPei 2019-08-21 18:03:49 +02:00
MemDetect.c OvmfPkg/XenPlatformPei: Use CPUID to get physical address width on Xen 2021-01-19 17:00:08 +00:00
Platform.c OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization 2021-08-31 11:07:16 +00:00
Platform.h OvmfPkg/OvmfXen: make "PcdPciDisableBusEnumeration" Fixed-at-Build 2021-06-04 16:01:50 +00:00
Xen.c OvmfPkg/XenPlatformPei: Relocate shared_info page mapping 2021-06-29 13:40:43 +00:00
Xen.h OvmfPkg: Introduce XenPlatformPei 2019-08-21 18:03:49 +02:00
XenPlatformPei.inf OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization 2021-08-31 11:07:16 +00:00