audk/OvmfPkg/QemuFlashFvbServicesRuntimeDxe
Laszlo Ersek b0ed7ebdeb OvmfPkg: set fixed FlashNvStorage base addresses with -D SMM_REQUIRE
The following flash-related base addresses:

- PcdFlashNvStorageVariableBase64,
- PcdFlashNvStorageFtwWorkingBase,
- PcdFlashNvStorageFtwSpareBase,

are always set to constant (invariable) values in the "-D SMM_REQUIRE"
build of OVMF. (That's because in the SMM build, actual pflash is a hard
requirement, and the RAM-based emulation is never available.)

Set said PCDs statically, at build. This will allow us to depend on their
values in the PEI phase.

When SMM_REQUIRE is FALSE, this change has no effect (confirmed by report
file comparison).

When SMM_REQUIRE is TRUE, the report file shows the following changes:

- "PcdOvmfFlashNvStorageFtwSpareBase" and
  "PcdOvmfFlashNvStorageFtwWorkingBase" are no longer consumed by any
  module directly,

- for "PcdFlashNvStorageFtwSpareBase", "PcdFlashNvStorageFtwWorkingBase"
  and "PcdFlashNvStorageVariableBase64", the access method changes from
  DYN to FIXED,

- for the latter PCDs, the zero (dynamic default) values are replaced with
  the desired constants.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=386
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200310222739.26717-4-lersek@redhat.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
2020-03-12 21:14:46 +00:00
..
FvbInfo.c OvmfPkg/Qemu: Fix various typos 2020-02-10 22:30:07 +00:00
FvbServicesRuntimeDxe.inf OvmfPkg/QemuFlashFvbServicesRuntimeDxe: drop unused PCDs 2020-03-12 21:14:46 +00:00
FvbServicesSmm.inf OvmfPkg: set fixed FlashNvStorage base addresses with -D SMM_REQUIRE 2020-03-12 21:14:46 +00:00
FwBlockService.c OvmfPkg/QemuFlashFvbServices: factor out SetPcdFlashNvStorageBaseAddresses 2020-03-12 21:14:46 +00:00
FwBlockService.h OvmfPkg/QemuFlashFvbServices: factor out SetPcdFlashNvStorageBaseAddresses 2020-03-12 21:14:46 +00:00
FwBlockServiceDxe.c OvmfPkg/QemuFlashFvbServices: factor out SetPcdFlashNvStorageBaseAddresses 2020-03-12 21:14:46 +00:00
FwBlockServiceSmm.c OvmfPkg: set fixed FlashNvStorage base addresses with -D SMM_REQUIRE 2020-03-12 21:14:46 +00:00
QemuFlash.c OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
QemuFlash.h OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
QemuFlashDxe.c OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
QemuFlashSmm.c OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00