logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

mei.h (3474B)


  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 driver
  5. * Intel MEI Interface Header
  6. */
  7. #ifndef _LINUX_MEI_H
  8. #define _LINUX_MEI_H
  9. #include <linux/mei_uuid.h>
  10. /*
  11. * This IOCTL is used to associate the current file descriptor with a
  12. * FW Client (given by UUID). This opens a communication channel
  13. * between a host client and a FW client. From this point every read and write
  14. * will communicate with the associated FW client.
  15. * Only in close() (file_operation release()) is the communication between
  16. * the clients disconnected.
  17. *
  18. * The IOCTL argument is a struct with a union that contains
  19. * the input parameter and the output parameter for this IOCTL.
  20. *
  21. * The input parameter is UUID of the FW Client.
  22. * The output parameter is the properties of the FW client
  23. * (FW protocol version and max message size).
  24. *
  25. */
  26. #define IOCTL_MEI_CONNECT_CLIENT \
  27. _IOWR('H' , 0x01, struct mei_connect_client_data)
  28. /*
  29. * Intel MEI client information struct
  30. */
  31. struct mei_client {
  32. __u32 max_msg_length;
  33. __u8 protocol_version;
  34. __u8 reserved[3];
  35. };
  36. /*
  37. * IOCTL Connect Client Data structure
  38. */
  39. struct mei_connect_client_data {
  40. union {
  41. uuid_le in_client_uuid;
  42. struct mei_client out_client_properties;
  43. };
  44. };
  45. /**
  46. * DOC: set and unset event notification for a connected client
  47. *
  48. * The IOCTL argument is 1 for enabling event notification and 0 for
  49. * disabling the service.
  50. * Return: -EOPNOTSUPP if the devices doesn't support the feature
  51. */
  52. #define IOCTL_MEI_NOTIFY_SET _IOW('H', 0x02, __u32)
  53. /**
  54. * DOC: retrieve notification
  55. *
  56. * The IOCTL output argument is 1 if an event was pending and 0 otherwise.
  57. * The ioctl has to be called in order to acknowledge pending event.
  58. *
  59. * Return: -EOPNOTSUPP if the devices doesn't support the feature
  60. */
  61. #define IOCTL_MEI_NOTIFY_GET _IOR('H', 0x03, __u32)
  62. /**
  63. * struct mei_connect_client_vtag - mei client information struct with vtag
  64. *
  65. * @in_client_uuid: UUID of client to connect
  66. * @vtag: virtual tag
  67. * @reserved: reserved for future use
  68. */
  69. struct mei_connect_client_vtag {
  70. uuid_le in_client_uuid;
  71. __u8 vtag;
  72. __u8 reserved[3];
  73. };
  74. /**
  75. * struct mei_connect_client_data_vtag - IOCTL connect data union
  76. *
  77. * @connect: input connect data
  78. * @out_client_properties: output client data
  79. */
  80. struct mei_connect_client_data_vtag {
  81. union {
  82. struct mei_connect_client_vtag connect;
  83. struct mei_client out_client_properties;
  84. };
  85. };
  86. /**
  87. * DOC:
  88. * This IOCTL is used to associate the current file descriptor with a
  89. * FW Client (given by UUID), and virtual tag (vtag).
  90. * The IOCTL opens a communication channel between a host client and
  91. * a FW client on a tagged channel. From this point on, every read
  92. * and write will communicate with the associated FW client
  93. * on the tagged channel.
  94. * Upon close() the communication is terminated.
  95. *
  96. * The IOCTL argument is a struct with a union that contains
  97. * the input parameter and the output parameter for this IOCTL.
  98. *
  99. * The input parameter is UUID of the FW Client, a vtag [0,255].
  100. * The output parameter is the properties of the FW client
  101. * (FW protocol version and max message size).
  102. *
  103. * Clients that do not support tagged connection
  104. * will respond with -EOPNOTSUPP.
  105. */
  106. #define IOCTL_MEI_CONNECT_CLIENT_VTAG \
  107. _IOWR('H', 0x04, struct mei_connect_client_data_vtag)
  108. #endif /* _LINUX_MEI_H */