Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
0002 /*
0003  * Copyright(c) 2003-2015 Intel Corporation. All rights reserved.
0004  * Intel Management Engine Interface (Intel MEI) Linux driver
0005  * Intel MEI Interface Header
0006  */
0007 #ifndef _LINUX_MEI_H
0008 #define _LINUX_MEI_H
0009 
0010 #include <linux/uuid.h>
0011 
0012 /*
0013  * This IOCTL is used to associate the current file descriptor with a
0014  * FW Client (given by UUID). This opens a communication channel
0015  * between a host client and a FW client. From this point every read and write
0016  * will communicate with the associated FW client.
0017  * Only in close() (file_operation release()) the communication between
0018  * the clients is disconnected
0019  *
0020  * The IOCTL argument is a struct with a union that contains
0021  * the input parameter and the output parameter for this IOCTL.
0022  *
0023  * The input parameter is UUID of the FW Client.
0024  * The output parameter is the properties of the FW client
0025  * (FW protocol version and max message size).
0026  *
0027  */
0028 #define IOCTL_MEI_CONNECT_CLIENT \
0029     _IOWR('H' , 0x01, struct mei_connect_client_data)
0030 
0031 /*
0032  * Intel MEI client information struct
0033  */
0034 struct mei_client {
0035     __u32 max_msg_length;
0036     __u8 protocol_version;
0037     __u8 reserved[3];
0038 };
0039 
0040 /*
0041  * IOCTL Connect Client Data structure
0042  */
0043 struct mei_connect_client_data {
0044     union {
0045         uuid_le in_client_uuid;
0046         struct mei_client out_client_properties;
0047     };
0048 };
0049 
0050 /**
0051  * DOC: set and unset event notification for a connected client
0052  *
0053  * The IOCTL argument is 1 for enabling event notification and 0 for
0054  * disabling the service
0055  * Return:  -EOPNOTSUPP if the devices doesn't support the feature
0056  */
0057 #define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32)
0058 
0059 /**
0060  * DOC: retrieve notification
0061  *
0062  * The IOCTL output argument is 1 if an event was is pending and 0 otherwise
0063  * the ioctl has to be called in order to acknowledge pending event
0064  *
0065  * Return:  -EOPNOTSUPP if the devices doesn't support the feature
0066  */
0067 #define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
0068 
0069 /**
0070  * struct mei_connect_client_vtag - mei client information struct with vtag
0071  *
0072  * @in_client_uuid: UUID of client to connect
0073  * @vtag: virtual tag
0074  * @reserved: reserved for future use
0075  */
0076 struct mei_connect_client_vtag {
0077     uuid_le in_client_uuid;
0078     __u8 vtag;
0079     __u8 reserved[3];
0080 };
0081 
0082 /**
0083  * struct mei_connect_client_data_vtag - IOCTL connect data union
0084  *
0085  * @connect: input connect data
0086  * @out_client_properties: output client data
0087  */
0088 struct mei_connect_client_data_vtag {
0089     union {
0090         struct mei_connect_client_vtag connect;
0091         struct mei_client out_client_properties;
0092     };
0093 };
0094 
0095 /**
0096  * DOC:
0097  * This IOCTL is used to associate the current file descriptor with a
0098  * FW Client (given by UUID), and virtual tag (vtag).
0099  * The IOCTL opens a communication channel between a host client and
0100  * a FW client on a tagged channel. From this point on, every read
0101  * and write will communicate with the associated FW client with
0102  * on the tagged channel.
0103  * Upone close() the communication is terminated.
0104  *
0105  * The IOCTL argument is a struct with a union that contains
0106  * the input parameter and the output parameter for this IOCTL.
0107  *
0108  * The input parameter is UUID of the FW Client, a vtag [0,255]
0109  * The output parameter is the properties of the FW client
0110  * (FW protocool version and max message size).
0111  *
0112  * Clients that do not support tagged connection
0113  * will respond with -EOPNOTSUPP.
0114  */
0115 #define IOCTL_MEI_CONNECT_CLIENT_VTAG \
0116     _IOWR('H', 0x04, struct mei_connect_client_data_vtag)
0117 
0118 #endif /* _LINUX_MEI_H  */