On 12/01/17 09:51, Ard Biesheuvel wrote: > On 30 November 2017 at 16:30, Laszlo Ersek <ler...@redhat.com> wrote: >> (All of the below is only relevant for SMM_REQUIRE=FALSE.) >> >> 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. >> >> In addition, QemuFlashFvbServicesRuntimeDxe is always launched before >> EmuVariableFvbRuntimeDxe, so that if flash variables are available, >> QemuFlashFvbServicesRuntimeDxe can set PcdFlashNvStorageVariableBase64 >> first, and EmuVariableFvbRuntimeDxe can exit early. This ordering is >> currently enforced by adding QemuFlashFvbServicesRuntimeDxe to the APRIORI >> DXE file. >> >> All of this is unnecessary when MEM_VARSTORE_EMU_ENABLE is set to FALSE. >> In such a build, >> >> - (almost) remove the dynamic default for PcdEmuVariableNvStoreReserved >> (we can't really do this because the PcdSet64() in >> ReserveEmuVariableNvStore() wouldn't compile), >> > > If that is the only concern, and the value is irrelevant, you could > make it a patchable PCD instead
This sounds interesting; I've never used patchable PCDs. Can you please elaborate? Do you mean that for (SMM_REQUIRE==TRUE || MEM_VARSTORE_EMU_ENABLE==FALSE), the DSC file should list PcdEmuVariableNvStoreReserved somewhere else? Does PcdSet work on patchable PCDs? Thanks! Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel