From patchwork Sat Aug 29 17:09:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 248706 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2036438ilg; Sat, 29 Aug 2020 10:09:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsSQMi2njzjL2APk7sM8J5UsNnyI/qaPL4YJrDr5Vo5+WLnUSLGtq178pL6KpmMZSSpsK9 X-Received: by 2002:a17:907:388:: with SMTP id ss8mr4243442ejb.479.1598720975304; Sat, 29 Aug 2020 10:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598720975; cv=none; d=google.com; s=arc-20160816; b=kC+15ekLThw6Mt70fUIHnt+nBZt1AB3nUoleicZ83CagJjwx9Jl4mfk+GrN/eFurKb kF1wOjZMx0ol4nXcHXaKqoSthYq8hN8Ln4RL2MkkcVg4ZXBgcEeThz373WNDwSkFU6Pc 4T+55LKaBa1cZ6cbHIZFm521HhBbYOXQOy9h9N3m8PeEkLzLbPXxsnch/iK8feHCJUBW IMfX7QtArzft37ws0l3nSMPpnexJJZIIhQHeqW86N+sJgz4KfYXJ3OVw9o0y685ntESj qpEDqwYjUT+WWdlPk9MPo6hEMLbxxyO/R7rY47mfp58ZL6YWZEqJGM7/necvnw613flj +bSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=H1ZuVRcsvlSMgzjMNvB/PKBMdBkwgFX7Uj2fgowaDm8=; b=CPqOtXtLnzbJwEdDl20/rpFjNB/fKaObGo3UTGrXJ8A55b+eatqdDMILrg2rqXI728 hzonwM0RCt/hQYdR7JiQA2YR5EzWKw1ARPSvtcOW7chmogESrLG82NB1F7LH3sNyMrhL u7pRist/6BFY38wP04MbhRXl9DD63SG2rBbA8tkhRJnMnBuuNKHeeGjJLyq8Y8stANKF BWMbf/sner3FhYjRCgCDAV92mKzzmXxM9Cj/ashm1EWez+gL+ddqKchiiYNcvItvFcek WirS2mEAg2a2VJHoCy7RunOoY/iyxS2KtR1c7UcsQhgjlDTacxU+53FOrkSIDvw8CM2A sU/A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si1952640edz.234.2020.08.29.10.09.34; Sat, 29 Aug 2020 10:09:35 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbgH2RJd (ORCPT + 6 others); Sat, 29 Aug 2020 13:09:33 -0400 Received: from foss.arm.com ([217.140.110.172]:45022 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728410AbgH2RJd (ORCPT ); Sat, 29 Aug 2020 13:09:33 -0400 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 E7D1D101E; Sat, 29 Aug 2020 10:09:31 -0700 (PDT) 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 E18ED3F71F; Sat, 29 Aug 2020 10:09:30 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Cc: Sudeep Holla , kernel-team@android.com, Will Deacon , tsoni@quicinc.com, pratikp@quicinc.com Subject: [PATCH 0/9] firmware: Add initial support for Arm FF-A Date: Sat, 29 Aug 2020 18:09:14 +0100 Message-Id: <20200829170923.29949-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi all, Let me start stating this is just initial implementation to check on the idea of providing more in-kernel and userspace support. Lot of things are still work in progress, I am posting just to get the early feedback before building lot of things on this idea. Consider this more as RFC though not tagged explicity(just to avoid it being ignored :)) 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 partition(secure or normal world VM). If it is a partition managed by hypervisor, then we will register chardev associated with each of those partition FFA device. /dev/arm_ffa: self e3a48fa5-dc54-4a8b-898b-bdc4dfeeb7b8 49f65057-d002-4ae2-b4ee-d31c7940a13d For in-kernel usage(mostly communication with secure partitions), only in-kernel APIs are accessible(no userspace). There may be a need to provide userspace access instead of in-kernel, it is not yet support in this series as we need way to identify those and I am not sure if that belong to DT. -- Regards, Sudeep [1] https://developer.arm.com/documentation/den0077/latest Sudeep Holla (8): dt-bindings: Arm: Extend FF-A binding to support in-kernel usage of partitions arm64: smccc: Add support for SMCCCv1.2 input/output registers firmware: smccc: export both smccc functions 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 and register all the KVM managed partitions firmware: arm_ffa: Setup in-kernel users of FFA partitions Will Deacon (1): dt-bindings: Arm: Add Firmware Framework for Armv8-A (FF-A) binding .../devicetree/bindings/arm/arm,ffa.yaml | 132 +++ .../reserved-memory/arm,ffa-memory.yaml | 71 ++ 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 | 5 + drivers/firmware/arm_ffa/bus.c | 195 +++++ drivers/firmware/arm_ffa/common.h | 27 + drivers/firmware/arm_ffa/driver.c | 755 ++++++++++++++++++ drivers/firmware/arm_ffa/smccc.c | 54 ++ drivers/firmware/smccc/smccc.c | 2 + include/linux/arm-smccc.h | 50 ++ include/linux/arm_ffa.h | 96 +++ include/uapi/linux/arm_ffa.h | 56 ++ 16 files changed, 1492 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/arm,ffa.yaml create mode 100644 Documentation/devicetree/bindings/reserved-memory/arm,ffa-memory.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 create mode 100644 include/uapi/linux/arm_ffa.h -- 2.17.1