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 0F7DEC433FE for ; Fri, 15 Apr 2022 12:28:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 188CF811A6; Fri, 15 Apr 2022 14:28:31 +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 E0710817D8; Fri, 15 Apr 2022 14:28:29 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id CA0F5810E7 for ; Fri, 15 Apr 2022 14:28:26 +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 0A100139F; Fri, 15 Apr 2022 05:28:26 -0700 (PDT) Received: from e121910.arm.com (unknown [10.57.9.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B1D73F73B; Fri, 15 Apr 2022 05:28:18 -0700 (PDT) From: abdellatif.elkhlifi@arm.com To: u-boot@lists.denx.de Cc: sudeep.holla@arm.com, abdellatif.elkhlifi@arm.com, achin.gupta@arm.com, ilias.apalodimas@linaro.org, robh@kernel.org, sjg@chromium.org, trini@konsulko.com, vishnu.banavath@arm.com, xueliang.zhong@arm.com, nd@arm.com Subject: [PATCH v2 0/6] introduce Arm FF-A support Date: Fri, 15 Apr 2022 13:27:57 +0100 Message-Id: <20220415122803.16666-1-abdellatif.elkhlifi@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220413172943.rvvxrsl5ukxy7xkg@bogus> References: <20220413172943.rvvxrsl5ukxy7xkg@bogus> 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.5 at phobos.denx.de X-Virus-Status: Clean From: Abdellatif El Khlifi This patchset adds support for Arm FF-A (Arm Firmware Framework for Armv8-A v1.0). FF-A support is generic by design and can be used by any Arm platform. The features added are as follows: 1/ FF-A bus driver 2/ armffa command 3/ FF-A Sandbox driver 4/ FF-A Sandbox test cases 5/ FF-A MM communication The suggested design considers FF-A as a discoverable bus. The Secure World is considered as one entity to communicate with using the FF-A bus. FF-A communication is handled by one device and one instance (the bus). This FF-A driver takes care of all the interactions between Normal world and Secure World. The Secure World firmware runs under TrustZone HW (such as Optee). The same approach was followed in the FF-A driver in Linux kernel (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/arm_ffa/bus.c?h=v5.15#n211)) Cc: Tom Rini Cc: Rob Herring Cc: Ilias Apalodimas Cc: Achin Gupta Cc: Simon Glass Cc: Vishnu Banavath Abdellatif El Khlifi (6): arm_ffa: introduce Arm FF-A low-level driver arm_ffa: introduce armffa command arm_ffa: introduce the FF-A Sandbox driver arm_ffa: introduce Sandbox test cases for UCLASS_FFA arm_ffa: introduce armffa command Sandbox test arm_ffa: introduce FF-A MM communication MAINTAINERS | 15 + arch/arm/cpu/armv8/cache.S | 16 + arch/arm/cpu/armv8/cache_v8.c | 3 +- arch/arm/cpu/armv8/smccc-call.S | 27 + arch/arm/lib/asm-offsets.c | 6 + cmd/Kconfig | 10 + cmd/Makefile | 2 + cmd/armffa.c | 266 +++++ common/board_r.c | 7 + configs/sandbox64_defconfig | 2 + configs/sandbox_defconfig | 2 + doc/arch/sandbox.rst | 1 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/arm-ffa/Kconfig | 34 + drivers/arm-ffa/Makefile | 7 + drivers/arm-ffa/arm-ffa-uclass.c | 103 ++ drivers/arm-ffa/arm_ffa_prv.h | 193 ++++ drivers/arm-ffa/core.c | 1384 +++++++++++++++++++++++++ drivers/arm-ffa/sandbox.c | 669 ++++++++++++ drivers/arm-ffa/sandbox_arm_ffa_prv.h | 131 +++ include/arm_ffa.h | 197 ++++ include/arm_ffa_helper.h | 45 + include/dm/uclass-id.h | 1 + include/linux/arm-smccc.h | 28 +- include/mm_communication.h | 4 +- include/sandbox_arm_ffa.h | 31 + include/sandbox_arm_ffa_helper.h | 26 + lib/Kconfig | 1 + lib/Makefile | 1 + lib/arm-ffa/Kconfig | 6 + lib/arm-ffa/Makefile | 9 + lib/arm-ffa/arm_ffa_helper.c | 188 ++++ lib/arm-ffa/sandbox_arm_ffa_helper.c | 23 + lib/efi_loader/Kconfig | 14 +- lib/efi_loader/efi_boottime.c | 17 + lib/efi_loader/efi_variable_tee.c | 281 ++++- test/cmd/Makefile | 1 + test/cmd/armffa.c | 33 + test/cmd/armffa.h | 13 + test/dm/Makefile | 1 + test/dm/ffa.c | 418 ++++++++ test/dm/ffa.h | 22 + 43 files changed, 4230 insertions(+), 11 deletions(-) create mode 100644 cmd/armffa.c create mode 100644 drivers/arm-ffa/Kconfig create mode 100644 drivers/arm-ffa/Makefile create mode 100644 drivers/arm-ffa/arm-ffa-uclass.c create mode 100644 drivers/arm-ffa/arm_ffa_prv.h create mode 100644 drivers/arm-ffa/core.c create mode 100644 drivers/arm-ffa/sandbox.c create mode 100644 drivers/arm-ffa/sandbox_arm_ffa_prv.h create mode 100644 include/arm_ffa.h create mode 100644 include/arm_ffa_helper.h create mode 100644 include/sandbox_arm_ffa.h create mode 100644 include/sandbox_arm_ffa_helper.h create mode 100644 lib/arm-ffa/Kconfig create mode 100644 lib/arm-ffa/Makefile create mode 100644 lib/arm-ffa/arm_ffa_helper.c create mode 100644 lib/arm-ffa/sandbox_arm_ffa_helper.c create mode 100644 test/cmd/armffa.c create mode 100644 test/cmd/armffa.h create mode 100644 test/dm/ffa.c create mode 100644 test/dm/ffa.h -- 2.17.1