119 lines · c
1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */2/*3 * Copyright(c) 2003-2015 Intel Corporation. All rights reserved.4 * Intel Management Engine Interface (Intel MEI) Linux driver5 * Intel MEI Interface Header6 */7#ifndef _LINUX_MEI_H8#define _LINUX_MEI_H9 10#include <linux/mei_uuid.h>11 12/*13 * This IOCTL is used to associate the current file descriptor with a14 * FW Client (given by UUID). This opens a communication channel15 * between a host client and a FW client. From this point every read and write16 * will communicate with the associated FW client.17 * Only in close() (file_operation release()) is the communication between18 * the clients disconnected.19 *20 * The IOCTL argument is a struct with a union that contains21 * the input parameter and the output parameter for this IOCTL.22 *23 * The input parameter is UUID of the FW Client.24 * The output parameter is the properties of the FW client25 * (FW protocol version and max message size).26 *27 */28#define IOCTL_MEI_CONNECT_CLIENT \29 _IOWR('H' , 0x01, struct mei_connect_client_data)30 31/*32 * Intel MEI client information struct33 */34struct mei_client {35 __u32 max_msg_length;36 __u8 protocol_version;37 __u8 reserved[3];38};39 40/*41 * IOCTL Connect Client Data structure42 */43struct mei_connect_client_data {44 union {45 uuid_le in_client_uuid;46 struct mei_client out_client_properties;47 };48};49 50/**51 * DOC: set and unset event notification for a connected client52 *53 * The IOCTL argument is 1 for enabling event notification and 0 for54 * disabling the service.55 * Return: -EOPNOTSUPP if the devices doesn't support the feature56 */57#define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32)58 59/**60 * DOC: retrieve notification61 *62 * The IOCTL output argument is 1 if an event was pending and 0 otherwise.63 * The ioctl has to be called in order to acknowledge pending event.64 *65 * Return: -EOPNOTSUPP if the devices doesn't support the feature66 */67#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)68 69/**70 * struct mei_connect_client_vtag - mei client information struct with vtag71 *72 * @in_client_uuid: UUID of client to connect73 * @vtag: virtual tag74 * @reserved: reserved for future use75 */76struct mei_connect_client_vtag {77 uuid_le in_client_uuid;78 __u8 vtag;79 __u8 reserved[3];80};81 82/**83 * struct mei_connect_client_data_vtag - IOCTL connect data union84 *85 * @connect: input connect data86 * @out_client_properties: output client data87 */88struct mei_connect_client_data_vtag {89 union {90 struct mei_connect_client_vtag connect;91 struct mei_client out_client_properties;92 };93};94 95/**96 * DOC:97 * This IOCTL is used to associate the current file descriptor with a98 * FW Client (given by UUID), and virtual tag (vtag).99 * The IOCTL opens a communication channel between a host client and100 * a FW client on a tagged channel. From this point on, every read101 * and write will communicate with the associated FW client102 * on the tagged channel.103 * Upon close() the communication is terminated.104 *105 * The IOCTL argument is a struct with a union that contains106 * the input parameter and the output parameter for this IOCTL.107 *108 * The input parameter is UUID of the FW Client, a vtag [0,255].109 * The output parameter is the properties of the FW client110 * (FW protocol version and max message size).111 *112 * Clients that do not support tagged connection113 * will respond with -EOPNOTSUPP.114 */115#define IOCTL_MEI_CONNECT_CLIENT_VTAG \116 _IOWR('H', 0x04, struct mei_connect_client_data_vtag)117 118#endif /* _LINUX_MEI_H */119