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 84A68C77B73 for ; Tue, 6 Jun 2023 11:56:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D2A0F85D8B; Tue, 6 Jun 2023 13:56:44 +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 630BF85DE2; Tue, 6 Jun 2023 13:56:42 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id A5D7885C5E for ; Tue, 6 Jun 2023 13:56:39 +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 506DA2F4; Tue, 6 Jun 2023 04:57:24 -0700 (PDT) Received: from e130802.arm.com (e130802.arm.com [10.1.37.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6077B3F663; Tue, 6 Jun 2023 04:56:37 -0700 (PDT) Date: Tue, 6 Jun 2023 12:56:28 +0100 From: Abdellatif El Khlifi To: sjg@chromium.org, trini@konsulko.com Cc: sjg@chromium.org, trini@konsulko.com, nd@arm.com, u-boot@lists.denx.de, ilias.apalodimas@linaro.org Subject: Re: [PATCH v12 00/10] introduce Arm FF-A support Message-ID: <20230606115628.GA17201@e130802.arm.com> References: <20230412094245.44674-1-abdellatif.elkhlifi@arm.com> <20230512121044.111574-1-abdellatif.elkhlifi@arm.com> <20230522091320.GA31886@e130802.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522091320.GA31886@e130802.arm.com> 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 On Mon, May 22, 2023 at 10:13:20AM +0100, Abdellatif El Khlifi wrote: Hi Simon, Tom, > Hi Simon, > > > Adding support for Arm FF-A v1.0 (Arm Firmware Framework for Armv8-A) [A]. > > > > FF-A specifies interfaces that enable a pair of software execution environments aka partitions to > > communicate with each other. A partition could be a VM in the Normal or Secure world, an > > application in S-EL0, or a Trusted OS in S-EL1. > > > > FF-A is a discoverable bus and similar to architecture features. > > FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed > > by the PSCI driver. > > > > => dm tree > > > > Class Index Probed Driver Name > > ----------------------------------------------------------- > > ... > > firmware 0 [ + ] psci |-- psci > > ffa 0 [ ] arm_ffa | `-- arm_ffa > > ... > > > > Clients are able to probe then use the FF-A bus by calling the DM class > > searching APIs (e.g: uclass_first_device). > > > > This implementation of the specification provides support for Aarch64. > > > > The FF-A driver uses the SMC ABIs defined by the FF-A specification to: > > > > - Discover the presence of secure partitions (SPs) of interest > > - Access an SP's service through communication protocols > > (e.g: EFI MM communication protocol) > > > > The FF-A support provides the following features: > > > > - Being generic by design and can be used by any Arm 64-bit platform > > - FF-A support can be compiled and used without EFI > > - Support for SMCCCv1.2 x0-x17 registers > > - Support for SMC32 calling convention > > - Support for 32-bit and 64-bit FF-A direct messaging > > - Support for FF-A MM communication (compatible with EFI boot time) > > - Enabling FF-A and MM communication in Corstone1000 platform as a use case > > - A Uclass driver providing generic FF-A methods. > > - An Arm FF-A device driver providing Arm-specific methods and reusing the Uclass methods. > > - A sandbox emulator for Arm FF-A, emulates the FF-A side of the Secure World and provides > > FF-A ABIs inspection methods. > > - An FF-A sandbox device driver for FF-A communication with the emulated Secure World. > > The driver leverages the FF-A Uclass to establish FF-A communication. > > - Sandbox FF-A test cases. > > - A new command called armffa is provided as an example of how to access the > > FF-A bus > > > > For more details about the FF-A support please refer to [B] and refer to [C] for > > how to use the armffa command. > > > > Please find at [D] an example of the expected boot logs when enabling > > FF-A support for a platform. In this example the platform is > > Corstone1000. But it can be any Arm 64-bit platform. > > > > Changelog of the major changes: > > =========================== > > > > v12: > > > > * remove the global variable (dscvry_info), use uc_priv instead > > * replace dscvry_info.invoke_ffa_fn() with a weak invoke_ffa_fn > > (user drivers can override it) > > * improve FFA_PARTITION_INFO_GET implementation > > (clients no longer need to calloc a buffer) > > * remove reparenting by making the sandbox emulator parent of the FF-A device in the DT > > * improve argument checks for the armffa command > > * address nits > > ... > > Cc: Tom Rini > > Cc: Simon Glass > > A gentle reminder about the v12 patchset. > > Your feedback is more than welcome :) Could you please provide a feedback about the v12 patchset ? Most of the patches are generic. I'm gonna address Ilias comment for patch #9 with your future comments. Your review is very much appreciated. Kind regards Abdellatif