mei.h 4.6 KB

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