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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69311C3A5A3 for ; Fri, 30 Aug 2019 02:47:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36CDE20828 for ; Fri, 30 Aug 2019 02:47:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uSI61IdN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="PS2ni3PW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36CDE20828 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=It+YcvDXsrP1A3emBbsmQbvgZxAOFOIh2RFKQBIs+PQ=; b=uSI61IdN9ZkSEr +JMfIDrftc23vcnI/O4n368LWAsmBdrNXxAvJoIT2jdN1rSfSgWNxircSwoKy7mzLEp7q+Gh71TvA l9aivAcaJC4IKBCA2X9ahZLMsUBSybqZRZojOx1bXHIWC0cPF9hyxIpt4KwmEB4NKKCfwaLPEDrIY GG1VtdMWnKUR5dDloI+UG0ux9HBFNqVziBcAFQzxAyV7GzAOrXL3DqUupiTIu+s+X5SFN8yvWZT0T tHzJSqG0fUBKOuer2JiN/n7njMZjEyUTd35Q6wwtYJUjZWjhjkIBuSV6DEzw2oQMz82MHQpW2NN1p jdvQINX1XOes/OnSLCGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3Wwc-0006b0-Mt; Fri, 30 Aug 2019 02:47:22 +0000 Received: from mail-eopbgr00053.outbound.protection.outlook.com ([40.107.0.53] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i3WwZ-0006aG-7h for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2019 02:47:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T4pUeYd+w6JLW63oLSTdskXsi+pkNQkJGdAumzmOClRgKkMizPPAhosnxQU3b90U+4HfYIx5sAOwATYrAce/QtN+zLlthtUF1kOER1YjFucZbusJ9mo4yfE6xHpU6bsThyamVLWip+vwHZzfmGnEUQqsNfyCOx+0xD2XIQI9ZAiZUuSfaYZ8MSM4JvEdzwR/SaiylidJE4GMGwQOcPao3+IJk8TRo94Qsqc8NkZU+TM5vSXQfNr1wvyEHjBzuWvk42s+bVPlA/1UwFbGwa2L5T+g/taX+sRgJBGiwI6J3ycI+QjWAhus8JWP/uUDBFITTisvGVlMFHg2f0XP8pPl8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q4KoRpd7EaqKp6O4IheB6/QFGAv72fKEvtRcn5C+M6o=; b=eVEgMbTSLSitdDNgAqIoKmAygnf7YhYl2gvkjTEKsC2puiQFt80xGcUMQvtKekGVDc0Jj72/rGyl+fWn7dBnTBC5Pml6kGgsHHOskS9CUlXamh+N4tQjHExADnUjzfu9cE8+RAw2FgCSwXt/Ka3KL9e5RP9vnHl63zn3Jm1STA9wb3IljTsMK/qPSJS7o3hyBzhVdom6qpdV29OAGWN7/774TzwfHVYwmwMS6AvKlRUp2yyh2gjT3cJeh+Jp2900lZVQArtZUM1SiPxJlowjqe15DoFBYy/PkhalHFV0RJxarmmg2nDKUkwEjDRFX5oYg/z8IpzjOf1dpSbOoKHuwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q4KoRpd7EaqKp6O4IheB6/QFGAv72fKEvtRcn5C+M6o=; b=PS2ni3PWTKQRsYxLMMj56yma4jLg8s8N8OwS4XLSWUOHiz0xWiSXXjSyCTLefe7OZ8Z1bYEhrLKl06xLbhMI3LBjI9hTl8Om9lNU8dFjUyMl2AZntZvI994C/CgDfAuYPDy/epYoBI6Nn4pud7x4FXezRmCqbxm3bTQCZZ3OK/M= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5794.eurprd04.prod.outlook.com (20.178.117.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.19; Fri, 30 Aug 2019 02:47:14 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::5d98:e1f4:aa72:16b4]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::5d98:e1f4:aa72:16b4%4]) with mapi id 15.20.2178.023; Fri, 30 Aug 2019 02:47:13 +0000 From: Peng Fan To: Sudeep Holla Subject: RE: [PATCH v5 1/2] dt-bindings: mailbox: add binding doc for the ARM SMC/HVC mailbox Thread-Topic: [PATCH v5 1/2] dt-bindings: mailbox: add binding doc for the ARM SMC/HVC mailbox Thread-Index: AQHVXU0YJPArUxY1ok6XlIUgkri4VacQlpwAgAJnAtA= Date: Fri, 30 Aug 2019 02:47:13 +0000 Message-ID: References: <1567004515-3567-1-git-send-email-peng.fan@nxp.com> <1567004515-3567-2-git-send-email-peng.fan@nxp.com> <20190828135802.GB21614@e107155-lin> In-Reply-To: <20190828135802.GB21614@e107155-lin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: abb46bd8-fdd1-4eee-9dbf-08d72cf45cf8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR04MB5794; x-ms-traffictypediagnostic: AM0PR04MB5794: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0145758B1D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(366004)(346002)(376002)(39860400002)(189003)(199004)(45080400002)(4326008)(478600001)(71200400001)(14454004)(71190400001)(53936002)(5660300002)(9686003)(55016002)(52536014)(6306002)(25786009)(6246003)(256004)(2906002)(14444005)(33656002)(54906003)(15650500001)(8936002)(81166006)(81156014)(8676002)(316002)(66066001)(6116002)(3846002)(7696005)(102836004)(486006)(11346002)(446003)(86362001)(476003)(44832011)(76176011)(229853002)(6916009)(6506007)(26005)(99286004)(74316002)(6436002)(66446008)(64756008)(66556008)(66476007)(76116006)(305945005)(66946007)(7736002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB5794; H:AM0PR04MB4481.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: W5Y+S00YZar/P5iJ0lvAmNjxYui2iLMTSPcGV+X8C8Y3FapOtg3vKiRO0oHc6bPfXQ/gxt1LBk+0y/cEMp8SdQZAsJkei0mqTOZE58Z62xbUlZkY5fSOOxoRz2+fj3xzQ/hqdmMkXWDcQ20AN8roo1FeVCWsP179OQmFnnzmhwQpZ2QwgVlcHrRNcBt7q3C9jkLRsekqdCwdberZJtfYWOTZLUZ30Z5sDvzIusvASwy6ohLDXmKgeuSU1xpJZk2zVPlQwX6WhgO+y1Fu4OAEgWgg1INNxIcO6k3o3hSBdO4C7mdXoXGvcGG8HD88ontyiedei/hbeRu5zbZW5l1sgukAwMX74HMbX9dK+SU6U+B6/vEKEgf46HDNAktV2LS0SFWvy6jU560RygeAvSvHOGanUSxXcfie00Ne28JI5pA= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: abb46bd8-fdd1-4eee-9dbf-08d72cf45cf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2019 02:47:13.8464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LVrbDyo4vXG8kPV+X+EI8DAqs7RWy12gDPSQw6Gk2HiI2yq6g0CszIRzo0c0G6j5ez6jf5W9i0hsR7GjtwSZrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5794 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190829_194719_282934_392A9042 X-CRM114-Status: GOOD ( 31.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "f.fainelli@gmail.com" , "andre.przywara@arm.com" , "jassisinghbrar@gmail.com" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > Subject: Re: [PATCH v5 1/2] dt-bindings: mailbox: add binding doc for the ARM > SMC/HVC mailbox > > On Wed, Aug 28, 2019 at 03:02:58AM +0000, Peng Fan wrote: > > From: Peng Fan > > > > The ARM SMC/HVC mailbox binding describes a firmware interface to > > trigger actions in software layers running in the EL2 or EL3 exception levels. > > The term "ARM" here relates to the SMC instruction as part of the ARM > > instruction set, not as a standard endorsed by ARM Ltd. > > > > Signed-off-by: Peng Fan > > --- > > .../devicetree/bindings/mailbox/arm-smc.yaml | 125 > +++++++++++++++++++++ > > 1 file changed, 125 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/mailbox/arm-smc.yaml > > > > diff --git a/Documentation/devicetree/bindings/mailbox/arm-smc.yaml > > b/Documentation/devicetree/bindings/mailbox/arm-smc.yaml > > new file mode 100644 > > index 000000000000..f8eb28d5e307 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mailbox/arm-smc.yaml > > @@ -0,0 +1,125 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 > > +--- > > +$id: > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi > > > +cetree.org%2Fschemas%2Fmailbox%2Farm-smc.yaml%23&data=02%7 > C01%7Cp > > > +eng.fan%40nxp.com%7C37aa729c94944730868b08d72bbfc121%7C686ea1 > d3bc2b4c > > > +6fa92cd99c5c301635%7C0%7C1%7C637025974936865698&sdata=Inp > %2FLs39m > > +Gv1fe3dZMSaGmgmyWPT6awPh47s3mEtQ%2BQ%3D&reserved=0 > > +$schema: > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi > > > +cetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=02%7C01%7Cpe > ng.fan% > > > +40nxp.com%7C37aa729c94944730868b08d72bbfc121%7C686ea1d3bc2b4c > 6fa92cd9 > > > +9c5c301635%7C0%7C1%7C637025974936865698&sdata=jmoR1Qqm7 > 6N5NwDbgFE > > +Fm8cpdW%2B%2FgqmG9mSGz9mXv58%3D&reserved=0 > > + > > +title: ARM SMC Mailbox Interface > > + > > +maintainers: > > + - Peng Fan > > + > > +description: | > > + This mailbox uses the ARM smc (secure monitor call) and hvc > > +(hypervisor > > + call) instruction to trigger a mailbox-connected activity in > > +firmware, > > + executing on the very same core as the caller. By nature this > > +operation > > + is synchronous and this mailbox provides no way for asynchronous > > +messages > > + to be delivered the other way round, from firmware to the OS, but > > > > + asynchronous notification could also be supported. > > What do you mean by that ? I would prefer to drop the above line unless I am Ok. Dropped it in v6. > missing something. IMO it contradicts the previous statement less you > elaborate more on this. > > > However the value of > > + r0/w0/x0 the firmware returns after the smc call is delivered as a > > + received message to the mailbox framework, so a synchronous > > + communication can be established, for a asynchronous notification, no > value will be returned. > > I assume you refer to asynchronous communication from OS to firmware in > the above statement and "not asynchronous notification" from firmware to > OS. Since asynchronous notification dropped, so it should only be synchronous communication could be established. So I'll modify it as below: r0/w0/x0 the firmware returns after the smc call is delivered as a received message to the mailbox framework, so synchronous communication can be established > > > + The exact meaning of both the action the mailbox triggers as well > > + as the return value is defined by their users and is not subject to this > binding. > > + > > + One use case of this mailbox is the SCMI interface, which uses > > + shared memory to transfer commands and parameters, and a mailbox > to > > + trigger a function call. This allows SoCs without a separate > > + management processor (or when such a processor is not available or > > + used) to use this standardized interface anyway. > > + > > Not sure if reference to SCMI is needed at all but I don't have any objections > to it, just thought worth mentioning. > > > + This binding describes no hardware, but establishes a firmware > interface. > > + Upon receiving an SMC using one of the described SMC function > > + identifiers, the firmware is expected to trigger some mailbox connected > functionality. > > + The communication follows the ARM SMC calling convention. > > + Firmware expects an SMC function identifier in r0 or w0. The > > + supported identifiers are passed from consumers, or listed in the > > + the arm,func-ids properties as described below. The firmware can > > + return one value in the first SMC result register, it is expected > > + to be an error value, which shall be propagated to the mailbox client. > > + > > + Any core which supports the SMC or HVC instruction can be used, as > > + long as a firmware component running in EL3 or EL2 is handling these > calls. > > + > > > Other than the above points, I am fine with it. Once fixed, > > Reviewed-by: Sudeep Holla Thanks, Peng. > > Note I haven't reviewed the yaml scheme, but just binding in general. > > -- > Regards, > Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel