From patchwork Wed Dec 6 19:01:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 845291 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ysShT4KBgz9s81 for ; Thu, 7 Dec 2017 06:04:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbdLFTEI (ORCPT ); Wed, 6 Dec 2017 14:04:08 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40666 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbdLFTEI (ORCPT ); Wed, 6 Dec 2017 14:04:08 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69732165C; Wed, 6 Dec 2017 11:04:08 -0800 (PST) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.207.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5521C3F487; Wed, 6 Dec 2017 11:04:06 -0800 (PST) From: James Morse To: linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.cs.columbia.edu, devicetree@vger.kernel.org, Will Deacon , Catalin Marinas , Mark Rutland , Rob Herring , Marc Zyngier , Christoffer Dall , Lorenzo Pieralisi , Loc Ho , Heyi Guo Subject: [PATCH v5 06/16] Docs: dt: add devicetree binding for describing arm64 SDEI firmware Date: Wed, 6 Dec 2017 19:01:32 +0000 Message-Id: <20171206190142.9246-7-james.morse@arm.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171206190142.9246-1-james.morse@arm.com> References: <20171206190142.9246-1-james.morse@arm.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Software Delegated Exception Interface (SDEI) is an ARM standard for registering callbacks from the platform firmware into the OS. This is typically used to implement RAS notifications, or from an IRQ that has been promoted to a firmware-assisted NMI. Add a new devicetree binding to describe the SDE firmware interface. Signed-off-by: James Morse Acked-by: Rob Herring --- Changes since v2: * Added Rob's Ack * Fixed 'childe node' typo Changes since v1: * Added bound IRQ description for binding, * Reference SMC-CC, not 'AAPCS like' * Move sdei node under firmware node (and the file path) .../devicetree/bindings/arm/firmware/sdei.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/firmware/sdei.txt diff --git a/Documentation/devicetree/bindings/arm/firmware/sdei.txt b/Documentation/devicetree/bindings/arm/firmware/sdei.txt new file mode 100644 index 000000000000..ee3f0ff49889 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/firmware/sdei.txt @@ -0,0 +1,42 @@ +* Software Delegated Exception Interface (SDEI) + +Firmware implementing the SDEI functions described in ARM document number +ARM DEN 0054A ("Software Delegated Exception Interface") can be used by +Linux to receive notification of events such as those generated by +firmware-first error handling, or from an IRQ that has been promoted to +a firmware-assisted NMI. + +The interface provides a number of API functions for registering callbacks +and enabling/disabling events. Functions are invoked by trapping to the +privilege level of the SDEI firmware (specified as part of the binding +below) and passing arguments in a manner specified by the "SMC Calling +Convention (ARM DEN 0028B): + + r0 => 32-bit Function ID / return value + {r1 - r3} => Parameters + +Note that the immediate field of the trapping instruction must be set +to #0. + +The SDEI_EVENT_REGISTER function registers a callback in the kernel +text to handle the specified event number. + +The sdei node should be a child node of '/firmware' and have required +properties: + + - compatible : should contain: + * "arm,sdei-1.0" : For implementations complying to SDEI version 1.x. + + - method : The method of calling the SDEI firmware. Permitted + values are: + * "smc" : SMC #0, with the register assignments specified in this + binding. + * "hvc" : HVC #0, with the register assignments specified in this + binding. +Example: + firmware { + sdei { + compatible = "arm,sdei-1.0"; + method = "smc"; + }; + };