This commit is contained in:
Gerd Hoffmann 2026-08-26 22:50:23 +00:00 committed by GitHub
commit 8bdc0452e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View file

@ -83,6 +83,7 @@
[FeaturePcd]
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported
[Depex]
TRUE

View file

@ -76,6 +76,7 @@
[FeaturePcd]
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported
[Depex]
TRUE

View file

@ -73,6 +73,7 @@
[FeaturePcd]
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported
[Depex]
TRUE

View file

@ -284,6 +284,14 @@ QemuFlashInitialize (
if (!QemuFlashDetected ()) {
ASSERT (!FeaturePcdGet (PcdSmmSmramRequire));
return EFI_WRITE_PROTECTED;
} else {
if (!FeaturePcdGet (PcdSmmSmramRequire) && FeaturePcdGet (PcdSecureBootSupported)) {
DEBUG ((DEBUG_ERROR, "ERROR: This VM configuration is not secure.\n"));
DEBUG ((DEBUG_ERROR, "When using secure boot and storing UEFI variables in pflash SMM mode\n"));
DEBUG ((DEBUG_ERROR, "must be used to prevent unauthorized updates of secure boot variables.\n"));
ASSERT (FeaturePcdGet (PcdSmmSmramRequire) || !FeaturePcdGet (PcdSecureBootSupported));
CpuDeadLoop ();
}
}
return EFI_SUCCESS;