From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::241; helo=mail-io0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D8403220D4C1E for ; Fri, 1 Dec 2017 00:39:49 -0800 (PST) Received: by mail-io0-x241.google.com with SMTP id g1so10451268ioc.8 for ; Fri, 01 Dec 2017 00:44:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ehJ306Lb1OQiJae+P7tNhBeCmL8L2jTScpyJFmiea2E=; b=a/NKgngXFyAnLWd/vT7Ey1gCEDBnO4mI4wLx0Oy5I5hsI6b9j54huZoh2LewS/aXvc tA8r5DgpLvl53/KKDEjm+/AMqPKeh2mCTiVGkATkYZs0ad/+mEaDXz4/zv2wBvxE/CbD gYng7RMJxHwfv2lLVyHrhQ76W6xbHtP2MqBQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ehJ306Lb1OQiJae+P7tNhBeCmL8L2jTScpyJFmiea2E=; b=o5bVZ8ig6r6/tBrS+vp7xBW8GPrH0WJOYuCM23vNQ+E2C1fEtR7y3G8O1mQSdcVljU p7IqRrwsdvVxIJgVcQmZB2iYMKO9uLIblGzxZtZmhfJl+NF+JTV3kobjhiavO7ZEwhxw OOWRsIXPiTI9L0G7//mvsUILHbm6nMCU32nlnOM09lsNJFEcViUmxPkQo9o9HsZ74LlI Eu8vtW11sfd1rnW9V2K1qWba9DECGP2WPUI59f/uwGJDHJTehM/25mSpm4kzQQ2qkSHp IlJo9xOLrS9Sm4S9ka7914UD+MSS/YxWNQU6Ui6UGT8vPcTC2H+Lo/HOb5UB4QVZdBS3 LVGQ== X-Gm-Message-State: AJaThX4m+zPZQjq7j0K392GHgDzwzARMRYHBWcs8G+yV5XOtrZKSD2r7 zstPRU/Pz3R/xf5cM/WKA5haUqFqXINNha1U2AIZBg== X-Google-Smtp-Source: AGs4zMYheei7En553TPYc1ENo9zrYywewextMj/0ZHNQ6PrXFvyQeh7d7J+3bR5kIW7EzRakkpvztonLrXBsw24NXhk= X-Received: by 10.107.178.145 with SMTP id b139mr11551963iof.52.1512117855295; Fri, 01 Dec 2017 00:44:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Fri, 1 Dec 2017 00:44:14 -0800 (PST) In-Reply-To: <20171130163029.19743-2-lersek@redhat.com> References: <20171130163029.19743-1-lersek@redhat.com> <20171130163029.19743-2-lersek@redhat.com> From: Ard Biesheuvel Date: Fri, 1 Dec 2017 08:44:14 +0000 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Anthony Perard , Jordan Justen , Julien Grall Subject: Re: [PATCH v2 1/8] OvmfPkg: introduce PcdMemVarstoreEmuEnable feature flag X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Dec 2017 08:39:50 -0000 Content-Type: text/plain; charset="UTF-8" On 30 November 2017 at 16:30, Laszlo Ersek wrote: > ... 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: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > 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 27bcfc141e5a..f03dd7e27d6b 100644 > --- a/OvmfPkg/OvmfPkg.dec > +++ b/OvmfPkg/OvmfPkg.dec > @@ -150,3 +150,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 9d23f8c162e4..443da553d0a3 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 > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -410,6 +411,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 a9c667fed8b0..0fc81743bac4 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 > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -415,6 +416,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 abf570512a38..db33be4bc0b7 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 > > # > # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to > @@ -415,6 +416,9 @@ [PcdsFeatureFlag] > gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE > !endif > +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE > + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE > +!endif > > [PcdsFixedAtBuild] > gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 > -- > 2.14.1.3.gb7cf6e02401b > >