mei.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. #ifndef _LINUX_MEI_H
  68. #define _LINUX_MEI_H
  69. #include <linux/uuid.h>
  70. /*
  71. * This IOCTL is used to associate the current file descriptor with a
  72. * FW Client (given by UUID). This opens a communication channel
  73. * between a host client and a FW client. From this point every read and write
  74. * will communicate with the associated FW client.
  75. * Only in close() (file_operation release()) the communication between
  76. * the clients is disconnected
  77. *
  78. * The IOCTL argument is a struct with a union that contains
  79. * the input parameter and the output parameter for this IOCTL.
  80. *
  81. * The input parameter is UUID of the FW Client.
  82. * The output parameter is the properties of the FW client
  83. * (FW protocol version and max message size).
  84. *
  85. */
  86. #define IOCTL_MEI_CONNECT_CLIENT \
  87. _IOWR('H' , 0x01, struct mei_connect_client_data)
  88. /*
  89. * Intel MEI client information struct
  90. */
  91. struct mei_client {
  92. __u32 max_msg_length;
  93. __u8 protocol_version;
  94. __u8 reserved[3];
  95. };
  96. /*
  97. * IOCTL Connect Client Data structure
  98. */
  99. struct mei_connect_client_data {
  100. union {
  101. uuid_le in_client_uuid;
  102. struct mei_client out_client_properties;
  103. };
  104. };
  105. /**
  106. * DOC: set and unset event notification for a connected client
  107. *
  108. * The IOCTL argument is 1 for enabling event notification and 0 for
  109. * disabling the service
  110. * Return: -EOPNOTSUPP if the devices doesn't support the feature
  111. */
  112. #define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32)
  113. /**
  114. * DOC: retrieve notification
  115. *
  116. * The IOCTL output argument is 1 if an event was is pending and 0 otherwise
  117. * the ioctl has to be called in order to acknowledge pending event
  118. *
  119. * Return: -EOPNOTSUPP if the devices doesn't support the feature
  120. */
  121. #define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
  122. #endif /* _LINUX_MEI_H */