Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp731698ybl; Wed, 29 Jan 2020 08:44:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwZ8zuNvE5oWE37CcWmr4C/AgmSEwMH7FOg9DOqMbGQv3Cd6+pEr0gBcQquLofcVz8ipEWt X-Received: by 2002:a05:6830:139a:: with SMTP id d26mr100319otq.75.1580316274206; Wed, 29 Jan 2020 08:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580316274; cv=none; d=google.com; s=arc-20160816; b=b2ktKpLzild11NuKhGVN7zdd7ZdDQmx1B84ngyWshfgslq5mfiFj2Re2TmLQ1mQA/2 N9QvDAIuSAaHQdiEgoMkW9gb1Yv7Jwp5OElhASIe3pO15zw33zQs1BowLHqXrERTXWf0 0ydTXOepWy91XlFCRM3wHM+jX5UyTTts426g08TfGAcCYM+OEGF3wWqHnB0LNqCS4Hyc g1OAWW2+LbZEeBmKBtO2V7wEpZkVEn9D0PIJefcxIr5OZGNVdRComD9FdYj6ID2q6SPP Sb7EUPvW74+/1hiozAkUEYaf7QCnTEMDcMfEptbR5JREW1UkCueHNDKA6M4Vk6c8eu/n BXUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=CD2X34sU5ixHHML2covJ1V72jxFWwL+AhvhLhLpJM+4=; b=tDYrRGNdSrnOKWHmK6dKSJhkAEEDXhMrsGrMI1Lzblm8ScvZ8J2/du6jgISmU+H6e2 weAHVo0R/W9fza0q1FlSafv52D1KrN/O5qFITnbET8tAkWeeA1+YHtbjROglfYjf48pg rINPakFjRc3OZlhZ0Y67qw04c6CsXtecW6As4v/ldgED2K8YyD3wEPIqby5O+wEVVicf gVUKUNrILh/MIuBRYiouTVdyGgrzwzVB78fQR6RpSYoj8/l3DnYgGEFpJqmXCPsCRKXZ D8nTMPNWVys14ATKyhFnP8MP2ywtXotpSXLJGnkwn0wQf8N+TKDu6HoNzVi1FCEIn9Ve Or+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l84si1259365oig.5.2020.01.29.08.44.21; Wed, 29 Jan 2020 08:44:34 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbgA2QkX (ORCPT + 99 others); Wed, 29 Jan 2020 11:40:23 -0500 Received: from foss.arm.com ([217.140.110.172]:43474 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726645AbgA2QkW (ORCPT ); Wed, 29 Jan 2020 11:40:22 -0500 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 B84B2328; Wed, 29 Jan 2020 08:40:21 -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 B87F43F52E; Wed, 29 Jan 2020 08:40:20 -0800 (PST) Date: Wed, 29 Jan 2020 16:40:18 +0000 From: Sudeep Holla To: Etienne Carriere Cc: Peng Fan , "f.fainelli@gmail.com" , "andre.przywara@arm.com" , "linux-kernel@vger.kernel.org" , etienne carriere , Sudeep Holla Subject: Re: [PATCH v11 2/2] mailbox: introduce ARM SMC based mailbox Message-ID: <20200129164018.GE36496@bogus> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 29, 2020 at 04:01:07PM +0100, Etienne Carriere wrote: > Hello Peng, > > On Mon, 27 Jan 2020 at 13:58, Peng Fan wrote: > > > > > Subject: Re: [PATCH v11 2/2] mailbox: introduce ARM SMC based mailbox > > > > > > Hello Peng and all, > > > > > > > > > > From: Peng Fan > > > > > > > > This mailbox driver implements a mailbox which signals transmitted > > > > data via an ARM smc (secure monitor call) instruction. The mailbox > > > > receiver is implemented in firmware and can synchronously return data > > > > when it returns execution to the non-secure world again. > > > > An asynchronous receive path is not implemented. > > > > This allows the usage of a mailbox to trigger firmware actions on SoCs > > > > which either don't have a separate management processor or on which > > > > such a core is not available. A user of this mailbox could be the SCP > > > > interface. > > > > > > > > Modified from Andre Przywara's v2 patch > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore > > > > .kernel.org%2Fpatchwork%2Fpatch%2F812999%2F&data=02%7C01%7 > > > Cpeng.fa > > > > > > > n%40nxp.com%7C735cc6cd00404082bf8c08d79f67b93a%7C686ea1d3bc2b4 > > > c6fa92cd > > > > > > > 99c5c301635%7C0%7C0%7C637153140140878278&sdata=m0lcAEIr0ZP > > > tyPHorSW > > > > NYgjfI5p0genJLlhqHMIHBg0%3D&reserved=0 > > > > > > > > Reviewed-by: Florian Fainelli > > > > Reviewed-by: Andre Przywara > > > > Signed-off-by: Peng Fan > > > > > > I've successfully tested your change on my board. It is a stm32mp1 with TZ > > > secure hardening and I run an OP-TEE firmware (possibly a TF-A > > > sp_min) with a SCMI server for clock and reset. Upstream in progress. > > > The platform uses 2 instances of your SMC based mailbox device driver > > > (2 mailboxes). Works nice with your change. > > > > > > You can add my T-b tag: Tested-by: Etienne Carriere > > > > > > > Thanks, but this patch has been dropped. > > > > Per Sudeep, we all use smc transport, not smc mailbox , > > I'll post patch in a few days based on the transport split patch. > > Ok, i am syncing. > > > > > > > FYI, I'll (hopefully soon) post a change proposal in U-Boot ML for an equvalent > > > 'SMC based mailbox' driver and SCMI agent protocol/device drivers for clock > > > and reset controllers. > > > > Great to know you did scmi agent code in U-Boot. Do you have some public repo > > for access? > > I've created a P-R on my github repo to share until I submit to u-boot: > https://github.com/etienne-lms/u-boot/pull/3 > > I guess I will change my u-boot proposal and get a SMC SCMI transport > outside of the mailbox framework. > Unless U-boot has mailbox framework or you are importing it, it's better to keep U-boot implementation simple as SMC transport which I think you already do. I had a look at the implementation[1], it shouldn't change much other than if you prefer not to use "mailbox" terminology. I don't understand the reason for even using the mailbox term there in the first place. -- Regards, Sudeep [1] https://github.com/etienne-lms/u-boot/pull/3/commits/34812c9175436f6a082f77347c5384393757c233