From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.503.1610691286499009001 for ; Thu, 14 Jan 2021 22:14:46 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: linaro.org, ip: 217.140.110.172, mailfrom: sughosh.ganu@linaro.org) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3223FED1; Thu, 14 Jan 2021 22:14:46 -0800 (PST) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A27A3F70D; Thu, 14 Jan 2021 22:14:44 -0800 (PST) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Sahil Malhotra , Ilias Apalodimas Subject: [PATCH v3 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Date: Fri, 15 Jan 2021 11:44:03 +0530 Message-Id: <20210115061404.13552-13-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210115061404.13552-1-sughosh.ganu@linaro.org> References: <20210115061404.13552-1-sughosh.ganu@linaro.org> From: Ilias Apalodimas Instead of running StMM in SPM, 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 Reviewed-by: Sami Mujawar --- Changes since V2: None 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 fada0bf3c5..2a25fbdada 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf @@ -119,10 +119,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