From: Randy Dunlap <rdunlap@infradead.org>
To: Pankaj Gupta <pankaj.gupta@nxp.com>,
Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 5/5] firmware: imx: adds miscdev
Date: Tue, 18 Jun 2024 14:39:11 -0700 [thread overview]
Message-ID: <c9007e7e-ca1e-4a2e-a80b-4ee3cd873fa8@infradead.org> (raw)
In-Reply-To: <c2ef0570-0392-4290-a008-df74f980f76d@infradead.org>
Sorry, I missed one comment here:
On 6/18/24 2:28 PM, Randy Dunlap wrote:
> Hi--
>
> On 6/17/24 12:29 AM, Pankaj Gupta wrote:
>> Adds the driver for communication interface to secure-enclave,
>> for exchanging messages with NXP secure enclave HW IP(s) like
>> EdgeLock Enclave from:
>> - User-Space Applications via character driver.
>>
>> ABI documentation for the NXP secure-enclave driver.
>>
>> 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
>>
>> Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
>> ---
>> Documentation/ABI/testing/se-cdev | 42 +++
>> drivers/firmware/imx/ele_common.c | 153 ++++++++-
>> drivers/firmware/imx/ele_common.h | 4 +
>> drivers/firmware/imx/se_ctrl.c | 694 ++++++++++++++++++++++++++++++++++++++
>> drivers/firmware/imx/se_ctrl.h | 49 +++
>> include/uapi/linux/se_ioctl.h | 94 ++++++
>> 6 files changed, 1034 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/ABI/testing/se-cdev b/Documentation/ABI/testing/se-cdev
>> new file mode 100644
>> index 000000000000..699525af6b86
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/se-cdev
>> @@ -0,0 +1,42 @@
>> +What: /dev/<se>_mu[0-9]+_ch[0-9]+
>> +Date: May 2024
>> +KernelVersion: 6.8
>> +Contact: linux-imx@nxp.com, pankaj.gupta@nxp.com
>> +Description:
>> + NXP offers multiple hardware IP(s) for secure-enclaves like EdgeLock-
>
> for secure enclaves
>
>> + Enclave(ELE), SECO. The character device file-descriptors
>
> file descriptors
>
> and what is SECO?
>
>> + /dev/<se>_mu*_ch* are the interface between user-space NXP's secure-
>
> userspace secure
>
>> + enclave shared-library and the kernel driver.
>
> shared library
>
>> +
>> + The ioctl(2)-based ABI is defined and documented in
>> + [include]<linux/firmware/imx/ele_mu_ioctl.h>
>> + ioctl(s) are used primarily for:
>> + - shared memory management
>> + - allocation of I/O buffers
>> + - get mu info
>
> - getting mu info
>
>> + - setting a dev-ctx as receiver that is slave to fw
Documentation/process/coding-style.rst says not to introduce new uses of the
word "slave":
For symbol names and documentation, avoid introducing new usage of
'master / slave' (or 'slave' independent of 'master') and 'blacklist /
whitelist'.
Recommended replacements for 'master / slave' are:
'{primary,main} / {secondary,replica,subordinate}'
'{initiator,requester} / {target,responder}'
'{controller,host} / {device,worker,proxy}'
'leader / follower'
'director / performer'
>> + - get SoC info
>
> - getting SoC info
>
>> +
>> + The following file operations are supported:
>> +
>> + open(2)
>> + Currently the only useful flags are O_RDWR.
>> +
>> + read(2)
>> + Every read() from the opened character device context is waiting on
>> + wakeup_intruptible, that gets set by the registered mailbox callback
>
> typo in that name?
> or is it something that this patch series introduces?
>
>> + function; indicating a message received from the firmware on message-
>
> function,
>
>> + unit.
>> +
>> + write(2)
>> + Every write() to the opened character device context needs to acquire
>> + mailbox_lock, before sending message on to the message unit.
>
> mailbox_lock before
>
>> +
>> + close(2)
>> + Stops and free up the I/O contexts that was associated
>
> frees up that were associated
>
>> + with the file descriptor.
>> +
>> +Users: https://github.com/nxp-imx/imx-secure-enclave.git,
>> + https://github.com/nxp-imx/imx-smw.git
>> + crypto/skcipher,
>> + drivers/nvmem/imx-ocotp-ele.c
>
>
--
~Randy
next prev parent reply other threads:[~2024-06-18 21:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 7:29 [PATCH v3 0/5] Communication Interface to NXP secure-enclave HW IP like Edgelock Enclave Pankaj Gupta
2024-06-17 7:29 ` [PATCH v3 1/5] Documentation/firmware: add imx/se to other_interfaces Pankaj Gupta
2024-06-18 21:13 ` Randy Dunlap
2024-06-19 7:30 ` [EXT] " Pankaj Gupta
2024-06-17 7:29 ` [PATCH v3 2/5] dt-bindings: arm: fsl: add imx-se-fw binding doc Pankaj Gupta
2024-06-17 16:37 ` Conor Dooley
2024-06-18 10:58 ` [EXT] " Pankaj Gupta
2024-06-18 11:19 ` Conor Dooley
2024-06-24 13:46 ` Pankaj Gupta
2024-06-24 16:48 ` Conor Dooley
2024-06-24 13:12 ` Pankaj Gupta
2024-06-24 13:27 ` Conor Dooley
2024-06-17 7:29 ` [PATCH v3 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Pankaj Gupta
2024-06-17 7:29 ` [PATCH v3 4/5] firmware: imx: add driver for NXP EdgeLock Enclave Pankaj Gupta
2024-06-18 8:31 ` Sascha Hauer
2024-07-01 7:45 ` [EXT] " Pankaj Gupta
2024-07-01 8:47 ` Sascha Hauer
2024-07-15 9:19 ` Pankaj Gupta
2024-07-19 4:49 ` Pankaj Gupta
2024-06-17 7:29 ` [PATCH v3 5/5] firmware: imx: adds miscdev Pankaj Gupta
2024-06-18 21:28 ` Randy Dunlap
2024-06-18 21:39 ` Randy Dunlap [this message]
2024-06-19 9:02 ` [EXT] " Pankaj Gupta
2024-06-19 8:58 ` Pankaj Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9007e7e-ca1e-4a2e-a80b-4ee3cd873fa8@infradead.org \
--to=rdunlap@infradead.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.gupta@nxp.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).