From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 858FBC001DE for ; Fri, 28 Jul 2023 13:54:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6250786908; Fri, 28 Jul 2023 15:54:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="cE+UeSEb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 02A3B86233; Fri, 28 Jul 2023 15:54:25 +0200 (CEST) Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D215D86901 for ; Fri, 28 Jul 2023 15:54:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-79a0b4c6314so2100644241.1 for ; Fri, 28 Jul 2023 06:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690552460; x=1691157260; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NCYC6E88mQjFFQpMF0EzMH58JmR7vmm9WOyfrkej8p4=; b=cE+UeSEbq3cFHyTBMd6VGS5YImB9FppSGzIi+S8DIaP/eANXxkld+kdzgbs5UWrpp5 Vzpl0sWYCI4xZCCFkQcsCMuIMdkTV2nvCF+eLdVYsL96LFbRpdNlV8JzO6K/1YK/XXKq j9xsueF4aqWEw5ikczHogUuDGV/dmQIqxtYV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690552460; x=1691157260; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NCYC6E88mQjFFQpMF0EzMH58JmR7vmm9WOyfrkej8p4=; b=dZpUwHob49EzEqKTCjSA3S04l/NtHp+35BljHmdwJOwyJHPVs22CHDElPoSplT4yn/ q3SOmGQKEVp4ey07Vk860c0M6yB4Q0wMaBpDnjoG73A5uTBE2OSjNkYpLX9MttL/dsUh PCyp3x02QvK1d3amYttN766n2O/4hfWMog42fFZlAuagdLeeEBFHMtxAbg01lvgmkVez GNtsGdDSVD+Uiae6ffC6kn3d7NlzbLSBxlnSm9H2vE/fC5Mbb0IWfNFKnqMfIp0nsZLc pMWrKDkET4WAPuRCgpddxMaQ2vqgwh1RvwL3Pt3oRNybrkItNo6KXv2Ys3l7wZ//HATT NDLg== X-Gm-Message-State: ABy/qLZfpVDIsvgEDerIVdcQMUMoZtt2qKL1KAtRmuSJLSAbApko86iq RJKXa7S6L+VLVcuISz6UVzecVg== X-Google-Smtp-Source: APBJJlGaGNhsXz4hXRUogLiQwtELtfhqd0FbQVTOx80Y79nqxOtE5jQPgNcYJLRBrEQvXjSv+kaLGg== X-Received: by 2002:a05:6122:928:b0:486:3c28:68de with SMTP id j40-20020a056122092800b004863c2868demr2597959vka.7.1690552460472; Fri, 28 Jul 2023 06:54:20 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-1311-45c5-0048-870a.res6.spectrum.com. [2603:6081:7b00:6400:1311:45c5:48:870a]) by smtp.gmail.com with ESMTPSA id p3-20020ac5cca3000000b004817a39a0b0sm491966vkm.18.2023.07.28.06.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 06:54:19 -0700 (PDT) Date: Fri, 28 Jul 2023 09:54:15 -0400 From: Tom Rini To: Ilias Apalodimas Cc: Abdellatif El Khlifi , jens.wiklander@linaro.org, nd@arm.com, sjg@chromium.org, u-boot@lists.denx.de, Gowtham Suresh Kumar Subject: Re: [PATCH v17 09/10] arm_ffa: efi: introduce FF-A MM communication Message-ID: <20230728135415.GU3630934@bill-the-cat> References: <20230726160635.GS3630934@bill-the-cat> <20230727160712.81477-1-abdellatif.elkhlifi@arm.com> <20230727160712.81477-10-abdellatif.elkhlifi@arm.com> <20230727164345.GH3630934@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bhNuJG13DySPUU+W" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --bhNuJG13DySPUU+W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 28, 2023 at 02:00:25PM +0300, Ilias Apalodimas wrote: > Hi Tom >=20 > On Thu, 27 Jul 2023 at 19:43, Tom Rini wrote: > > > > On Thu, Jul 27, 2023 at 05:07:11PM +0100, Abdellatif El Khlifi wrote: > > > > > Add MM communication support using FF-A transport > > > > > > This feature allows accessing MM partitions services through > > > EFI MM communication protocol. MM partitions such as StandAlonneMM > > > or smm-gateway secure partitions which reside in secure world. > > > > > > An MM shared buffer and a door bell event are used to exchange > > > the data. > > > > > > The data is used by EFI services such as GetVariable()/SetVariable() > > > and copied from the communication buffer to the MM shared buffer. > > > > > > The secure partition is notified about availability of data in the > > > MM shared buffer by an FF-A message (door bell). > > > > > > On such event, MM SP can read the data and updates the MM shared > > > buffer with the response data. > > > > > > The response data is copied back to the communication buffer and > > > consumed by the EFI subsystem. > > > > > > MM communication protocol supports FF-A 64-bit direct messaging. > > > > > > Signed-off-by: Abdellatif El Khlifi > > > Tested-by: Gowtham Suresh Kumar > > > Reviewed-by: Simon Glass > > > Cc: Tom Rini > > > Cc: Ilias Apalodimas > > > Cc: Jens Wiklander > > > > > > --- > > > > > > Changelog: > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > > v17: > > > > > > * show a debug message rather than an error when FF-A is not detected > > [snip] > > > diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig > > > index c5835e6ef6..8fbadb9201 100644 > > > --- a/lib/efi_loader/Kconfig > > > +++ b/lib/efi_loader/Kconfig > > > @@ -55,13 +55,53 @@ config EFI_VARIABLE_FILE_STORE > > > stored as file /ubootefi.var on the EFI system partition. > > > > > > config EFI_MM_COMM_TEE > > > - bool "UEFI variables storage service via OP-TEE" > > > - depends on OPTEE > > > + bool "UEFI variables storage service via the trusted world" > > > + depends on OPTEE && ARM_FFA_TRANSPORT > > > > You didn't get my changes in here however. If you can do EFI_MM_COMM_TEE > > without ARM_FFA_TRANSPORT (as lx2160ardb_tfa_stmm_defconfig does) then > > you don't make this option depend on . If FF-A is only > > for use here, you make FF-A depend on this, and the FF-A specific > > variable depend on ARM_FFA_TRANSPORT. >=20 > Abdellatif hinted at what's going on here. When I added this Kconfig > option to lx2160 FF-A wasn't implemented yet. The defconfig has existed since May 2020, which is when you added EFI_MM_COMM_TEE itself too. So I think it's that no one did the check I did until now and saw this series was disabling what was on the other platform. > Since FF-A isn't a new > communication mechanism but builds upon the existing SMCs to build an > easier API, I asked Abdellatif to hide this complexity. > We had two options, either make Kconfig options for either FF-A or the > traditional SMCs and remove the dependencies, or piggyback on FF-As > discovery mechanism and make the choice at runtime. The latter has a > small impact on code size, but imho makes developers' life a lot > easier. I'm not sure how much you can do a run-time option here since you're setting a bunch of default values for FF-A to 0 in Kconfig. If we're supposed to be able to get them at run time, we shouldn't need a Kconfig option at all. I'm also not sure how valid a use case it is where we won't know at build time what the rest of the firmware stack supports here. --=20 Tom --bhNuJG13DySPUU+W Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTDyH4ACgkQFHw5/5Y0 tyzYZAv/b6Xs3FXLjfRHZHlAO8z8GnXDkDmtVsCKsmiUnJ/wTzvPapMVyVAvd9/1 e/WaQTVPcmxyKortFCvTFYI58yvZt+vgnyfCc3NNtQGuPh3SDTjM2D2afu0m7gQ5 DlillMsKCcPwiB2z52dzYQNTGpgCex+KG0cNouQdSf0akmjbP4mBZJZ0jjo7OdVy VhWBLLJ5YBAevwmBJRBChBsSakucbeKD02rqyz9jPVaavbYDaBD0rEysU+m80Vpm Ws6rgX6swBS63XhHVFMfosIAnEl84RI4sjIDLbOrsrT5i70McseVp256ptrX6VZ0 n2j9LJNOvBAqDYa+dJWy/G4muHAsg0UBHr4eJSYLNbRwla08EBYCisBI4KLFqQuv JIF1SlxeE/PtUxqE76twKG0KbLE62hiXGWcStaEInAewbXDKHPWA2FYLOZJDP5W5 xvAsnpD64V4zLWoMq7QPBjdv/rfLxpbXOSiz6r0sWByF6uZU9xTcOrv0YLrLsBMb fRRiJYsj =KgZc -----END PGP SIGNATURE----- --bhNuJG13DySPUU+W--