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>
82 lines
2.1 KiB
INI
82 lines
2.1 KiB
INI
## @file
|
|
# Component description file for QEMU Flash Firmware Volume Block SMM driver
|
|
# module.
|
|
#
|
|
# This SMM driver implements and produces the SMM Firmware Volue Block Protocol
|
|
# for a QEMU flash device.
|
|
#
|
|
# Copyright (C) 2015, Red Hat, Inc.
|
|
# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = FvbServicesSmm
|
|
FILE_GUID = 2E7DB7A7-608E-4041-B45F-00359E0766C6
|
|
MODULE_TYPE = DXE_SMM_DRIVER
|
|
VERSION_STRING = 1.0
|
|
PI_SPECIFICATION_VERSION = 0x0001000A
|
|
ENTRY_POINT = FvbInitialize
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build
|
|
# tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
FvbInfo.c
|
|
FwBlockService.c
|
|
FwBlockService.h
|
|
FwBlockServiceSmm.c
|
|
QemuFlash.c
|
|
QemuFlash.h
|
|
QemuFlashSmm.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
[LibraryClasses]
|
|
BaseLib
|
|
BaseMemoryLib
|
|
DebugLib
|
|
DevicePathLib
|
|
DxeServicesTableLib
|
|
MemoryAllocationLib
|
|
MemEncryptSevLib
|
|
PcdLib
|
|
SmmServicesTableLib
|
|
UefiBootServicesTableLib
|
|
UefiDriverEntryPoint
|
|
|
|
[Guids]
|
|
|
|
[Protocols]
|
|
gEfiSmmFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
|
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
|
|
|
[FixedPcd]
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize
|
|
|
|
[Pcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable
|
|
|
|
[FeaturePcd]
|
|
gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
|
|
|
|
[Depex]
|
|
TRUE
|