From patchwork Mon Oct 8 10:16:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 148351 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3454836lji; Mon, 8 Oct 2018 03:17:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV62IkaboPHxvFjrplcpEjnJi5+C1fa80ixtfeguQPbfruBUeUfddncB5+0o4IZ2eK4i4NvKy X-Received: by 2002:a63:c044:: with SMTP id z4-v6mr20302747pgi.274.1538993830786; Mon, 08 Oct 2018 03:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538993830; cv=none; d=google.com; s=arc-20160816; b=Kw2UglAAh4i2+6a7MHfMtwWTSt07bgB3Y5IWvgxjkzZJCGOVLscSmJD5WrEDvrdALh 1Y/SU+I64jXj4bIlz8pLDTkJnOu+5vrjkHKa51mgKjyi26NujR4Ghp7ai5HJzqzm+wnt aaR73a9XbDrjTxHkjYBSf7T4qQHTNvLRl1Xly2T51fgh5EZg+JbLeuR3xFOpbYzObB8r S4y9YRbKebO9czC/kX5y23cbUXF1jKSBm9+TmBrD2TJ5AJ/Yg3btJKWK62lSQ9KODmGp mupteXk3XJ6DsQrR1AwFmk3Iv0KnU04iMAUMuLOnTusIglr5Uv1de3lX4tsirLPd/SGw /hWA== 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 :dkim-signature; bh=DiOOxEqDanhgutW/0IuAYDiXhY1M1+Js3XIKYvcLGqg=; b=yMS6i7PUEWtToJT4LQNrbFbuqi+BzhKGn+OxZL64scAjJoOVpRJ89j061Jpo8E8a3W nhxysFpMfu6+qf9b0yOWxbV/mL4HKHgJFAExfXO3kBWTrVn+vYT1UExh9yWQ9x41EFRX ytaLxS/2UQITmD4ch5SVlXBVpbgOKPZCe/rCbJrUdV1U0hTDH7wenP4KNa9X1TuhAIvo etw7ACHooLCaFCjOV3+li4TwkUOt6rEP2N2LMFceN2gOHncgy4gAJUNaYQsFjM9FUGzk DTEbikkqoUFolYu/tkD8theUyt+QvZicD+gS1cUzqH5iqNcsaKxN/3rFRpr9qUYbjhjo H7Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N5IHKZfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74-v6si13724077pge.31.2018.10.08.03.17.10; Mon, 08 Oct 2018 03:17:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N5IHKZfF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727285AbeJHR2H (ORCPT + 32 others); Mon, 8 Oct 2018 13:28:07 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40827 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbeJHR2H (ORCPT ); Mon, 8 Oct 2018 13:28:07 -0400 Received: by mail-pf1-f193.google.com with SMTP id s5-v6so8146870pfj.7 for ; Mon, 08 Oct 2018 03:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=DiOOxEqDanhgutW/0IuAYDiXhY1M1+Js3XIKYvcLGqg=; b=N5IHKZfFyo8KF19XiZmHuhwjgzQ/H9tgzJ2N6GUemxDKv2MY/8V6Be/76tECAO19Ui tkLllpWmqAnjKcO5LgFYQJEDyLjUW1gd+0H38wXLEbHqjpEURMRU117Ao0FT7qG6WAKa GmQA90IbLFIY8OxKNkxqFKRE+81Noh0S2Fq50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DiOOxEqDanhgutW/0IuAYDiXhY1M1+Js3XIKYvcLGqg=; b=IhTfm+9NtlepZ4vOnKpP4+Uuki8UrHPF96lE8MdV8VShsm3LGfuBALl8gM3oYA/9Eg +8LblutrTPNWBOEv6yovEVz9uw13t+plRKD4Y1WY+u+xhKo2+LOAokejjDRtlSb8zl7/ yVjhNmzuEdPzvOZFzEb9op2LiM7GOyccA19l1+Jm7GnlbV8qjiYsnhEZe5UVMEULNAG0 214eOPRAU88qwgB5c6kVlu0hXYeXG8z/dUu6xPf48oXVMNYTB8HVAmHeo9jpbeCVEOBX MwuxIeay3k82kvmVX8hLc7xY9VCXt8iidf3f8//oJvJpEBV9odd+Yea4Kk0LY/vOyz8Q d4/Q== X-Gm-Message-State: ABuFfohemf53NuMkS/cfV5EcR1kmBp6aVNj/hmcaF8gAuLRGx7AwsWA8 eGxQhAS++hrawOtgbqtuXiX6gA== X-Received: by 2002:a63:ea43:: with SMTP id l3-v6mr20655352pgk.427.1538993827990; Mon, 08 Oct 2018 03:17:07 -0700 (PDT) Received: from jfw540.solutionip.com (165084180235.ctinets.com. [165.84.180.235]) by smtp.gmail.com with ESMTPSA id m10-v6sm24601032pfg.180.2018.10.08.03.17.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 03:17:07 -0700 (PDT) From: Jerome Forissier To: Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Peter Maydell , Etienne Carriere , tee-dev@lists.linaro.org, Jerome Forissier Subject: [PATCH v2] Documentation: dt: Add binding for /secure-chosen/stdout-path Date: Mon, 8 Oct 2018 18:16:42 +0800 Message-Id: <20181008101642.8040-1-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some platforms may use a single device tree to describe two address spaces, as described in d9f43babb998 ("Documentation: dt: Add bindings for Secure-only devices"). For these platforms it makes sense to define a secure counterpart of /chosen, namely: /secure-chosen. This new node is meant to be used by the secure firmware to pass data to the secure OS. Only the stdout-path property is supported for now. Signed-off-by: Jerome Forissier --- Notes: Sending this again, slightly modified. Previous submission was in March 2017 [1]. Since then, OP-TEE has implemented this binding for platforms that use DT [2] (fallback to /chosen/stdout-path to be implemented in [3]). A patch for QEMU has been proposed [4], to which the maintainer responded "Are the DT bindings upstream yet?" ;-) [1] https://patchwork.kernel.org/patch/9602401/ [2] https://github.com/OP-TEE/optee_os/commit/4dc31c52544a [3] https://github.com/OP-TEE/optee_os/pull/2569 [4] https://patchwork.ozlabs.org/patch/979345/ Changes since v1: - Use "should" instead of "may" ("...the Secure OS should use the value of /chosen/stdout-path..."). Documentation/devicetree/bindings/arm/secure.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 2.15.1 diff --git a/Documentation/devicetree/bindings/arm/secure.txt b/Documentation/devicetree/bindings/arm/secure.txt index e31303fb233a..f27bbff2c780 100644 --- a/Documentation/devicetree/bindings/arm/secure.txt +++ b/Documentation/devicetree/bindings/arm/secure.txt @@ -32,7 +32,8 @@ describe the view of Secure world using the standard bindings. These secure- bindings only need to be used where both the Secure and Normal world views need to be described in a single device tree. -Valid Secure world properties: +Valid Secure world properties +----------------------------- - secure-status : specifies whether the device is present and usable in the secure world. The combination of this with "status" allows @@ -51,3 +52,19 @@ Valid Secure world properties: status = "disabled"; secure-status = "okay"; /* S-only */ status = "disabled"; /* disabled in both */ status = "disabled"; secure-status = "disabled"; /* disabled in both */ + +The secure-chosen node +---------------------- + +Similar to the /chosen node which serves as a place for passing data +between firmware and the operating system, the /secure-chosen node may +be used to pass data to the Secure OS. Only the properties defined +below may appear in the /secure-chosen node. + +- stdout-path : specifies the device to be used by the Secure OS for + its console output. The syntax is the same as for /chosen/stdout-path. + If the /secure-chosen node exists but the stdout-path property is not + present, the Secure OS should not perform any console output. If + /secure-chosen does not exist, the Secure OS should use the value of + /chosen/stdout-path instead (that is, use the same device as the + Normal world OS).