From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EF40A80331 for ; Tue, 14 Mar 2017 16:33:00 -0700 (PDT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8CD2A85547; Tue, 14 Mar 2017 23:33:01 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-194.phx2.redhat.com [10.3.116.194]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2ENWpwZ006449; Tue, 14 Mar 2017 19:33:00 -0400 From: Laszlo Ersek To: edk2-devel-01 Cc: Jordan Justen Date: Wed, 15 Mar 2017 00:32:37 +0100 Message-Id: <20170314233246.17864-6-lersek@redhat.com> In-Reply-To: <20170314233246.17864-1-lersek@redhat.com> References: <20170314233246.17864-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 14 Mar 2017 23:33:01 +0000 (UTC) Subject: [PATCH 05/14] OvmfPkg: introduce PcdMemVarstoreEmuEnable feature flag X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 23:33:01 -0000 ... and the corresponding MEM_VARSTORE_EMU_ENABLE build define, which defaults to TRUE. Setting the build flag to FALSE will later enable the exclusion of the dynamically allocated, emulated, in-memory varstore. Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec | 6 ++++++ OvmfPkg/OvmfPkgIa32.dsc | 4 ++++ OvmfPkg/OvmfPkgIa32X64.dsc | 4 ++++ OvmfPkg/OvmfPkgX64.dsc | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 5627be0bab0a..3c39a3b79894 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -148,3 +148,9 @@ [PcdsFeatureFlag] # runtime OS from tampering with firmware structures (special memory ranges # used by OVMF, the varstore pflash chip, LockBox etc). gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|FALSE|BOOLEAN|0x1e + + ## This feature flag reports whether in-memory (that is, non-flash) variable + # emulation is enabled. Note that with PcdSmmSmramRequire set to TRUE, this + # setting is irrelevant, as SMM/SMRAM support always requires flash + # variables. + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|TRUE|BOOLEAN|3 diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 8e88744087e0..c3d7d146ecb7 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE = FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE [BuildOptions] GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG @@ -385,6 +386,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 18348d8e9c58..55a6c66e986d 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE = FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE [BuildOptions] GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG @@ -390,6 +391,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 76dd72a0d0d0..400c96ee4b0f 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE = FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE [BuildOptions] GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG @@ -390,6 +391,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 -- 2.9.3