mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
Add the core implementation for firmware and host client management within the ISSEI (Intel Silicon Security Engine Interface) subsystem support for a character device to expose the ISSEI HECI interface to user space. The firmware client (fw_client) and host client (host_client) modules are responsible for managing communication between the host software and the firmware. The character device provides a communication channel for user-space applications to interact with the firmware on the platform. The client modules enable the ISSEI driver to manage multiple host clients communicating with corresponding firmware clients, facilitating data transfers and control operations over the HECI interface. The character device allows user-space applications to establish connections to firmware clients using UUIDs, exchange messages, and control the communication flow using standard file operation calls. Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com> Co-developed-by: Vitaly Lubart <lubvital@gmail.com> Signed-off-by: Vitaly Lubart <lubvital@gmail.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://patch.msgid.link/20260513-issei-for-upstream-v1-2-f590038678f9@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2023-2026 Intel Corporation */
|
|
#ifndef _ISSEI_FW_CLIENT_H_
|
|
#define _ISSEI_FW_CLIENT_H_
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/kobject.h>
|
|
#include <linux/types.h>
|
|
#include <linux/uuid.h>
|
|
|
|
struct issei_device;
|
|
struct issei_host_client;
|
|
|
|
/**
|
|
* struct issei_fw_client - represents firmware queue
|
|
* @kobj: associated kobject
|
|
* @list: link in firmware clients list
|
|
* @id: firmware client id
|
|
* @ver: firmware client version
|
|
* @uuid: firmware client protocol id
|
|
* @mtu: firmware client maximum buffer size
|
|
* @flags: firmware client flags
|
|
* @cl: pointer to host client, if connected
|
|
*/
|
|
struct issei_fw_client {
|
|
struct kobject kobj;
|
|
struct list_head list;
|
|
u16 id;
|
|
u8 ver;
|
|
uuid_t uuid;
|
|
u32 mtu;
|
|
u32 flags;
|
|
struct issei_host_client *cl;
|
|
};
|
|
#define to_issei_fw_client(x) container_of(x, struct issei_fw_client, kobj)
|
|
|
|
struct issei_fw_client *issei_fw_cl_create(struct issei_device *idev, u16 id, u8 ver,
|
|
const uuid_t *uuid, u32 mtu, u32 flags);
|
|
void issei_fw_cl_remove_all(struct issei_device *idev);
|
|
struct issei_fw_client *issei_fw_cl_find_by_uuid(struct issei_device *idev, const uuid_t *uuid);
|
|
|
|
int issei_fw_cl_connect(struct issei_fw_client *fw_cl, struct issei_host_client *cl);
|
|
void issei_fw_cl_disconnect(struct issei_fw_client *fw_cl);
|
|
|
|
#endif /* _ISSEI_FW_CLIENT_H_ */
|