[edk2-devel] [PATCH v1 11/12] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd

Sami Mujawar sami.mujawar at arm.com
Mon Nov 23 13:52:51 UTC 2020


Reviewed-by: Sami Mujawar <sami.mujawar at arm.com>

Regards,

Sami Mujawar

-----Original Message-----
From: Sughosh Ganu <sughosh.ganu at linaro.org> 
Sent: 21 October 2020 12:33 PM
To: devel at edk2.groups.io
Cc: Ard Biesheuvel <Ard.Biesheuvel at arm.com>; Sami Mujawar <Sami.Mujawar at arm.com>; Jiewen Yao <jiewen.yao at intel.com>; Ilias Apalodimas <ilias.apalodimas at linaro.org>
Subject: [PATCH v1 11/12] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd

From: Ilias Apalodimas <ilias.apalodimas at linaro.org>

Instead of running StMM as a SP, OP-TEE creates a new secure partition,
which emulates SPM and isolates StMM from the rest of the Trusted
Applications (TAs). We can then compile StMM as an FD image and run it
in OP-TEE. With the addition of a new RPMB driver, we can leverage OP-TEE
and store variables to an RPMB device.

Since EDK2 upper layers expect byte addressable code, for the RPMB to
work, we need to allocate memory and sync it with the hardware on
read/writes. Since DynamicPCDs are not supported in that context we
can only use PatchablePCDs. So let's switch them to Pcd instead of
FixedPcd and accomodate the new driver.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
index 6e17f6cdf5..dfed7fe069 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
@@ -115,10 +115,12 @@
   ## SOMETIMES_PRODUCES   ## Variable:L"VarErrorFlag"
   gEdkiiVarErrorFlagGuid
 
-[FixedPcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize       ## CONSUMES
+[Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase       ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64     ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize       ## CONSUMES
+
+[FixedPcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize                  ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize              ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize          ## CONSUMES
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67804): https://edk2.groups.io/g/devel/message/67804
Mute This Topic: https://groups.io/mt/77703659/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list