Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp637937ybl; Wed, 29 Jan 2020 07:04:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzkAkrgCQqqA8VmEFNypYFDSDibZx3X+zZsVMYRudStExKk/kQCg/Lq2xhK3emRSvibLHtJ X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr21453287otq.54.1580310258925; Wed, 29 Jan 2020 07:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580310258; cv=none; d=google.com; s=arc-20160816; b=vFvanZDhlm8x7AzEfzLzMlQqFXSSBuOTU4kBj2MbmNAyicURe35zoHu3+EDZtSMcL6 tvbyPcrkTaiJvz52OHl3fCk9bCaUms5LmeLam3NXFs6bxt3SG8WDfjtEU7HD3LjpYRak UKXiyD9hqb9a7SF++3z4y3Y4EPDYSExepSEb05l8U7/hyHq9TaNNzMLeePj1iIq1irBP cQkxm0myIjheSw17wTbZomTetUqCQHlqbvH8XdHuyH80U9Cvj6xmNV8ob4E0kXQGtacc mwTrATKYLfUukHrjYUzzocxEqZ2+3+Bip7z0V+u4k9tjxxatjwjhqXP/sxz5cM/QlRlj AscA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Sl0aMJ8sRZgoVukqPOv8d6RJ06Z/tyLk7TNt6vzRqMs=; b=dbQf/95KvlXyr8fAXa/KIIC/QHaQ2WWnujjyoN26exJ8+VAbetjdwAbL/oSvT6MnIm vyoeZRCdUig6CQqZg7Tq2ztT15Vqnh23okojnpVm5rh+4h3mVL9/juZSbA+KVS/YMmia se2+ZwVbkETqLyOOKZnWVf6bRN0Ad8SgjGuGVxRxf0jBNnO2gWYSzqgZDYnVLN8EnO0X GMNzKsBE0o7/JkZboLVNuFYp1DiZIeRgmaKNpFyABbph8VWdCi0Pn/ec45Ydxva0jAoA dCjvZD0mlvBMXGYoYp3j1PACqVQY7OVCLKXrTqvdfVRoGFzArjLuuaUD/F+F77ljmCCf uMtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deMtnl3R; 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 10si1026006ois.76.2020.01.29.07.04.05; Wed, 29 Jan 2020 07:04:18 -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; dkim=pass header.i=@linaro.org header.s=google header.b=deMtnl3R; 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 S1726821AbgA2PBV (ORCPT + 99 others); Wed, 29 Jan 2020 10:01:21 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37189 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgA2PBU (ORCPT ); Wed, 29 Jan 2020 10:01:20 -0500 Received: by mail-lj1-f194.google.com with SMTP id v17so18797813ljg.4 for ; Wed, 29 Jan 2020 07:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Sl0aMJ8sRZgoVukqPOv8d6RJ06Z/tyLk7TNt6vzRqMs=; b=deMtnl3RJ9qIDAe8ySKPee8iLeDGsHO/LLb/UtJOGe8IEMpDwzi/TmeYieAncJajhp CURjpnXLNwKxVGvj2LG9XnuPS09dUEs57GNdugFNrVrzpUg7zS08JnaprdOyZSyKqgFg Jd+V63T3aTQ33cz6ABCHZVk4SpUFSF0S4X52Ww6/2qecUPQAjPF7dK0nOU0h+5r2h61I cpr2sI5h99PQQhvwa45cE4wxwnu/u5c0QlCWN4fWCfkRP4tVdD0x5VIZ+M3iV/AP/Col 7uboZf4VBw/H/xWrsE0GkpV2138IXeM/qvgC1WwslV98YcdPUxWTawI4ryegCKbm1WAX Zf/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sl0aMJ8sRZgoVukqPOv8d6RJ06Z/tyLk7TNt6vzRqMs=; b=ZcXu8KmuTDR6vcxllAEoFjg1hOj2zaKokSJePk+CYVYpnZfQg1R3qpSRZTo4mqMDcD +Fj1vwAmKnu4QTvt7e5TyowEe/aepWkct01kI4QGXjaiuOY2rj26KSz5fgRMID2SIF/x CqNqMU3L6KzEdvm+S/cIbxAWV7Pftxftb3sTZKEDfqCjJf65bHjZfKFTpfghvto5C+yE fyeu27J9jG3LPNeKWlwTEiHaHDqti24LgdnfBI0/qRt2SFqklv2K+amubkqCjSjxojIB pBmJjNvGDEAkYGuR6D4R+wC8PKBwD40d/D5hVH5bnMc+jviyOoIeZexKsZ8YclSGFgyu Qbbw== X-Gm-Message-State: APjAAAV2UgCBrqqoXiRMeNrrVwGfDFkRrV38O2EOWE6V8wOZUjVo3Q0r F1AZOUODdhgcgOn3VSiTTRgDIT6ZY2xpqXrAcJ1Eng== X-Received: by 2002:a2e:8e84:: with SMTP id z4mr13884597ljk.207.1580310078530; Wed, 29 Jan 2020 07:01:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Etienne Carriere Date: Wed, 29 Jan 2020 16:01:07 +0100 Message-ID: Subject: Re: [PATCH v11 2/2] mailbox: introduce ARM SMC based mailbox To: Peng Fan Cc: "f.fainelli@gmail.com" , "andre.przywara@arm.com" , "linux-kernel@vger.kernel.org" , etienne carriere , Sudeep Holla Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Etienne > > Thanks, > Peng. > > > I'm also working on getting this SCMI server upstream in TF-A and OP-TEE. > > Your SMC based mailbox driver is a valuable notification scheme for our SCMI > > services support in Arm TZ secure world. > > > > Regards, > > Etienne