[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AM9PR04MB8604F5E033F9C0985F29BD5F95AE2@AM9PR04MB8604.eurprd04.prod.outlook.com>
Date: Thu, 3 Apr 2025 05:02:08 +0000
From: Pankaj Gupta <pankaj.gupta@....com>
To: Frank Li <frank.li@....com>
CC: Jonathan Corbet <corbet@....net>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Shawn Guo
<shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [PATCH v14 4/6] firmware: imx: add driver for NXP EdgeLock
Enclave
On Wed, Apr 02, 2025 at 06:15:12AM +0000, Pankaj Gupta wrote:
>> >> diff --git a/drivers/firmware/imx/se_ctrl.h
>> >> b/drivers/firmware/imx/se_ctrl.h new file mode 100644 index
>> >> 000000000000..177623f3890e
>> >> --- /dev/null
>> >> +++ b/drivers/firmware/imx/se_ctrl.h
>> >> @@ -0,0 +1,84 @@
>> >> +/* SPDX-License-Identifier: GPL-2.0+ */
>> >> +/*
>> >> + * Copyright 2025 NXP
>> >> + */
>> >> +
>> >> +#ifndef SE_MU_H
>> >> +#define SE_MU_H
>> >> +
>> >> +#include <linux/miscdevice.h>
>> >> +#include <linux/semaphore.h>
>> >> +#include <linux/mailbox_client.h>
>> >> +
>>
>> ....
>>
>> >> +};
>> >> +
>> >> +struct se_if_defines {
>> >> + const u8 se_if_type;
>> >> + const u8 se_instance_id;
>> Getting used at drivers/firmware/imx/se_ctrl.c:320
> dev_info(dev, "i.MX secure-enclave: %s%d interface to firmware,
configured.",
> SE_TYPE_STR_HSM,
> priv->if_defs->se_instance_id);
> You only print value, don't actual use it. It should be safe remove it
> Frank
No, it is not just used for print.
This variable is used to construct the device name as well, in 5/6 patch.
Moreover, it is needed for other SoC like i.MX8DXL, i.MX95, i.MX94, there
are multiple instances of same secure-enclave type.
It will be used to identify the intended instance later.
>>
>> > This is not used actually, you can remove it
>> Getting used at drivers/firmware/imx/se_ctrl.c:347
>>
>> >> + u8 cmd_tag;
>> >> + u8 rsp_tag;
>> >> + u8 success_tag;
>> >> + u8 base_api_ver;
>> >> + u8 fw_api_ver;
>> >> +};
>> >> +
>> >> +struct se_if_priv {
>> >> + struct device *dev;
>> >> +
Download attachment "smime.p7s" of type "application/pkcs7-signature" (11094 bytes)
Powered by blists - more mailing lists