mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 05:42:46 +01:00
The ISSEI (Intel Silicon Security Engine Interface) subsystem provides a communication channel between the host and the Silicon Security Engine. Prepare basic driver functions and character device for user-space communication. Add DMA access routines for ISSEI HECI devices. Add of DMA-related structures and implementation of routines for setting up DMA, as well as reading and writing DMA buffers. Reviewed-by: Karol Wachowski <[email protected]> Co-developed-by: Vitaly Lubart <[email protected]> Signed-off-by: Vitaly Lubart <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
70 lines
2.2 KiB
C
70 lines
2.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
/*
|
|
* Copyright (C) 2023-2026 Intel Corporation
|
|
* Intel Silicon Security Engine Interface (ISSEI) Linux driver:
|
|
* ISSEI Interface Header
|
|
*/
|
|
#ifndef _LINUX_ISSEI_H
|
|
#define _LINUX_ISSEI_H
|
|
|
|
#include <linux/ioctl.h>
|
|
#include <linux/types.h>
|
|
|
|
/*
|
|
* This ioctl is used to associate the current file descriptor with a
|
|
* FW Client (given by UUID). This opens a communication channel
|
|
* between a host client and a FW client. From this point every read and write
|
|
* will communicate with the associated FW client.
|
|
* The communication between the clients can be terminated by
|
|
* IOCTL_ISSEI_DISCONNECT_CLIENT IOCTL or by
|
|
* closing the file descriptor (file_operation release()).
|
|
*
|
|
* The ioctl argument is a struct with a union that contains
|
|
* the input parameter and the output parameter for this ioctl.
|
|
*
|
|
* The input parameter is UUID of the FW Client.
|
|
* The output parameter is the properties of the FW client
|
|
* (FW protocol version, max message size and client flags).
|
|
*/
|
|
#define IOCTL_ISSEI_CONNECT_CLIENT \
|
|
_IOWR('H', 0x01, struct issei_connect_client_data)
|
|
|
|
/**
|
|
* struct issei_client - ISSEI client information structure
|
|
* @max_msg_length: maximum message length supported by the firmware client (in bytes)
|
|
* @protocol_version: protocol version reported by the firmware client
|
|
* @reserved1: reserved
|
|
* @flags: flag bitmask reported by the firmware client
|
|
* @reserved2: reserved
|
|
*/
|
|
struct issei_client {
|
|
__u32 max_msg_length;
|
|
__u8 protocol_version;
|
|
__u8 reserved1[3];
|
|
__u32 flags;
|
|
__u32 reserved2;
|
|
};
|
|
|
|
#define ISSEI_IOCTL_UUID_LEN 16
|
|
|
|
/**
|
|
* struct issei_connect_client_data - ioctl Connect Client Data structure
|
|
* @in_client_uuid: unique id of the firmware client to connect to (from user space to kernel)
|
|
* @out_client_properties: connected firmware client properties (from kernel to user space)
|
|
*/
|
|
struct issei_connect_client_data {
|
|
union {
|
|
__u8 in_client_uuid[ISSEI_IOCTL_UUID_LEN];
|
|
struct issei_client out_client_properties;
|
|
};
|
|
};
|
|
|
|
/*
|
|
* This ioctl is used to terminate association between
|
|
* the host client and the FW client.
|
|
*/
|
|
#define IOCTL_ISSEI_DISCONNECT_CLIENT \
|
|
_IO('H', 0x02)
|
|
|
|
#endif /* _LINUX_ISSEI_H */
|