From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.2277.1628646734925607232 for ; Tue, 10 Aug 2021 18:52:15 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 11 Aug 2021 09:51:55 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Etienne Carriere'" , , "'Sami Mujawar'" Cc: "'Achin Gupta'" , "'Ard Biesheuvel'" , "'Jiewen Yao'" , "'Leif Lindholm'" , "'Sughosh Ganu'" References: <20210809151946.27600-1-etienne.carriere@linaro.org> <20210809151946.27600-2-etienne.carriere@linaro.org> In-Reply-To: <20210809151946.27600-2-etienne.carriere@linaro.org> Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjUgMi81XSBBcm1Qa2c6IHByZXBhcmUgMzJiaXQgQVJNIGJ1aWxkIG9mIFN0YW5kYWxvbmVNbVBrZw==?= Date: Wed, 11 Aug 2021 09:51:56 +0800 Message-ID: <005401d78e53$77bc0700$67341500$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGKBrbCKJQj6JIluJDw/fVXxQLsUAGLlj4aq/w8VZA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Etienne: Thanks for your update. This version should pass CI.=20 Sami: Can you help review the updated patch? So, it can still catch this = stable tag. Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Etienne Carriere > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA8=D4=C29=C8=D5 23:20 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Achin Gupta ; Ard Biesheuvel > ; Jiewen Yao ; Leif > Lindholm ; Sami Mujawar ; > Sughosh Ganu ; Liming Gao > ; Etienne Carriere = > =D6=F7=CC=E2: [PATCH v5 2/5] ArmPkg: prepare 32bit ARM build of = StandaloneMmPkg >=20 > Changes in ArmPkg to prepare building StandaloneMm firmware for > 32bit Arm architectures. >=20 > Adds ArmmmuStandaloneMmLib library to the list of the standard > components build for ArmPkg on when ARM architectures. >=20 > Changes path of source file AArch64/ArmMmuStandaloneMmLib.c > and compile it for both 32bit and 64bit architectures. >=20 > Signed-off-by: Etienne Carriere > --- > Changes since v4: > - Remove changes related to MmCommunicationDxe and ArmMmuPeiLib > since > they currently don't need to be built for ARM targets. > - Remove review tags applied to patch v3. >=20 > Changes since v3: > - Remove Cc tags and apply review tag. >=20 > No change since v2 > No change since v1 > --- > ArmPkg/ArmPkg.dec > | 2 +- > ArmPkg/ArmPkg.dsc > | 2 ++ > ArmPkg/Library/StandaloneMmMmuLib/{AArch64 > =3D> }/ArmMmuStandaloneMmLib.c | 15 ++++++++------- > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > | 6 +++--- > 4 files changed, 14 insertions(+), 11 deletions(-) >=20 > diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec > index 214b2f5892..6ed51edd03 100644 > --- a/ArmPkg/ArmPkg.dec > +++ b/ArmPkg/ArmPkg.dec > @@ -137,7 +137,7 @@ > # hardware coherency (i.e., no virtualization or cache coherent = DMA) >=20 > gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|FALSE|BOO > LEAN|0x00000043 >=20 > -[PcdsFeatureFlag.AARCH64] > +[PcdsFeatureFlag.AARCH64, PcdsFeatureFlag.ARM] > ## Used to select method for requesting services from = S-EL1.

> # TRUE - Selects FF-A calls for communication between S-EL0 and > SPMC.
> # FALSE - Selects SVC calls for communication between S-EL0 and > SPMC.
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc > index 926986cf7f..8abe3713c8 100644 > --- a/ArmPkg/ArmPkg.dsc > +++ b/ArmPkg/ArmPkg.dsc > @@ -161,4 +161,6 @@ > [Components.AARCH64] > ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf > ArmPkg/Library/ArmMmuLib/ArmMmuPeiLib.inf > + > +[Components.AARCH64, Components.ARM] > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > diff --git > a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMm > Lib.c b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > similarity index 92% > rename from > ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib > .c > rename to > ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > index dd014beec8..20f873e680 100644 > --- > a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMm > Lib.c > +++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c > @@ -2,6 +2,7 @@ > File managing the MMU for ARMv8 architecture in S-EL0 >=20 > Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
> + Copyright (c) 2021, Linaro Limited > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @par Reference(s): > @@ -62,7 +63,7 @@ SendMemoryPermissionRequest ( > // for other Direct Request calls which are not atomic > // We therefore check only for Direct Response by the > // callee. > - if (SvcArgs->Arg0 =3D=3D > ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP_AARCH64) { > + if (SvcArgs->Arg0 =3D=3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_RESP) { > // A Direct Response means FF-A success > // Now check the payload for errors > // The callee sends back the return value > @@ -164,13 +165,13 @@ GetMemoryPermissions ( > ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS)); > if (FeaturePcdGet (PcdFfaEnable)) { > // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ. > - SvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64; > + SvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ; > SvcArgs.Arg1 =3D ARM_FFA_DESTINATION_ENDPOINT_ID; > SvcArgs.Arg2 =3D 0; > - SvcArgs.Arg3 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg3 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES; > SvcArgs.Arg4 =3D BaseAddress; > } else { > - SvcArgs.Arg0 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg0 =3D ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES; > SvcArgs.Arg1 =3D BaseAddress; > SvcArgs.Arg2 =3D 0; > SvcArgs.Arg3 =3D 0; > @@ -219,15 +220,15 @@ RequestMemoryPermissionChange ( > ZeroMem (&SvcArgs, sizeof (ARM_SVC_ARGS)); > if (FeaturePcdGet (PcdFfaEnable)) { > // See [2], Section 10.2 FFA_MSG_SEND_DIRECT_REQ. > - SvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ_AARCH64; > + SvcArgs.Arg0 =3D ARM_SVC_ID_FFA_MSG_SEND_DIRECT_REQ; > SvcArgs.Arg1 =3D ARM_FFA_DESTINATION_ENDPOINT_ID; > SvcArgs.Arg2 =3D 0; > - SvcArgs.Arg3 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg3 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES; > SvcArgs.Arg4 =3D BaseAddress; > SvcArgs.Arg5 =3D EFI_SIZE_TO_PAGES (Length); > SvcArgs.Arg6 =3D Permissions; > } else { > - SvcArgs.Arg0 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64; > + SvcArgs.Arg0 =3D ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES; > SvcArgs.Arg1 =3D BaseAddress; > SvcArgs.Arg2 =3D EFI_SIZE_TO_PAGES (Length); > SvcArgs.Arg3 =3D Permissions; > diff --git > a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > index 6c71fe0023..ff20e58980 100644 > --- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > +++ > b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf > @@ -16,14 +16,14 @@ > LIBRARY_CLASS =3D StandaloneMmMmuLib > PI_SPECIFICATION_VERSION =3D 0x00010032 >=20 > -[Sources.AARCH64] > - AArch64/ArmMmuStandaloneMmLib.c > +[Sources] > + ArmMmuStandaloneMmLib.c >=20 > [Packages] > ArmPkg/ArmPkg.dec > MdePkg/MdePkg.dec >=20 > -[FeaturePcd.AARCH64] > +[FeaturePcd.ARM, FeaturePcd.AARCH64] > gArmTokenSpaceGuid.PcdFfaEnable >=20 > [LibraryClasses] > -- > 2.17.1