From patchwork Fri Dec 4 12:11:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 337753 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp349208jai; Fri, 4 Dec 2020 04:12:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrvSLq2oBXHekJ5HKGNusjvInDJDUw0xeBv31cRuG1Kw29Lsq9ewtbbD/ZTJQcryH6r46P X-Received: by 2002:a17:906:adcb:: with SMTP id lb11mr4876205ejb.346.1607083965138; Fri, 04 Dec 2020 04:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607083965; cv=none; d=google.com; s=arc-20160816; b=l62Zub6KbuMBLUn1OkYMUrg9tja3zEv20+QPrhi12IjowWxJLu9aqUyspySc/I5459 VRBaj7DwgwdMWAIrg5zTUOTAAi6Pk92t5mEy2/vB+j8lYHAFiXfFf1I2tnPlHrO0D72c M5RgEaiDBRgFUUks3C7zbjJBM5/UZCaT+0d78a4TQlxHJ2Kv+SITAkm+ODIZhBzj87v+ Fxr8uEdhQQNBme37qejzK9zbLQUoTa/OGz81KygpU1N2/Zf09Z3MLwaUQ70IuWtmukxk pNV7jB2RdAshUfqZi71ad6OruLxMJ7X92kD8rG36OwzbaD40wyYNUrlkaEShQnkT3C4h XKrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9Df4ysN4IX9TGBWFGx84Cgy6UkRqD1e8hkQe8dbFFTU=; b=0QYnClhR7/umEL3yG0IrNBENSEfzKm1eMdCd1Ld/rb4DgETU3BtzVfsw5thl3D8fYb K36d752MufFrS4DeOTbBc0NEZ0p5rvPy0+7728ty1aIBrCYjAeSi05oju2TmG8WTVMI9 j97qzXoYjA4QG3rWmqGRQveJHNz1du+baK89TTL4ZfmTdtHGA2z1yiOu87YhOwV6Enm8 3bxXpGrcjR0fhp2YdHRVn5ntI0h4qWeKssHCutbrmTZh+tDPp6Ctik4HByttk+RtbrRu Ycs89+/9EmwVuw+hFqJBUgLXHTe0jg3LMIaJ8gXOPFVrFmNmzV/hKW/tINulkl7dnabc hIQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si1378099ejm.185.2020.12.04.04.12.44; Fri, 04 Dec 2020 04:12:45 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730204AbgLDMMd (ORCPT + 6 others); Fri, 4 Dec 2020 07:12:33 -0500 Received: from foss.arm.com ([217.140.110.172]:33062 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730201AbgLDMMa (ORCPT ); Fri, 4 Dec 2020 07:12:30 -0500 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 B402611FB; Fri, 4 Dec 2020 04:11:44 -0800 (PST) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 602AE3F575; Fri, 4 Dec 2020 04:11:43 -0800 (PST) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: Sudeep Holla , Trilok Soni , arve@android.com, Andrew Walbran , David Hartley , Achin Gupta , Jens Wiklander , Arunachalam Ganapathy Subject: [PATCH v3 0/7] firmware: Add initial support for Arm FF-A Date: Fri, 4 Dec 2020 12:11:30 +0000 Message-Id: <20201204121137.2966778-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi all, This is just initial implementation to check on the idea of providing in-kernel support for Arm FF-A specification. Complete driver support is still work in progress, I am posting to early feedback and merge basic support ASAP. Arm Firmware Framework for Armv8-A specification[1] describes a software architecture that provides mechanism to utilise the virtualization extension to isolate software images and describes interfaces that standardize communication between the various software images. This includes communication between images in the Secure and Normal world. The main idea here is to create FFA device to establish any communication with a secure partition. -- Regards, Sudeep [1] https://developer.arm.com/documentation/den0077/latest v2->v3: - Dropped hypervisor partitions and userspace support as it is no longer in the list of requirements - Moved away from ioctl style interface for in-kernel users as there is no need to keep in sync with userspace anymore - Some kerneldoc fixes as pointed out in earlier reviews v1->v2: - Moved userspace code to a separate unit, will move to separate module. Still working on minimizing initcall dependencies and exported functions to reuse some of the code. - Fixed couple of minor issues pointed out - Dropped ASYNC send message as I haven't been able to test Sudeep Holla (7): dt-bindings: Arm: Add Firmware Framework for Armv8-A (FF-A) binding arm64: smccc: Add support for SMCCCv1.2 input/output registers firmware: arm_ffa: Add initial FFA bus support for device enumeration firmware: arm_ffa: Add initial Arm FFA driver support firmware: arm_ffa: Add support for SMCCC as transport to FFA driver firmware: arm_ffa: Setup in-kernel users of FFA partitions firmware: arm_ffa: Add support for MEM_* interfaces .../devicetree/bindings/arm/arm,ffa.yaml | 58 ++ arch/arm64/kernel/asm-offsets.c | 4 + arch/arm64/kernel/smccc-call.S | 22 + drivers/firmware/Kconfig | 1 + drivers/firmware/Makefile | 1 + drivers/firmware/arm_ffa/Kconfig | 21 + drivers/firmware/arm_ffa/Makefile | 6 + drivers/firmware/arm_ffa/bus.c | 179 +++++ drivers/firmware/arm_ffa/common.h | 32 + drivers/firmware/arm_ffa/driver.c | 660 ++++++++++++++++++ drivers/firmware/arm_ffa/smccc.c | 54 ++ include/linux/arm-smccc.h | 50 ++ include/linux/arm_ffa.h | 270 +++++++ 13 files changed, 1358 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/arm,ffa.yaml create mode 100644 drivers/firmware/arm_ffa/Kconfig create mode 100644 drivers/firmware/arm_ffa/Makefile create mode 100644 drivers/firmware/arm_ffa/bus.c create mode 100644 drivers/firmware/arm_ffa/common.h create mode 100644 drivers/firmware/arm_ffa/driver.c create mode 100644 drivers/firmware/arm_ffa/smccc.c create mode 100644 include/linux/arm_ffa.h -- 2.25.1