mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformPei: don't allocate reserved mem varstore if SMM_REQUIRE
For the emulated variable store, PlatformPei allocates reserved memory (as early as possible, so that the address remains the same during reboot), and PcdEmuVariableNvStoreReserved carries the address to EmuVariableFvbRuntimeDxe. However, EmuVariableFvbRuntimeDxe is excluded from the SMM_REQUIRE build, and then noone consumes PcdEmuVariableNvStoreReserved. Don't waste reserved memory whenever that's the case. (Even a dynamic default for PcdEmuVariableNvStoreReserved would be unnecessary; but that way the PcdSet64S() call in the ReserveEmuVariableNvStore() function doesn't compile.) Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
62f43f7c19
commit
5e167d7e78
|
@ -495,7 +495,10 @@
|
|||
################################################################################
|
||||
|
||||
[PcdsDynamicDefault]
|
||||
# only set when
|
||||
# ($(SMM_REQUIRE) == FALSE)
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
|
||||
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
||||
|
|
|
@ -501,7 +501,10 @@
|
|||
################################################################################
|
||||
|
||||
[PcdsDynamicDefault]
|
||||
# only set when
|
||||
# ($(SMM_REQUIRE) == FALSE)
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
|
||||
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
||||
|
|
|
@ -500,7 +500,10 @@
|
|||
################################################################################
|
||||
|
||||
[PcdsDynamicDefault]
|
||||
# only set when
|
||||
# ($(SMM_REQUIRE) == FALSE)
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
|
||||
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0
|
||||
|
|
|
@ -672,7 +672,9 @@ InitializePlatform (
|
|||
mHostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID);
|
||||
|
||||
if (mBootMode != BOOT_ON_S3_RESUME) {
|
||||
ReserveEmuVariableNvStore ();
|
||||
if (!FeaturePcdGet (PcdSmmSmramRequire)) {
|
||||
ReserveEmuVariableNvStore ();
|
||||
}
|
||||
PeiFvInitialization ();
|
||||
MemMapInitialization ();
|
||||
NoexecDxeInitialization ();
|
||||
|
|
Loading…
Reference in New Issue