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 18D4FC001DE for ; Fri, 28 Jul 2023 09:37:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C4AE38689A; Fri, 28 Jul 2023 11:37:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 94BDA86845; Fri, 28 Jul 2023 11:37:32 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 355A786845 for ; Fri, 28 Jul 2023 11:37:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abdellatif.elkhlifi@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F0532F4; Fri, 28 Jul 2023 02:38:11 -0700 (PDT) Received: from e130802.arm.com (unknown [10.57.2.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 172A83F67D; Fri, 28 Jul 2023 02:37:26 -0700 (PDT) Date: Fri, 28 Jul 2023 10:37:18 +0100 From: Abdellatif El Khlifi To: Tom Rini Cc: nd@arm.com, u-boot@lists.denx.de, ilias.apalodimas@linaro.org Subject: Re: [PATCH v17 09/10] arm_ffa: efi: introduce FF-A MM communication Message-ID: <20230728093718.GA11635@e130802.arm.com> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230727164345.GH3630934@bill-the-cat> 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, Jul 27, 2023 at 12:43:45PM -0400, 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 EFI_MM_COMM_TEE. 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. Thanks for the suggestion. EFI_MM_COMM_TEE needs ARM_FFA_TRANSPORT. EFI_MM_COMM_TEE enables efi_variable_tee.c efi_variable_tee.c has new code for FF-A and Optee. Detecting which method to use is done at runtime. Ilias and I agreed on that. ARM_FFA_TRANSPORT is meant to be generic and not tied to EFI. Making it depends on EFI_MM_COMM_TEE will tie it to EFI. Cheers Abdellatif > > -- > Tom