mei.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. Intel(R) Management Engine Interface (Intel(R) MEI)
  2. ===================================================
  3. Introduction
  4. ============
  5. The Intel Management Engine (Intel ME) is an isolated and protected computing
  6. resource (Co-processor) residing inside certain Intel chipsets. The Intel ME
  7. provides support for computer/IT management features. The feature set
  8. depends on the Intel chipset SKU.
  9. The Intel Management Engine Interface (Intel MEI, previously known as HECI)
  10. is the interface between the Host and Intel ME. This interface is exposed
  11. to the host as a PCI device. The Intel MEI Driver is in charge of the
  12. communication channel between a host application and the Intel ME feature.
  13. Each Intel ME feature (Intel ME Client) is addressed by a GUID/UUID and
  14. each client has its own protocol. The protocol is message-based with a
  15. header and payload up to 512 bytes.
  16. Prominent usage of the Intel ME Interface is to communicate with Intel(R)
  17. Active Management Technology (Intel AMT) implemented in firmware running on
  18. the Intel ME.
  19. Intel AMT provides the ability to manage a host remotely out-of-band (OOB)
  20. even when the operating system running on the host processor has crashed or
  21. is in a sleep state.
  22. Some examples of Intel AMT usage are:
  23. - Monitoring hardware state and platform components
  24. - Remote power off/on (useful for green computing or overnight IT
  25. maintenance)
  26. - OS updates
  27. - Storage of useful platform information such as software assets
  28. - Built-in hardware KVM
  29. - Selective network isolation of Ethernet and IP protocol flows based
  30. on policies set by a remote management console
  31. - IDE device redirection from remote management console
  32. Intel AMT (OOB) communication is based on SOAP (deprecated
  33. starting with Release 6.0) over HTTP/S or WS-Management protocol over
  34. HTTP/S that are received from a remote management console application.
  35. For more information about Intel AMT:
  36. http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
  37. Intel MEI Driver
  38. ================
  39. The driver exposes a misc device called /dev/mei.
  40. An application maintains communication with an Intel ME feature while
  41. /dev/mei is open. The binding to a specific feature is performed by calling
  42. MEI_CONNECT_CLIENT_IOCTL, which passes the desired UUID.
  43. The number of instances of an Intel ME feature that can be opened
  44. at the same time depends on the Intel ME feature, but most of the
  45. features allow only a single instance.
  46. The Intel AMT Host Interface (Intel AMTHI) feature supports multiple
  47. simultaneous user connected applications. The Intel MEI driver
  48. handles this internally by maintaining request queues for the applications.
  49. The driver is transparent to data that are passed between firmware feature
  50. and host application.
  51. Because some of the Intel ME features can change the system
  52. configuration, the driver by default allows only a privileged
  53. user to access it.
  54. A code snippet for an application communicating with Intel AMTHI client:
  55. struct mei_connect_client_data data;
  56. fd = open(MEI_DEVICE);
  57. data.d.in_client_uuid = AMTHI_UUID;
  58. ioctl(fd, IOCTL_MEI_CONNECT_CLIENT, &data);
  59. printf("Ver=%d, MaxLen=%ld\n",
  60. data.d.in_client_uuid.protocol_version,
  61. data.d.in_client_uuid.max_msg_length);
  62. [...]
  63. write(fd, amthi_req_data, amthi_req_data_len);
  64. [...]
  65. read(fd, &amthi_res_data, amthi_res_data_len);
  66. [...]
  67. close(fd);
  68. IOCTL
  69. =====
  70. The Intel MEI Driver supports the following IOCTL commands:
  71. IOCTL_MEI_CONNECT_CLIENT Connect to firmware Feature (client).
  72. usage:
  73. struct mei_connect_client_data clientData;
  74. ioctl(fd, IOCTL_MEI_CONNECT_CLIENT, &clientData);
  75. inputs:
  76. mei_connect_client_data struct contain the following
  77. input field:
  78. in_client_uuid - UUID of the FW Feature that needs
  79. to connect to.
  80. outputs:
  81. out_client_properties - Client Properties: MTU and Protocol Version.
  82. error returns:
  83. EINVAL Wrong IOCTL Number
  84. ENODEV Device or Connection is not initialized or ready.
  85. (e.g. Wrong UUID)
  86. ENOMEM Unable to allocate memory to client internal data.
  87. EFAULT Fatal Error (e.g. Unable to access user input data)
  88. EBUSY Connection Already Open
  89. Notes:
  90. max_msg_length (MTU) in client properties describes the maximum
  91. data that can be sent or received. (e.g. if MTU=2K, can send
  92. requests up to bytes 2k and received responses up to 2k bytes).
  93. IOCTL_MEI_NOTIFY_SET: enable or disable event notifications
  94. Usage:
  95. uint32_t enable;
  96. ioctl(fd, IOCTL_MEI_NOTIFY_SET, &enable);
  97. Inputs:
  98. uint32_t enable = 1;
  99. or
  100. uint32_t enable[disable] = 0;
  101. Error returns:
  102. EINVAL Wrong IOCTL Number
  103. ENODEV Device is not initialized or the client not connected
  104. ENOMEM Unable to allocate memory to client internal data.
  105. EFAULT Fatal Error (e.g. Unable to access user input data)
  106. EOPNOTSUPP if the device doesn't support the feature
  107. Notes:
  108. The client must be connected in order to enable notification events
  109. IOCTL_MEI_NOTIFY_GET : retrieve event
  110. Usage:
  111. uint32_t event;
  112. ioctl(fd, IOCTL_MEI_NOTIFY_GET, &event);
  113. Outputs:
  114. 1 - if an event is pending
  115. 0 - if there is no even pending
  116. Error returns:
  117. EINVAL Wrong IOCTL Number
  118. ENODEV Device is not initialized or the client not connected
  119. ENOMEM Unable to allocate memory to client internal data.
  120. EFAULT Fatal Error (e.g. Unable to access user input data)
  121. EOPNOTSUPP if the device doesn't support the feature
  122. Notes:
  123. The client must be connected and event notification has to be enabled
  124. in order to receive an event
  125. Intel ME Applications
  126. =====================
  127. 1) Intel Local Management Service (Intel LMS)
  128. Applications running locally on the platform communicate with Intel AMT Release
  129. 2.0 and later releases in the same way that network applications do via SOAP
  130. over HTTP (deprecated starting with Release 6.0) or with WS-Management over
  131. SOAP over HTTP. This means that some Intel AMT features can be accessed from a
  132. local application using the same network interface as a remote application
  133. communicating with Intel AMT over the network.
  134. When a local application sends a message addressed to the local Intel AMT host
  135. name, the Intel LMS, which listens for traffic directed to the host name,
  136. intercepts the message and routes it to the Intel MEI.
  137. For more information:
  138. http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
  139. Under "About Intel AMT" => "Local Access"
  140. For downloading Intel LMS:
  141. http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/
  142. The Intel LMS opens a connection using the Intel MEI driver to the Intel LMS
  143. firmware feature using a defined UUID and then communicates with the feature
  144. using a protocol called Intel AMT Port Forwarding Protocol (Intel APF protocol).
  145. The protocol is used to maintain multiple sessions with Intel AMT from a
  146. single application.
  147. See the protocol specification in the Intel AMT Software Development Kit (SDK)
  148. http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
  149. Under "SDK Resources" => "Intel(R) vPro(TM) Gateway (MPS)"
  150. => "Information for Intel(R) vPro(TM) Gateway Developers"
  151. => "Description of the Intel AMT Port Forwarding (APF) Protocol"
  152. 2) Intel AMT Remote configuration using a Local Agent
  153. A Local Agent enables IT personnel to configure Intel AMT out-of-the-box
  154. without requiring installing additional data to enable setup. The remote
  155. configuration process may involve an ISV-developed remote configuration
  156. agent that runs on the host.
  157. For more information:
  158. http://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide
  159. Under "Setup and Configuration of Intel AMT" =>
  160. "SDK Tools Supporting Setup and Configuration" =>
  161. "Using the Local Agent Sample"
  162. An open source Intel AMT configuration utility, implementing a local agent
  163. that accesses the Intel MEI driver, can be found here:
  164. http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers/
  165. Intel AMT OS Health Watchdog
  166. ============================
  167. The Intel AMT Watchdog is an OS Health (Hang/Crash) watchdog.
  168. Whenever the OS hangs or crashes, Intel AMT will send an event
  169. to any subscriber to this event. This mechanism means that
  170. IT knows when a platform crashes even when there is a hard failure on the host.
  171. The Intel AMT Watchdog is composed of two parts:
  172. 1) Firmware feature - receives the heartbeats
  173. and sends an event when the heartbeats stop.
  174. 2) Intel MEI driver - connects to the watchdog feature, configures the
  175. watchdog and sends the heartbeats.
  176. The Intel MEI driver uses the kernel watchdog API to configure the Intel AMT
  177. Watchdog and to send heartbeats to it. The default timeout of the
  178. watchdog is 120 seconds.
  179. If the Intel AMT Watchdog feature does not exist (i.e. the connection failed),
  180. the Intel MEI driver will disable the sending of heartbeats.
  181. Supported Chipsets
  182. ==================
  183. 7 Series Chipset Family
  184. 6 Series Chipset Family
  185. 5 Series Chipset Family
  186. 4 Series Chipset Family
  187. Mobile 4 Series Chipset Family
  188. ICH9
  189. 82946GZ/GL
  190. 82G35 Express
  191. 82Q963/Q965
  192. 82P965/G965
  193. Mobile PM965/GM965
  194. Mobile GME965/GLE960
  195. 82Q35 Express
  196. 82G33/G31/P35/P31 Express
  197. 82Q33 Express
  198. 82X38/X48 Express
  199. ---
  200. linux-mei@linux.intel.com