From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web12.4535.1613639846864398404 for ; Thu, 18 Feb 2021 01:17:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=xLEJzqKJ; spf=pass (domain: linaro.org, ip: 209.85.221.50, mailfrom: ilias.apalodimas@linaro.org) Received: by mail-wr1-f50.google.com with SMTP id v15so2089240wrx.4 for ; Thu, 18 Feb 2021 01:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=WHnT50EZas1M+/ymdWKBgS8GerPLRCz+MhJ4jIUB1gE=; b=xLEJzqKJ7QYPOiwjoJaHXfSAM1KCPD19QN3bZf7QzzqFYYIL5MZm/wh+MkAIqEFj2N c9volagBTg3kVzX7xb0ybaslYQBPzQTEym0keDHCDPc779UEAusjufiD6dMQQdUbyMWQ BA8a+1NNJSDReNpC3/MqCBx8C/gHEytOrYAz2iLl52czz9yJyqndQpOdaMCp0qX5OPRn Qy1T5XKMsx5kq31XvMVqKHrxXzK3IOogzu7u/qWT0FbegyRTDOiEDkqZWantFAYtqxvN J33nM26MjV1E66q/qNYQkB6d2I8s5IbWdkYHGbet55XMEl5ZuWMkyGNs8K0YRCRa8rvU CXgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=WHnT50EZas1M+/ymdWKBgS8GerPLRCz+MhJ4jIUB1gE=; b=PbrwfazcjCqxNvFzXKGTWOzMRzCRhXA/Qnn/yeyaUzQEFicif/C0phBwMp464A/p6o Tc8SvYg/B8WMpgDdNj07I4CykwHb73i2l/Tz3xlO6jrE461Kv8pmQ/9rEzUj1DF7+77m zCij4C/YtHP90eH7/BvW9ZV76wc1B0/Ja5QwzVPBdvUpu+lnqhc1xjgS4S+/jmg7GHVv 4fPX3IKvgIX8G0Nm7BxACXv4APLhRwZxkO6cFnnvtcb4TUk0uscZt/+1mr7+fJbrsc6q Wqrv+SY2DhlkrDRvJa5WX3rrV6QdVPLUSzg3NVlKdlyNiIQp1KLlHyFrMVanjrF7y7A8 s6vQ== X-Gm-Message-State: AOAM530f9/a1Osf0FBaiy8hG6y78mxGq1fBLdOUcKX3fS0OAMUibg++g 2N3pApb9Z4LCOVJlbm0gHLTSsHUDPhRc2M1k X-Google-Smtp-Source: ABdhPJwaG2NR0a4u/vl3u9jNt/5n/sdGoSkuI5vnz3UObYYp0aRAdtVyN6SoGQDom72zPElh/E+vgQ== X-Received: by 2002:adf:f7c5:: with SMTP id a5mr3311992wrq.243.1613639845352; Thu, 18 Feb 2021 01:17:25 -0800 (PST) Return-Path: Received: from enceladus (ppp-94-64-113-158.home.otenet.gr. [94.64.113.158]) by smtp.gmail.com with ESMTPSA id t2sm7284855wru.53.2021.02.18.01.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 01:17:25 -0800 (PST) Date: Thu, 18 Feb 2021 11:17:22 +0200 From: "Ilias Apalodimas" To: devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: sughosh.ganu@linaro.org, 'Sami Mujawar' , 'Ard Biesheuvel' Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCB2NCAxMy8xNF0gTWRlTW9kdWxlUGtnL1ZhcmlhYmxlU3RhbmRhbG9uZU1tOiBTZXQgUGNkRmxhc2hOdlN0b3JhZ2VWYXJpYWJsZUJhc2UgdG8gUGNk?= Message-ID: References: <20210217112717.6820-1-sughosh.ganu@linaro.org> <20210217112717.6820-14-sughosh.ganu@linaro.org> <000901d705a4$02f958b0$08ec0a10$@byosoft.com.cn> MIME-Version: 1.0 In-Reply-To: <000901d705a4$02f958b0$08ec0a10$@byosoft.com.cn> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Feb 18, 2021 at 11:13:21AM +0800, gaoliming wrote: > I suggest to directly change [FixedPcd] to [Pcd] section. All Pcds can > support FixedAtBuild and PatchableInModule. We can, but is there a reason to do that? Wouldn't we be better of being more strict on the Pcd context we define for each variable? The values that were swapped from FixedPcd to Pcd are expected to change in runtime, while the rest don't. Thanks /Ilias > > With this change, Reviewed-by: Liming Gao > > Thanks > Liming > > -----邮件原件----- > > 发件人: bounce+27952+71734+4905953+8761045@groups.io > > 代表 Sughosh Ganu > > 发送时间: 2021年2月17日 19:27 > > 收件人: devel@edk2.groups.io > > 抄送: Sami Mujawar ; Ilias Apalodimas > > ; Ard Biesheuvel > > 主题: [edk2-devel] [PATCH v4 13/14] MdeModulePkg/VariableStandaloneMm: > > Set PcdFlashNvStorageVariableBase to Pcd > > > > 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 V3: None > > > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf > > | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.in > > f > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.in > > f > > index fada0bf3c5..2a25fbdada 100644 > > --- > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.in > > f > > +++ > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.in > > f > > @@ -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 > > > > > > > > > > > > > > > > > >