OvmfPkg: add PcdQemuVarsRequire
Add PcdQemuVarsRequire FeaturePcd, so firmware code can figure whenever the given build is supposed to use the qemu uefi variable service. Skip the emulated variable store setup in case PcdQemuVarsRequire is true. This is needed to make secure boot work. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
cd6f84b70c
commit
9af96e21d8
|
@ -464,3 +464,6 @@
|
|||
# framebuffer. This might be required on platforms that do not tolerate
|
||||
# misaligned accesses otherwise.
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdRemapFrameBufferWriteCombine|FALSE|BOOLEAN|0x75
|
||||
|
||||
## This feature flag indicates the firmware build needs the qemu variable service.
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuVarsRequire|FALSE|BOOLEAN|0x77
|
||||
|
|
|
@ -502,6 +502,7 @@
|
|||
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE
|
||||
!endif
|
||||
!if $(QEMU_PV_VARS) == TRUE
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuVarsRequire|TRUE
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE
|
||||
!endif
|
||||
!if $(SECURE_BOOT_ENABLE) == TRUE
|
||||
|
|
|
@ -221,6 +221,10 @@ ReserveEmuVariableNvStore (
|
|||
EFI_PHYSICAL_ADDRESS VariableStore;
|
||||
RETURN_STATUS PcdStatus;
|
||||
|
||||
if (FeaturePcdGet (PcdQemuVarsRequire)) {
|
||||
return;
|
||||
}
|
||||
|
||||
VariableStore = (EFI_PHYSICAL_ADDRESS)(UINTN)PlatformReserveEmuVariableNvStore ();
|
||||
PcdStatus = PcdSet64S (PcdEmuVariableNvStoreReserved, VariableStore);
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@
|
|||
|
||||
[FeaturePcd]
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
||||
gUefiOvmfPkgTokenSpaceGuid.PcdQemuVarsRequire
|
||||
|
||||
[Ppis]
|
||||
gEfiPeiMasterBootModePpiGuid
|
||||
|
|
Loading…
Reference in New Issue