Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2908605rdh; Mon, 30 Oct 2023 11:03:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgKu5HCDoB/S8UjUu07wOh0ruQosI0P4Y+94FaYX/x/mKUA8Vbsp4mXqHrCPPMNbj/UQA5 X-Received: by 2002:a05:6a20:32aa:b0:180:9bb6:6527 with SMTP id g42-20020a056a2032aa00b001809bb66527mr1693375pzd.36.1698688991665; Mon, 30 Oct 2023 11:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698688991; cv=none; d=google.com; s=arc-20160816; b=u35087Vu8+05H+R0ea8dpDM2V7DPhmvOYcDznY+i239ognyUGaUSvIxroC/Hv6+6qA FPLJXKU7OLCtLrlNGJSi91FzcPIHgfWtJ3/NJpBW0Bf/4gp/b5PZLgu8+AanPnQflHZ/ Ef1vBBS8WxAkCHho3ZzL78s3IjuCy7eCZYc6oQEjwtyiYAELmwdTGzl6XuEeI3TytscL qd7zoNV30PKMXyNubyTVaEyW9Zw3VZkZ7OtEFT3DOprMXmqxvsTKBlXh/gk8piRsCk/l 39LKcxFhYGn2kTuFy4FBsKLc5hR90+8EjrhWe7wTU3tfSnsFKjwlMga5EnTK3mRBLjBd rb1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tPCY4tkVUipxIg/AwJ77gYYa3fQWKVHm4osJfnDD/Xg=; fh=4rS3z2GZ1ocdMbfT3SJm9qlR2aByO+76qKwLKciDblA=; b=ZVNGrZZZnufHFyWz+iq/dBmQKR4Fww6yjxUw7vtLw6IMLm2EOYjFcPuQQph0H4KwpQ p1hznV94wdWlz3Xhn2bDsWtsFI3HRgUXkM3s8pxKPL23Y0lED+g6hO8gBbuNmyGj+dVc /tXLW5BI3AKpqoTYUOMX0wjnuK0DSrHZKX5qdjdPLO82kd7yG7r1OCEr8izf1ousqPbH 5qrUBavnbxIrAsTvvcEN52sYMrJ/36ZUGXcLCrL7akZg4Xh7xL2GFKlQIIJkSAQl4/Aq bJeu8FF1JrPIbgJD39KtCphEykhJahWuCId49h3K92bX+YXN2wO9qsSZslaM2E3fmNOS Y1Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DzzF1Cmj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ck6-20020a056a02090600b005b90af1943asi5564814pgb.807.2023.10.30.11.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 11:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DzzF1Cmj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8960680505DA; Mon, 30 Oct 2023 11:03:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbjJ3SC5 (ORCPT + 99 others); Mon, 30 Oct 2023 14:02:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjJ3SC4 (ORCPT ); Mon, 30 Oct 2023 14:02:56 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC38B4 for ; Mon, 30 Oct 2023 11:02:53 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2c50cf61f6dso69527981fa.2 for ; Mon, 30 Oct 2023 11:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698688971; x=1699293771; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tPCY4tkVUipxIg/AwJ77gYYa3fQWKVHm4osJfnDD/Xg=; b=DzzF1CmjA16IB/jqJfb9C7RROoccet6vUhqzYhyNcfWqdhDZctFkWHnkCcSQfWoOdE 5fkCXpXFqgR3Q7sWQsmtCC6nkUiUGNf6jSVz/KaGYsGCIkIDXxihYyUae/wmqzhf80Ey 1i3MEqnX9hxKgfxor4uedtnyalIMSucPKQcvC9W+ZrU+yq4cBAsiMFlw3jbneOQJeDzz qAqJlugU62XaBDUfy/mbKjbr1mRqT2kikcwSchJQ8Sdsqrtv6QLOYApD1H6XKBgsN4ud Fp2LxH++MRSaGS77VoKWbaiWZ3yCbOsst4UuUg67lM1kmt7KYOdE4EgGok5G7swRSknS xSXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698688971; x=1699293771; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tPCY4tkVUipxIg/AwJ77gYYa3fQWKVHm4osJfnDD/Xg=; b=g57Uli9gv8doCC+hdTK2U4j3Nvo4P8IuKblPkLRiUbcgS7YO4G2zBRXRArsxshaQ8r 73NUIWckFV4TMhlVJa52q9juI7wiMmzTYo+cvzOkz5bgTcvlvWmoVFq3DQyctzyctT31 PrUtukiVgjD0RwDL42JAUI4rzvZb8BcSwlqDqW4oCNSAAHnKI2Dmvi/iAyYpyw3EG96V 3y4O22ef59sS0lloRFIHN77csu1asMqjfx8x1TbrBAR5qZ9v3Tc3rnYgO69nHad3dKli +xO1kQHWYJganaUY06W9hzjF1nrkHKG0ydlv8lsCIA2BwlMRDz2SAZH7++8NkoVX3sYJ gexg== X-Gm-Message-State: AOJu0Yx1MB+fGze07/ijzMckB6yve8iX143qgE7QZoE72nHKW7eZwDsE AMkjvnjAXc+5p4Vxw78x/tr8iA== X-Received: by 2002:a05:6512:ea8:b0:507:ac56:66a0 with SMTP id bi40-20020a0565120ea800b00507ac5666a0mr6775379lfb.56.1698688971347; Mon, 30 Oct 2023 11:02:51 -0700 (PDT) Received: from [192.168.1.20] ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id gw18-20020a05600c851200b00405442edc69sm13128164wmb.14.2023.10.30.11.02.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Oct 2023 11:02:50 -0700 (PDT) Message-ID: <0148c072-feaa-4553-8a25-a0fced1bfad0@linaro.org> Date: Mon, 30 Oct 2023 19:02:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 07/11] firmware: imx: add driver for NXP EdgeLock Enclave Content-Language: en-US To: Pankaj Gupta , shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, clin@suse.com, conor+dt@kernel.org, pierre.gondois@arm.com, festevam@gmail.com, linux-imx@nxp.com, davem@davemloft.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, gaurav.jain@nxp.com, alexander.stein@ew.tq-group.com, V.Sethi@nxp.com References: <20231030095849.3456820-1-pankaj.gupta@nxp.com> <20231030095849.3456820-8-pankaj.gupta@nxp.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1oZyM4kyvO XeodvvYv49/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.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 30 Oct 2023 11:03:04 -0700 (PDT) On 30/10/2023 10:58, Pankaj Gupta wrote: > The Edgelock Enclave , is the secure enclave embedded in the SoC > to support the features like HSM, SHE & V2X, using message based > communication channel. > > ELE FW communicates on a dedicated MU with application core where > kernel is running. It exists on specific i.MX processors. e.g. > i.MX8ULP, i.MX93. > > User-space library using this driver: > - i.MX Secure Enclave library: > -- URL: https://github.com/nxp-imx/imx-secure-enclave.git, > - i.MX Secure Middle-Ware: > -- URL: https://github.com/nxp-imx/imx-smw.git OK, I got your patch #7. Thanks for documenting the user-space. > > Signed-off-by: Pankaj Gupta ... > diff --git a/drivers/firmware/imx/ele_common.c b/drivers/firmware/imx/ele_common.c > new file mode 100644 > index 000000000000..4410245a19ec > --- /dev/null > +++ b/drivers/firmware/imx/ele_common.c > @@ -0,0 +1,139 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright 2023 NXP > + */ > + > +#include "ele_common.h" > +#include "se_fw.h" > + > +int imx_se_alloc_tx_rx_buf(struct ele_mu_priv *priv) > +{ > + int ret = 0; > + > + priv->tx_msg = devm_kzalloc(priv->dev, > + sizeof(*priv->tx_msg), > + GFP_KERNEL); > + if (!priv->tx_msg) { > + ret = -ENOMEM; > + dev_err(priv->dev, "Fail allocate mem for tx_msg.\n"); No improvements. I assume rest of feedback could still be ignored. I am not going to check. It's your duty to implement the comments, not mine to check every line whether you did it or not. Trust does not work like that. Best regards, Krzysztof