From nobody Tue Feb 10 14:33:55 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+68778+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+68778+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1607957211; cv=none; d=zohomail.com; s=zohoarc; b=adhoXYHNyUPzBVWxtZPsMeZNMP8CqamcsfHkJbMA9jcdOFesMtJH3iqUgcDOBESYy2oTNjON7yWLq9xOufkebG1Ye5qbBqyAPBtVYfngzsiCqG7k2yvFN0+AA5WJOtaaa3cDm+vwQTyo8f5mCjesmWF7jDT9iWaG1v5k4/HEZoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607957211; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=qO2WGcCj867ujSm85KepMQ8Ws6TuTmhoximQQBkqedI=; b=YHAyh/xt+lDJy00wn3ocWl7eGeAMwFw5p/gt13kOtF9G1kjWRwlcxt8Msjk4XKMJe+syl79XlGqe33+H51WUa5nSnomBcOUV2vqe5+qDYNYA+6SWlVp9aTMcLaTwYwXk18dhB+wOAaeP5guI0AQGFh9VQ8VeEVXAS/J0iSkTgl0= 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+68778+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 1607957210431416.12838387241675; Mon, 14 Dec 2020 06:46:50 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 29QPYY1788612xzWuyEa8GUs; Mon, 14 Dec 2020 06:46:46 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.35889.1607956978065693287 for ; Mon, 14 Dec 2020 06:42:58 -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 C611230E; Mon, 14 Dec 2020 06:42:57 -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 D05B43F66E; Mon, 14 Dec 2020 06:42:55 -0800 (PST) From: "Sughosh Ganu" To: devel@edk2.groups.io Cc: Sami Mujawar , Ard Biesheuvel , Leif Lindholm , Sahil Malhotra , Ilias Apalodimas Subject: [edk2-devel] [PATCH v2 12/13] MdeModulePkg/VariableStandaloneMm: Set PcdFlashNvStorageVariableBase to Pcd Date: Mon, 14 Dec 2020 20:12:15 +0530 Message-Id: <20201214144216.26328-13-sughosh.ganu@linaro.org> In-Reply-To: <20201214144216.26328-1-sughosh.ganu@linaro.org> References: <20201214144216.26328-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: SqjSr6RJfkKWHE3H4F2i0ztCx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607957206; bh=VRsyFySPyzVXv6X3ZNg+POyzL9q26SS1YklutVyGHI4=; h=Cc:Date:From:Reply-To:Subject:To; b=WFz37rOEj5xebyUZBVbHAGDpJ9ywiugjRYt8mqXsGqIPGMgTdufvWXHXDlYxEssmASH QdVWUgN+brfUllQAojF31qDA4n/JGHXlDoIfryu9yupMvc06uRGVfDYgLfj2m8KL4I4Th 99FimDCkvaqQ6U3vdc1rKkONJVyl+eUEGHU= 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. Signed-off-by: Ilias Apalodimas Reviewed-by: Sami Mujawar --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 6 ++= ++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneM= m.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 =20 -[FixedPcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES + +[FixedPcd] 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 (#68778): https://edk2.groups.io/g/devel/message/68778 Mute This Topic: https://groups.io/mt/78951512/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-