From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.47]) by mx.groups.io with SMTP id smtpd.web08.1565.1615487129038609069 for ; Thu, 11 Mar 2021 10:25:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=MrsMRjQZ; spf=pass (domain: arm.com, ip: 40.107.14.47, mailfrom: achin.gupta@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NTd7kF/Er6L7CdJvkvxcxIII4Ei30o/by38fz4XsPlc=; b=MrsMRjQZPvre921is3DDBXiFEAmmPwz9fmxnPLRoOd4LEvZg10vYnYnV7JNhRFMg0dJOy+Lpqt6Wco0DdZbxys1QJCemakA2Oz3l5WkrQvmDpyRSXFAaCr9S7EyosfW6qocSJlE4xGz2ovIuhUC28hSj8Qk4rl6wLu1/jtADJ+g= Received: from AM6P195CA0104.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:86::45) by VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 11 Mar 2021 18:25:25 +0000 Received: from VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:86:cafe::1a) by AM6P195CA0104.outlook.office365.com (2603:10a6:209:86::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Thu, 11 Mar 2021 18:25:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT028.mail.protection.outlook.com (10.152.18.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.31 via Frontend Transport; Thu, 11 Mar 2021 18:25:24 +0000 Received: ("Tessian outbound e7a0046930fb:v71"); Thu, 11 Mar 2021 18:25:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 905bdec08c38f367 X-CR-MTA-TID: 64aa7808 Received: from 21df3217dca4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 87156A1C-EFDF-4F89-8A9C-FA5CE649605C.1; Thu, 11 Mar 2021 18:25:18 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 21df3217dca4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 Mar 2021 18:25:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JolCvqslhjKRgel5IbOAqnXqkurUhZooFHdUwxebGFAjYqgPVpZMHPuf8reO11RcA5wlPRQx+4+R5rYKJfCuTq1UkVK+9EkJxNn5rLpRPvxGyQ6aufk3xsLEYfYa26OQvWUZDhQ0e7flyqh1OnyWORY66RFt9tcR8UJVmrCvL0ZcqJy2ZZmhsLYZooGj4gyaWB/QAJkQTR8aUlBWUyRJo5rmqNoRGTokIaXIA1QPQWfBkh7chAQ5cAxFLATcPbwamsKkDA3E7BmHN4vQdEH9bCjNCvMT3oKn2DPpIBfkB/xoYy1p6HdDErbuGJaENIZrL+1X0t2N/OuVjyzRBpCxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NTd7kF/Er6L7CdJvkvxcxIII4Ei30o/by38fz4XsPlc=; b=AYvgw8zqHPG5AOp+O/3nMtyZlP8ObNmOyJjSPk7nZ1mSOSPNm7lZcXjbQrNm0K0J7ZbFptbiPVHnYatgeyyndfEmA5BKi49quS8U9G0KmK9v2EAcKgUFe6lD+TvaiEJJlkmKom4O2YAanlKMSvKE9z4m2eu5hB2r5S/IIgjDi/abuzzc7ijOikr8omJGIYMB1sUkRBeH0bq9CPxDHE+VcAz2KIrLKWIVsTKGYdiX8CD/dlsTWWWRsTk2esPGHCs5qoeBMna4giJSWR5mwdifyWu2aC0NGU7HdKfBlpf+TFAX6TP5m4n7qn5+wspGbE+DWJXkUc2Ejd80OiAU7tvRnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NTd7kF/Er6L7CdJvkvxcxIII4Ei30o/by38fz4XsPlc=; b=MrsMRjQZPvre921is3DDBXiFEAmmPwz9fmxnPLRoOd4LEvZg10vYnYnV7JNhRFMg0dJOy+Lpqt6Wco0DdZbxys1QJCemakA2Oz3l5WkrQvmDpyRSXFAaCr9S7EyosfW6qocSJlE4xGz2ovIuhUC28hSj8Qk4rl6wLu1/jtADJ+g= Authentication-Results-Original: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=arm.com; Received: from AM5PR0801MB1857.eurprd08.prod.outlook.com (2603:10a6:203:4e::14) by AM5PR0802MB2577.eurprd08.prod.outlook.com (2603:10a6:203:a1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Thu, 11 Mar 2021 18:25:17 +0000 Received: from AM5PR0801MB1857.eurprd08.prod.outlook.com ([fe80::3888:fe59:c336:fbee]) by AM5PR0801MB1857.eurprd08.prod.outlook.com ([fe80::3888:fe59:c336:fbee%6]) with mapi id 15.20.3912.029; Thu, 11 Mar 2021 18:25:17 +0000 Date: Thu, 11 Mar 2021 18:25:09 +0000 From: Achin Gupta To: Ilias Apalodimas Cc: devel@edk2.groups.io, Pierre , Sami Mujawar , Ard Biesheuvel , Sughosh Ganu , Leif Lindholm , nd@arm.com Subject: Re: [edk2-devel] [PATCH 1/3 v6] Drivers/OpTeeRpmb: Add an OP-TEE backed RPMB driver Message-ID: References: <20210309140123.2992772-1-ilias.apalodimas@linaro.org> <20210309140123.2992772-2-ilias.apalodimas@linaro.org> <166AFBDD38991A80.19014@groups.io> In-Reply-To: X-Originating-IP: [84.71.168.248] X-ClientProxiedBy: LO4P123CA0335.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::16) To AM5PR0801MB1857.eurprd08.prod.outlook.com (2603:10a6:203:4e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from C02ZJ1BRLVDN (84.71.168.248) by LO4P123CA0335.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.26 via Frontend Transport; Thu, 11 Mar 2021 18:25:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c3b6635a-2dec-49db-fa73-08d8e4bb09e1 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2577:|VE1PR08MB5006: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: rH5ooP/QkiMQ7221KxXgPZntFB+XqG4FhuQOgbJ93ZKy2NUwAHoJupwhM81eYWO4ekYTJtC4VPkL8RNC79Tczwk79+Acmx88qXUx60POu2rsZUwBLsrVn7wUqU2SdvtrpcS/QFBDfo7H6iOJ/dtWVRPwiGM1vSnszPvv7hJ9PSgu24KbWR455J9CUaRhgVY1VWuf8VxoAFaKlwFeULZ97KstaDJSiSRxS0mwNhosI5AK6TG5zmNdAKaWXmOnJHYU59piOvzNy5Lwagm2cIGHJIn1AcnJM/TExF0XndcCdrDo++YZnfCceT0j5nON57Y9t2fTfcWts/7FDf9SAtljUHZWPyp4OYHJT35Gp0pfqO8VCzXUjCBBmGGf5CJHZDCILTrT+tNK8CmeLQWufk+bABXZMx0elPsaCsBmxQc5LpuF0FwKL3yn9btn6EfPwDg5afHrTGx+cH+c4Df2z+48Gi3kRLFLpckA2/fTmmM0rdc8uOgVeFE7otC2gfBUKDicC9e28hJCmszOC3zpYZcZMrC3ndAffkjg3YjE3mcAu6oB1UwzekJ43k44w5cXZ491pDSVC5nUO8obGfXuP5YAmA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM5PR0801MB1857.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(346002)(39840400004)(366004)(136003)(376002)(396003)(52116002)(8676002)(86362001)(6496006)(8936002)(6916009)(44832011)(33716001)(6666004)(478600001)(186003)(316002)(26005)(66946007)(19627235002)(2906002)(16526019)(66556008)(66476007)(54906003)(5660300002)(4326008)(83380400001)(956004)(9686003)(966005)(55016002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?QIhzYU3jRCNOMi4kiHxJsHjYBg471EnQuHIDypzuXztlg/DYivMP+lhWlhyZ?= =?us-ascii?Q?RMD3PVKFLcaoB2/hrDUUn03dG4E55itVz2rp6sunaR475RtjxOMlj9OExYDo?= =?us-ascii?Q?V+Ez0DeIFPUyc3gmmxDOKgdZY/S90Fnuyb8J1q5z4eqi8i1SCgoTj6uy6lcr?= =?us-ascii?Q?mTq1TsT0waldhhgYeeHhAY1RU+rtb19uVC+xH/GAvcavuJ5TzpIrx3lGSRwU?= =?us-ascii?Q?jx71mVPO9w7pbEDl4b386c1S+u0EJJqWkuhAWJ//weMOLPHG3A7oh5oIWC88?= =?us-ascii?Q?uy//xRoDv//reQ25Q143USJ9m5flZSxxxAV8vKAUgqn7Kf8tLh92S5l9317Z?= =?us-ascii?Q?D70QHHSma49m7dgKrZYJgWfVUgos9JrVqyTn9rF6jABtYIcGXbI+qrp3DVPG?= =?us-ascii?Q?MrQ67is5euaamAlQVRAdM5dsKuUJjt7xbufq31fF7aqAAVBiAlTBdAbcyvSV?= =?us-ascii?Q?T8vm326EKFTN/fqyDX5ZxIujWixNC/TspjU4uDZDfj6P6u/dB7c27z47UpPP?= =?us-ascii?Q?pBu7fHJQ5Ghb82NMprK4e/Y4sRDdihk+AWYLg+/3eFfhgmIM4GDqami00zlS?= =?us-ascii?Q?/w/abqv0G0mrKP7K2CshlgRIVN3azhfUDC5D9JBizNrFLulleETHe369CDOI?= =?us-ascii?Q?0oylX/Oo2UWlX1lnhbpSii5CNc9E/dvVVd3uBHhtupvoyvZKLU7Nj2Czw2JN?= =?us-ascii?Q?dlSx3h4+tSgQj0FeXLY7dbUiXyTfUywgnwtI626WAGpLO7/vXD4hzH1zyJUu?= =?us-ascii?Q?QbfUSFQV3BeYaC97Knni1Qj5eU+R/s74ejJVAsU1FXVI6jy/oUUrywr/Hwpa?= =?us-ascii?Q?hhagupQuWqRZIovA0fXIo2v9G9tOqqp9u8ZRrWessUWeieBvR11cNNDTOCc/?= =?us-ascii?Q?vlgPDFzMdp0brHxepS9/basH4cqBIHJbWNvCrVQAriJtTeftLvaTyIzv809w?= =?us-ascii?Q?fxXJtKDoK/MikId2OY1RPnvKsUS2ikV4y6IBKIHalJMAkoZcpQpodpiDQy31?= =?us-ascii?Q?5KgMKJjQFzfceT73+Tx4+JHX4aDXTUY3bKirJ00QVcODT+swTBE6V3S+P7Zy?= =?us-ascii?Q?aSBD8m3d43Bx3pwrxHD3ZEK+5CMVw64DS9W3iwDvQabWCNGaNC0TBD8XYTTS?= =?us-ascii?Q?9PoDISEbaq3C+/U7hogjuniMmrLpaj8hd85qiE0iMZZifTfd+kPPza5YgPdj?= =?us-ascii?Q?1EMxqdB/t8W6HiGOh+QydJ5SvfAzqPL8V6v6FXilG7ItT8d8V6dmZozaPd0h?= =?us-ascii?Q?LEscarQkkHocNUjklegyOP4Mw7UrWBqJIdVi+rUYMcIPvGsNP+KXiTwL7rWo?= =?us-ascii?Q?PFSIsJtral9Veh/cfEoYPEzf?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2577 Original-Authentication-Results: linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=none action=none header.from=arm.com; Return-Path: Achin.Gupta@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ca4fd097-6ab4-4434-7542-08d8e4bb0538 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p1HBH8wHmkrDicORmIMK2xuZ/C699qwlIydZr5RyQfZ5bYGBM0tvgfocXoGsr5n6AN9SV1UrRbA+GTtKZKxVAZvRRTuFGbsxa5ICj91BPXEZ1v6CL21IsnWEzVhkhs4THaA/EFoUrtvjuN51rAMNZxDJC9lH90YVanW05YahvVMrMyzgsqK1IwRSJznaUaEZ5TDy0uueu4GdNuF9iFep56Xabru9TwTjcSVq2NgISeEgTl+IAlAQHVpw3oxzsL6l2g7DLY4BD9n9eG3eL0eA+W7/634OAnijg+ZHC300CoUy1kSp16CPMAvkWT38Qb0Z+eB4JIYvUSrNhNhw7XnZkoPDOipgA66D8qLebebMh4Je9X4ocix57x7ZT/B+y/EtNsQuzPaLOCmm/3kUN8jZSh8/3z3Sc1+TBrhhi9nG8y/7TOBA+tTilicq0syVNl40gO7VGctuWw/7TeZXHnNIWhb4s22gIHbM6qNo9uJOKVP0f4Wi6c2Da67rOFTN7w038NfGFXR9+nxN4CIsEQomY99In49Ni9h7ctvBzVCd3LQWmmW2eBUksJSnh7txZHZ/iznsd6T/5ox/4reN0cClxbhWs+60J4E5qPPfvna6GxxEYxnVm1vJX9c+gLEyP65UDe/OnUuNiBiBxFCheoLXyVktS7mAMncg3Jc/Ui269k4NmH50q57xi48aJvoD96SPqrAJja1JB7v5jbIZqor01ASa2OCmfDqlULc2SNaXXa0= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(39840400004)(136003)(376002)(396003)(346002)(36840700001)(46966006)(956004)(70206006)(86362001)(16526019)(2906002)(5660300002)(70586007)(316002)(36860700001)(9686003)(33716001)(44832011)(186003)(966005)(356005)(47076005)(478600001)(81166007)(6496006)(6666004)(336012)(19627235002)(6862004)(83380400001)(26005)(55016002)(8936002)(54906003)(82310400003)(8676002)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2021 18:25:24.7047 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3b6635a-2dec-49db-fa73-08d8e4bb09e1 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5006 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, CIL... On Thu, Mar 11, 2021 at 06:37:30PM +0200, Ilias Apalodimas wrote: > (+cc Achin) > > On Wed, 10 Mar 2021 at 14:45, Ilias Apalodimas via groups.io linaro.org@groups.io> wrote: > > Hi Pierre, > > On Wed, Mar 10, 2021 at 09:58:19AM +0000, Pierre wrote: > > Hi Ilias, > > Just minor coding style nit picking: > > > > * Drivers/OpTee/OpteeRpmbPkg/FixupPcd.c:FixPcdMemory() I think the > > error codes are missing in the function header > > Ah you mean the return values of locate protocol? > > > * Thanks for adding the IN/OUT function parameter descriptors. Is it > > possible to also add them in the function headers [1] ? > > Sure, I'll send a v7 anyways since I managed to mess up the maintainers > patch > somehow... > > I hope I haven't missed any of your other requests. > > > > > About the FFA/SVC call: > > > > >> If this is an FFA call, is it possible to: > > >> - put a reference in the header to the spec (it should be similar to > the > > >> one at > > >> edk2/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ > ArmMmuStandaloneMmLib.c) > > >> - check the return status of the SVC call against the ones available > at > > >> edk2/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h > > >> - if possible, remove the dependency to > > > > > > The call is technically an FFA one but at the moment OP-TEE returns the > > StMM > > > return code which is defined in the last header you mention. > > > The relevant code is in ./core/arch/arm/kernel/stmm_sp.c function > > > tee2stmm_ret_val(). > > > So unless we redefine that in OP-TEE or (better imho), wait for a full > FFA > > > mechanism to be in place, I'd prefer leaving it as is. > > > Keep in mind that adding the full FFA will also get rid of the > hardcoded > > IDs > > > on the beginning of the file. > > > > The description of a FFA_MSG_SEND_DIRECT_REQ (s10.2 of [2]) doesn't seem > to > > return the same error codes as the ones optee returns (in > > optee_os/core/arch/arm/kernel/stmm_sp.c:tee2stmm_ret_val()). I am not > sure a > > new FFA specification will change these error codes. > > Another thing is that I think the mMemMgrId variable described in > > edk2-platforms/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c is currently > > defined as edk2/ArmPkg/Include/IndustryStandard/ > ArmFfaSvc.h:ARM_FFA_DESTINATION_ENDPOINT_ID > > (the name seems to be misleading). > > I think it would be better to: > > > > * align the optee error codes with what is in the FFA spec > > * handle these error codes in edk2 with what is in > > edk2/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h and remove the > > dependendy to edk2/ArmPkg/Include/IndustryStandard/ArmMmSvc.h if > > possible > > * rename > > edk2/ArmPkg/Include/IndustryStandard/ > ArmFfaSvc.h:ARM_FFA_DESTINATION_ENDPOINT_ID > > define to a proper name, according to what is in > > optee_os/core/arch/arm/kernel/stmm_sp.c, and add one define for > > 'mem_mgr_id' > > * remove the mMemMgrId and mStorageId variables from > > edk2-platforms/Drivers/OpTee/OpteeRpmbPkg/OpTeeRpmbFvb.c and use the > > newly created defines from > > edk2/ArmPkg/Include/IndustryStandard/ArmFfaSvc.h > > > > This would allow to be aligned with the current FFA spec and when a new > one > > comes, these endpoints IDs (mMemMgrId/mStorageId) can just be removed > from > > one location (as you said). > > In the end it seems you and Sami will maintain this, so I will let you > > decide what is best. > > I get the whole point, and for the record you are technically right. > > But there's something (once again) that's 'weird' here. > This StandAloneMM that's compiling over here is only used by OP-TEE. > In order to use that you need to call an SMC into OP-TEE (not FFA) from > the non-secure world to initiate it. > There's an OP-TEE PTA (pseudo-TA), that then converts the message to MM and > sends it over to StandAloneMM. There are no FFA manifests yet, that's why > the > get/set memory attributes code is still running, to set up page > permissions > as well. > > The FFA mechanism you are seeing right now, is just the internal contract > between OP-TEE and this driver. We did some of the calls depend on FFA > since > this was a good way to start introducing FFA code into EDK2 (which will > eventually be needed), without being too intrusive. > > In the long run OP-TEE will be fully converted into FFA the changes you are > talking about make sense. In fact there's a ./core/arch/arm/kernel/ > secure_partition.c > in OP-TEE doing exactly that but it's not yet complete. > I tried to describe the entire situation here [1]. > > If anyone feels really strong about this, we can go and change it. The > changes > aren't too big to begin with. That being said I'd prefer keeping it as is, > since this will naturally evolve to a complete FFA spec, but the mechanisms > are still missing from OP-TEE. Last but not least when OP-TEE gets that's > FFA > support you won't bundle StandAloneMM with the driver right? You'd have 2 > discrete Secure partitions, one dealing with variables and one dealing with > storage. Just to second Ilias's explanation above... The plan is to incorporate the ABIs to get and set memory attributes into the FF-A v1.1 specification. This way, the memory manager service will not be a protocol that uses FF-A DIRECT_REQUEST and DIRECT_RESP as the transport. Instead, it will be natively implemented by OP-TEE. The error codes etc will align at this point. I hope this helps clarify. Do shout if you need more information. cheers, Achin > > [1] https://apalos.github.io/ > Protected%20UEFI%20variables%20with%20U-Boot.html# > Protected%20UEFI%20variables%20with%20U-Boot > > > Thanks > /Ilias > > > > [1] https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/ > 6_documenting_software/610_special_commands# > 6-10-4-param-in-out-parameter-description > > [2] https://developer.arm.com/documentation/den0077/a > > > > Regards, > > Pierre > > > > > >