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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93F54C433FE for ; Tue, 1 Mar 2022 15:12:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234071AbiCAPNG (ORCPT ); Tue, 1 Mar 2022 10:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232130AbiCAPNE (ORCPT ); Tue, 1 Mar 2022 10:13:04 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0AE48BC2E; Tue, 1 Mar 2022 07:12:23 -0800 (PST) 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 CAA6F1042; Tue, 1 Mar 2022 07:12:22 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A55A3F70D; Tue, 1 Mar 2022 07:12:21 -0800 (PST) Date: Tue, 1 Mar 2022 15:12:19 +0000 From: Sudeep Holla To: Ahmad Fatoum Cc: Etienne Carriere , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , Cristian Marussi , Vincent Guittot , devicetree@vger.kernel.org, Rob Herring , Pengutronix Kernel Team Subject: Re: [PATCH v8 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Message-ID: References: <20211028140009.23331-1-etienne.carriere@linaro.org> <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ahmad, On Mon, Feb 28, 2022 at 05:01:39PM +0100, Ahmad Fatoum wrote: > Hello Etienne, > > On 28.10.21 16:00, Etienne Carriere wrote: > > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > > based on an OP-TEE service invocation. The compatible mandates a > > channel ID defined with property "linaro,optee-channel-id". > Not sure if Etienne's reply addressed your queries/concerns correctly. I thought I will add my view anyways. > I just found this thread via the compatible in the STM32MP131 patch set: > https://lore.kernel.org/all/20220225133137.813919-1-gabriel.fernandez@foss.st.com/ > > Linux doesn't care whether PSCI is provided by TF-A, OP-TEE or something > else, so there is just the arm,psci* compatible. > Correct, the interface to the kernel is fixed and hence we must be able to manage with the standard and fixed sole set of bindings for the same. > What's different about SCMI that this is not possible? Why couldn't the > existing binding and driver be used to communicate with OP-TEE as secure > monitor as well? > However with SCMI, the spec concentrates and standardises all the aspects of the protocol used for the communication while it allows the transport used for such a communication to be implementation specific. It does address some standard transports like mailbox and PCC(ACPI). However, because of the flexibility and also depending on the hardware(or VM), different transports have been added to the list. SMC/HVC was the one, followed by the virtio and OPTEE. While I agree SMC/HVC and OPTEE seem to have lot of common and may have avoided separate bindings. However the FIDs for SMC/HVC is vendor defined(the spec doesn't cover this and hence we utilised/exploited DT). Some vendors wanted interrupt support too which got added. OPTEE eliminates the need for FID and can also provide dynamic shared memory info. In short, it does differ in a way that the driver needs to understand the difference and act differently with each of the unique transports defined in the binding. Hope that explains and addresses your concern. -- Regards, Sudeep 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7508BC433F5 for ; Tue, 1 Mar 2022 15:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s/ERuT8OYbIC2I3tZWkZFqEag/D4R8fsMH/G+KhzrtQ=; b=zZD2TW5EvMny80 WnByzdAPzXnweP6ZyH00Rq8DrfGeGup3QrnTcFJ5OH+EbA+dp8qDlH0XSMgLUMVpCP6IeZdP7Sr3n pItG7F1+1XZ9hIJp+Afs3oaZ5Awx3JHb9xvvIIWATT6juBdwGEh3dF5bGWhf4RdG4225sBR1MDkZE 7rZR0o913yrH8w2piro5uH83SZsRAveHP7/tlbJg5QoqwoQxThgH+Y+jO02djYlNc6+pCqJ0TiAt5 XeMdIy2MbhKVhkMe1fjFoEFtT/KXBhZWrEWSteTWmKnRSatK6xtwz3luj8ELRxNmtcEje6t5Nxq3C vXvY/I8zGKij6YDbtb1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP4Aw-00HDiQ-5W; Tue, 01 Mar 2022 15:12:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nP4Ar-00HDhR-IY for linux-arm-kernel@lists.infradead.org; Tue, 01 Mar 2022 15:12:28 +0000 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 CAA6F1042; Tue, 1 Mar 2022 07:12:22 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7A55A3F70D; Tue, 1 Mar 2022 07:12:21 -0800 (PST) Date: Tue, 1 Mar 2022 15:12:19 +0000 From: Sudeep Holla To: Ahmad Fatoum Cc: Etienne Carriere , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , Cristian Marussi , Vincent Guittot , devicetree@vger.kernel.org, Rob Herring , Pengutronix Kernel Team Subject: Re: [PATCH v8 1/2] dt-bindings: arm: Add OP-TEE transport for SCMI Message-ID: References: <20211028140009.23331-1-etienne.carriere@linaro.org> <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <58a0e791-9573-99c2-0cc5-3920a1048113@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220301_071225_670107_0ED304B0 X-CRM114-Status: GOOD ( 20.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Ahmad, On Mon, Feb 28, 2022 at 05:01:39PM +0100, Ahmad Fatoum wrote: > Hello Etienne, > > On 28.10.21 16:00, Etienne Carriere wrote: > > Introduce compatible "linaro,scmi-optee" for SCMI transport channel > > based on an OP-TEE service invocation. The compatible mandates a > > channel ID defined with property "linaro,optee-channel-id". > Not sure if Etienne's reply addressed your queries/concerns correctly. I thought I will add my view anyways. > I just found this thread via the compatible in the STM32MP131 patch set: > https://lore.kernel.org/all/20220225133137.813919-1-gabriel.fernandez@foss.st.com/ > > Linux doesn't care whether PSCI is provided by TF-A, OP-TEE or something > else, so there is just the arm,psci* compatible. > Correct, the interface to the kernel is fixed and hence we must be able to manage with the standard and fixed sole set of bindings for the same. > What's different about SCMI that this is not possible? Why couldn't the > existing binding and driver be used to communicate with OP-TEE as secure > monitor as well? > However with SCMI, the spec concentrates and standardises all the aspects of the protocol used for the communication while it allows the transport used for such a communication to be implementation specific. It does address some standard transports like mailbox and PCC(ACPI). However, because of the flexibility and also depending on the hardware(or VM), different transports have been added to the list. SMC/HVC was the one, followed by the virtio and OPTEE. While I agree SMC/HVC and OPTEE seem to have lot of common and may have avoided separate bindings. However the FIDs for SMC/HVC is vendor defined(the spec doesn't cover this and hence we utilised/exploited DT). Some vendors wanted interrupt support too which got added. OPTEE eliminates the need for FID and can also provide dynamic shared memory info. In short, it does differ in a way that the driver needs to understand the difference and act differently with each of the unique transports defined in the binding. Hope that explains and addresses your concern. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel