RE: [PATCH v14 4/6] firmware: imx: add driver for NXP EdgeLock Enclave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
>> >> +


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux