From nobody Tue Feb 10 13:17:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71826+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71826+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1613716608; cv=none; d=zohomail.com; s=zohoarc; b=hMqar1EPyJAqUKu+WhF3jnXmLz877I6lU7p0ue3DkSh42sT4F7d1hHwe9qZITR/+tYgN451q3W49x8P9GaMpiQwcI45BO0rmGeIwNX0+A/rPv2igX7khq/5UuKfw4RvoHHKycUfIxMw5hYPKjXlpxW89mocGDVCbBXt9edvlXqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613716608; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=G2mcmibobGDalMaLe5oiAsVT+7HXERtPCgpREkEJgl0=; b=HDQpWpVpwjNAhIm/BKfV+KxLSHDT+NJlwradOWQivoKwDEMjyR4OxnnyAFu1CssSb5WXq7dE8siFIZkEyRKttUuaOnWa4D91YRGZ9SDTDPK82LXP+LyBozbnyPzadNRXwYApXq+PbarRCOp0/jg3cl59sgE33/zuVPxUwfXgYYE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71826+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16137166079931000.1241932434045; Thu, 18 Feb 2021 22:36:47 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fqMfYY1788612xf0FXrng42u; Thu, 18 Feb 2021 22:36:47 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.5257.1613716607114954821 for ; Thu, 18 Feb 2021 22:36:47 -0800 X-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 C1EF11FB; Thu, 18 Feb 2021 22:36:46 -0800 (PST) X-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 5775C3F73B; Thu, 18 Feb 2021 22:36:45 -0800 (PST) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Sami Mujawar , Ilias Apalodimas , Ard Biesheuvel Subject: [edk2-devel] [PATCH v5 13/14] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Date: Fri, 19 Feb 2021 12:06:06 +0530 Message-Id: <20210219063607.27920-14-sughosh.ganu@linaro.org> In-Reply-To: <20210219063607.27920-1-sughosh.ganu@linaro.org> References: <20210219063607.27920-1-sughosh.ganu@linaro.org> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sughosh.ganu@linaro.org X-Gm-Message-State: NF1FsiGg2jn4cmBJmt7mHPkBx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613716607; bh=bFtTji2HfwTubl8sRbaxdJ2JOsMtkxST7QIKCv/kX5s=; h=Cc:Date:From:Reply-To:Subject:To; b=cAPOecZ+FLSX4cd917CD+sYv45dibpjdZ5kiujkEKGtIcHSiZpvfwikxYvpE/aBvGYp bbKGyFPiIYr1Zl745PaXetHpCu2DTO7aOhCog80tVgrAgsB3KBEqkOxj+w0FQCOKvkfRy 8ljyluw8aybhywiY8bkx4f0j9WrVCG9GlC8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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. While at it, move the rest of the variables under Pcd section, instead of FixedPcd -- this is in line with how the variables are defined in the other Variable modules. Signed-off-by: Ilias Apalodimas Reviewed-by: Sami Mujawar Reviewed-by: Liming Gao --- Changes since V4: * Define all variable Pcd's under the [Pcd] section instead of [FixedPcd], as suggested by Liming Gao MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 4 ++= -- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneM= m.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf index fada0bf3c5..d8c4f77e7f 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf @@ -119,10 +119,10 @@ ## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag" gEdkiiVarErrorFlagGuid =20 -[FixedPcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## CO= NSUMES --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71826): https://edk2.groups.io/g/devel/message/71826 Mute This Topic: https://groups.io/mt/80750058/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-