OvmfPkg/PlatformPei: record "etc/msr_feature_control" presence explicitly

A zero "FeatureControlValue" currently means "no feature control, or
feature control with zero value". Distinguish both cases by explicitly
recording the presence of the "etc/msr_feature_control" fw_cfg file. This
will be helpful later in this series, when we won't want to touch fw_cfg
again, but still know if "etc/msr_feature_control" was read OK.

Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
This commit is contained in:
Laszlo Ersek
2025-07-03 18:36:01 +02:00
committed by Laszlo Ersek
parent c27552f343
commit c37e2d38d6
2 changed files with 2 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ typedef struct {
UINT32 S3AcpiReservedMemoryBase;
UINT32 S3AcpiReservedMemorySize;
BOOLEAN FeatureControl;
UINT64 FeatureControlValue;
BOOLEAN QemuFwCfgChecked;

View File

@@ -143,6 +143,7 @@ InstallFeatureControlCallback (
return;
}
PlatformInfoHob->FeatureControl = TRUE;
QemuFwCfgSelectItem (FwCfgItem);
QemuFwCfgReadBytes (
sizeof (PlatformInfoHob->FeatureControlValue),