mei.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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/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()) the communication between
  16. * the clients is 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 is 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. #endif /* _LINUX_MEI_H */