Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5104448ybl; Wed, 22 Jan 2020 10:22:36 -0800 (PST) X-Google-Smtp-Source: APXvYqy0BCA+djgV+DKj2s50YlWlsMTD8sEjQcqLvwhwqT8fBEntsJVfQdnYumvDQLmWhw552pVl X-Received: by 2002:aca:f10:: with SMTP id 16mr7329445oip.117.1579717356744; Wed, 22 Jan 2020 10:22:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579717356; cv=none; d=google.com; s=arc-20160816; b=lcLJZfLOnrHnzHrNRUEu5b7XtYysci4ccSF7tiJ4F/LoR4fpynM+BJWb19fpg2WM4s 7LcoMpYvhhDKb0Wt0VW6KIDo3o00Wlt9rjhV54zb/ehf375NHEIn9JgoKXHc3JPW4q3j Biu5HDB0a5WT/5/swry104XaGPbHJ/Mj9ltk24OL7MGQHrOORP0DnetSvr91zScDMDUr /EvVodi78/aoI6LOvdrfoLIR94ntL5nSymNhGbBrqaks/Qr96/gvQ/iiylk3kNmnKCnW GNlMDSHjwI12E2MuOi0cKLz6F34oAtnVZhksMJFmUT/iazl7f/i0GlyRwvMOdiqd5d3u rTLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vIx4lscja28Uh7U0W4QY+DTsixl+e93XKF+xyAQNdMk=; b=TEXnVyvd+I0zyO4zcZS6t9UA7s3gKz1Am55OTsSVFiWTMilMDbiR6qQQB6SUuJkeK4 1xKt+0QRyiSIP4BVhshczLj47RjjAYTALBSF9MPXLBszEmm7ShGxnFyUBguUl06wqtJe D8RoVRdtSzxqUz/6bq2BsT6WZsedgcYwLV2pTsZi6eVHiIE6zVE0s5p6/eGSHSj3xjiR /P7ZMyRg2FbBtQEBxULcSnydRYHQb0iIfAAaKNU9LsQowMn/YtlTGMlneBGQtpCy3rCQ XIXocFtWkH/cgzAGkXjA1LNAcoGBpQOUOo9kQuY6vZJb8SXsq8m5xVSB3+fRhiIouUJ8 tJMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Py6sZFPW; 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 w81si21668320oig.107.2020.01.22.10.22.24; Wed, 22 Jan 2020 10:22:36 -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=Py6sZFPW; 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 S1726621AbgAVSUP (ORCPT + 99 others); Wed, 22 Jan 2020 13:20:15 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42978 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgAVSUO (ORCPT ); Wed, 22 Jan 2020 13:20:14 -0500 Received: by mail-lj1-f196.google.com with SMTP id y4so65283ljj.9 for ; Wed, 22 Jan 2020 10:20:13 -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; bh=vIx4lscja28Uh7U0W4QY+DTsixl+e93XKF+xyAQNdMk=; b=Py6sZFPW2rMeWUelSibRbBmW0O9lCok0imy0xJPQxD6E5wUAmwUvG7228z23p6JjM2 UjNDlKBFDWAHAWBNLSzZJGpyPzmo+t1ZWX7pWot2/Keh7r9YC4/BusdkIjsRhOhzUb1u ZMdT5WzgP9usGVMRUrOU0FEmzrDSNQd/jZ+JlLzeLF0gCML6gsJlFNpbQ7rBtJUcF3+x HigiKuS8ujAFanPzShz6dbqHtKy01a4TsAoL+PPC3PMc5uGmDJH0eR+fWEYGNfesUTyV K2ztLTZ1DnW4Srpx5HUes9jnw3SIWWPncUiMF6JJkwSBf1OsOBFxnNpx6FLQjF6sem9j RUZQ== 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; bh=vIx4lscja28Uh7U0W4QY+DTsixl+e93XKF+xyAQNdMk=; b=jzcgFmrFQfeBviLCfLFbWmR4wwWaGOGivl2ljKGV6lxixpIE+3eOrgXHUcExTrfkKs av6cxYokmNgsA09k9+ndoNJACiai7rM6AkHrAMNg62VqRnsN/twiMddt3TNvTKP9GK9N yzq2tUIGQZcriDEFYSclvrsH+XQcXHW7S63vc892R8AamkUCmHuG87LGdNJnhVIRQO3Z G7sfwg/J5cJhKuP0diKn9ka2OhwQxPXQqOv0AhvSAaDSf/hEINq2HDAWugEqfu84RflG TAQav6pbhV+Wzc8B5YdCsyyKYy2R6EZw79HMBDcmscpi0hf3jOjhES3z1nWZEnb7NtAQ 0lZQ== X-Gm-Message-State: APjAAAXers4EUz+9pjqYXBxaBj93N2grzcHCNxclFd+xts+ewEPEMYvw +vCmy7IO+tUfzh97GHfEZe8oblfIWvKmxxWexDBg1Q== X-Received: by 2002:a2e:880a:: with SMTP id x10mr20107250ljh.211.1579717212687; Wed, 22 Jan 2020 10:20:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Etienne Carriere Date: Wed, 22 Jan 2020 19:20:01 +0100 Message-ID: Subject: Re: [PATCH v11 2/2] mailbox: introduce ARM SMC based mailbox To: Peng Fan , f.fainelli@gmail.com, andre.przywara@arm.com, linux-kernel@vger.kernel.org, etienne carriere 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 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://lore.kernel.org/patchwork/patch/812999/ > > 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 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. 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