Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/mei: mei.h defining user space interface

define IOCTL_MEI_CONNECT_CLIENT and its associated structure

When the user wants to connect to a ME feature/client after
it open a file descriptor to the driver, he need to use Connect
IOCTL.

This IOCTL received a struct that contains a union of 2 other structs.

1st struct - Input Parameters:
UUID - a predefine unique that identify the ME feature, this
id per feature is constant all over the chipsets
and versions.

2nd struct Output Parameters:
MaxMessageLen - maximum message length that allowed
to be send to the feature
ProtocolVersion ME feature current protocol version.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Itzhak Tzeel-Krupp <itzhak.tzeel-krupp@intel.com>
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Oren Weil and committed by
Greg Kroah-Hartman
334aab1d 5a6003f2

+105
+105
drivers/staging/mei/mei.h
··· 1 + /* 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-2011 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 + Contact Information: 23 + Intel Corporation. 24 + linux-mei@linux.intel.com 25 + http://www.intel.com 26 + 27 + 28 + BSD LICENSE 29 + 30 + Copyright(c) 2003-2011 Intel Corporation. All rights reserved. 31 + All rights reserved. 32 + 33 + Redistribution and use in source and binary forms, with or without 34 + modification, are permitted provided that the following conditions 35 + are met: 36 + 37 + * Redistributions of source code must retain the above copyright 38 + notice, this list of conditions and the following disclaimer. 39 + * Redistributions in binary form must reproduce the above copyright 40 + notice, this list of conditions and the following disclaimer in 41 + the documentation and/or other materials provided with the 42 + distribution. 43 + * Neither the name of Intel Corporation nor the names of its 44 + contributors may be used to endorse or promote products derived 45 + from this software without specific prior written permission. 46 + 47 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 48 + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 49 + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 50 + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 51 + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 52 + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 53 + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 54 + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 55 + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 56 + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 57 + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 58 + 59 + */ 60 + 61 + 62 + #ifndef _LINUX_MEI_H 63 + #define _LINUX_MEI_H 64 + 65 + #include <linux/uuid.h> 66 + 67 + /* 68 + * This IOCTL is used to associate the current file descriptor with a 69 + * FW Client (given by UUID). This opens a communication channel 70 + * between a host client and a FW client. From this point every read and write 71 + * will communicate with the associated FW client. 72 + * Only in close() (file_operation release()) the communication between 73 + * the clients is disconnected 74 + * 75 + * The IOCTL argument is a struct with a union the contains 76 + * the input parameter and the output parameter for this IOCTL. 77 + * 78 + * The input parameter is UUID of the FW Client. 79 + * The output parameter is the properties of the FW client 80 + * (FW protocol version and max message size). 81 + * 82 + */ 83 + #define IOCTL_MEI_CONNECT_CLIENT \ 84 + _IOWR('H' , 0x01, struct mei_connect_client_data) 85 + 86 + /* 87 + * Intel MEI client information struct 88 + */ 89 + struct mei_client { 90 + __u32 max_msg_length; 91 + __u8 protocol_version; 92 + __u8 reserved[3]; 93 + }; 94 + 95 + /* 96 + * IOCTL Connect Client Data structure 97 + */ 98 + struct mei_connect_client_data { 99 + union { 100 + uuid_le in_client_uuid; 101 + struct mei_client out_client_properties; 102 + }; 103 + }; 104 + 105 + #endif /* _LINUX_MEI_H */