1/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 2/****************************************************************************** 3 * Intel Management Engine Interface (Intel MEI) Linux driver 4 * Intel MEI Interface Header 5 * 6 * This file is provided under a dual BSD/GPLv2 license. When using or 7 * redistributing this file, you may do so under either license. 8 * 9 * GPL LICENSE SUMMARY 10 * 11 * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved. 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of version 2 of the GNU General Public License as 15 * published by the Free Software Foundation. 16 * 17 * This program is distributed in the hope that it will be useful, but 18 * WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program; if not, write to the Free Software 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 25 * USA 26 * 27 * The full GNU General Public License is included in this distribution 28 * in the file called LICENSE.GPL. 29 * 30 * Contact Information: 31 * Intel Corporation. 32 * linux-mei@linux.intel.com 33 * http://www.intel.com 34 * 35 * BSD LICENSE 36 * 37 * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved. 38 * All rights reserved. 39 * 40 * Redistribution and use in source and binary forms, with or without 41 * modification, are permitted provided that the following conditions 42 * are met: 43 * 44 * * Redistributions of source code must retain the above copyright 45 * notice, this list of conditions and the following disclaimer. 46 * * Redistributions in binary form must reproduce the above copyright 47 * notice, this list of conditions and the following disclaimer in 48 * the documentation and/or other materials provided with the 49 * distribution. 50 * * Neither the name Intel Corporation nor the names of its 51 * contributors may be used to endorse or promote products derived 52 * from this software without specific prior written permission. 53 * 54 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 55 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 56 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 57 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 58 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 59 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 60 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 61 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 62 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 63 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 64 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 65 * 66 *****************************************************************************/ 67 68#ifndef _LINUX_MEI_H 69#define _LINUX_MEI_H 70 71#include <linux/uuid.h> 72 73/* 74 * This IOCTL is used to associate the current file descriptor with a 75 * FW Client (given by UUID). This opens a communication channel 76 * between a host client and a FW client. From this point every read and write 77 * will communicate with the associated FW client. 78 * Only in close() (file_operation release()) the communication between 79 * the clients is disconnected 80 * 81 * The IOCTL argument is a struct with a union that contains 82 * the input parameter and the output parameter for this IOCTL. 83 * 84 * The input parameter is UUID of the FW Client. 85 * The output parameter is the properties of the FW client 86 * (FW protocol version and max message size). 87 * 88 */ 89#define IOCTL_MEI_CONNECT_CLIENT \ 90 _IOWR('H' , 0x01, struct mei_connect_client_data) 91 92/* 93 * Intel MEI client information struct 94 */ 95struct mei_client { 96 __u32 max_msg_length; 97 __u8 protocol_version; 98 __u8 reserved[3]; 99}; 100 101/* 102 * IOCTL Connect Client Data structure 103 */ 104struct mei_connect_client_data { 105 union { 106 uuid_le in_client_uuid; 107 struct mei_client out_client_properties; 108 }; 109}; 110 111/** 112 * DOC: set and unset event notification for a connected client 113 * 114 * The IOCTL argument is 1 for enabling event notification and 0 for 115 * disabling the service 116 * Return: -EOPNOTSUPP if the devices doesn't support the feature 117 */ 118#define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32) 119 120/** 121 * DOC: retrieve notification 122 * 123 * The IOCTL output argument is 1 if an event was is pending and 0 otherwise 124 * the ioctl has to be called in order to acknowledge pending event 125 * 126 * Return: -EOPNOTSUPP if the devices doesn't support the feature 127 */ 128#define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32) 129 130#endif /* _LINUX_MEI_H */ 131