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 AAC4DC001DE for ; Fri, 28 Jul 2023 11:01:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CCE32863C9; Fri, 28 Jul 2023 13:01:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="tZ8jC4ww"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 557B686689; Fri, 28 Jul 2023 13:01:07 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 5FB72863B2 for ; Fri, 28 Jul 2023 13:01:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fb960b7c9dso3503624e87.0 for ; Fri, 28 Jul 2023 04:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690542061; x=1691146861; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=j5dG2zNd0/vNSUImY8y3u0ChmuTtgPl7lDcxlqNey3I=; b=tZ8jC4wwE+MVxODil5gNPVyQ3ACw9wLjgItLBopsC1ufN+lZUDJvDm3FzjVWRpEvaE hbF/ini061QVEVaxkQr/juz9FFhNf/sWKz6GQnOv47rNmd/OwEose2ZWaSdEiYqvBBvq SYNTjyh4SXZoGYUk5+z7An/4d/8lRaqTQyGlYT3XiGCl0dx4eV1F+gEVJEVdH2TNSFVE XqCTb0mn8GuiLOwHhU84X72HTMEIWeTRyBuiiaSEDvWOrYZhoNASGD+sOnZc2na4mIqy ew2wMulmXEb/EmUXblvARU7EKr1n4MbQiXsC/smbCvnijf5G5uqJCq2xx9kx0BJYYXQG kBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690542061; x=1691146861; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j5dG2zNd0/vNSUImY8y3u0ChmuTtgPl7lDcxlqNey3I=; b=VnCuzbnkkVvKmyNm/Q3bsVPHNYa+VwkfSMvat9RZjRYgNhNgyuWm0i9cCnPA7jSHGB G2Wf3gBmtm++dpNOXyJhnUClMt0hikk6bLPom9qXlXZsobHaIS1fcQGQH939h7eapngf 81A4FllrNAVFzU/pe6JvD/kFibuXMsd0kwr130uX9C/CuNEAyuIHVN6pKjqzPya3+maE 3VNQiF3GWrit7BTWNGAQFtg8oY0MpMxE9s5HX7Rh6UaTmDS8mSQNB/4D2U+iVOYKu0Cj 7yKrkfD4KbYtxX8bV4kJ/EkL2Y/VHl0aW+Z00ZV59338OFo+XANajNelkKIISojNy2kY rk2Q== X-Gm-Message-State: ABy/qLa9owEQ081sfp1Vb5fo3H0EaRnCH+qp9+C9khqIBSkxsgXqK/5y Fhn+koAp4d44REu8xIO26ZMq0KZ1TyUWDhEBysOT9A== X-Google-Smtp-Source: APBJJlF3kqqrAsM/248B6JoWUCLUiFQTF83RFYkMvnVWWcCuQhT4PSm+GdCv+S+JTEQyyaOjHXleW+5hmqkGv6Z8aVE= X-Received: by 2002:a19:ca44:0:b0:4fe:193c:de74 with SMTP id h4-20020a19ca44000000b004fe193cde74mr1214331lfj.18.1690542061525; Fri, 28 Jul 2023 04:01:01 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20230727164345.GH3630934@bill-the-cat> From: Ilias Apalodimas Date: Fri, 28 Jul 2023 14:00:25 +0300 Message-ID: Subject: Re: [PATCH v17 09/10] arm_ffa: efi: introduce FF-A MM communication To: Tom Rini Cc: Abdellatif El Khlifi , jens.wiklander@linaro.org, nd@arm.com, sjg@chromium.org, u-boot@lists.denx.de, Gowtham Suresh Kumar Content-Type: text/plain; charset="UTF-8" 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 Hi Tom 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: > > =============== > > > > 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. Abdellatif hinted at what's going on here. When I added this Kconfig option to lx2160 FF-A wasn't implemented yet. 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. Thanks /Ilias > > -- > Tom