3 * Intel Management Engine Interface (Intel MEI) Linux driver
4 * Copyright (c) 2003-2012, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 #ifndef _MEI_HW_TYPES_H_
18 #define _MEI_HW_TYPES_H_
20 #include <linux/uuid.h>
25 #define MEI_HW_READY_TIMEOUT 2 /* Timeout on ready message */
26 #define MEI_CONNECT_TIMEOUT 3 /* HPS: at least 2 seconds */
28 #define MEI_CL_CONNECT_TIMEOUT 15 /* HPS: Client Connect Timeout */
29 #define MEI_CLIENTS_INIT_TIMEOUT 15 /* HPS: Clients Enumeration Timeout */
31 #define MEI_IAMTHIF_STALL_TIMER 12 /* HPS */
32 #define MEI_IAMTHIF_READ_TIMER 10 /* HPS */
34 #define MEI_PGI_TIMEOUT 1 /* PG Isolation time response 1 sec */
35 #define MEI_HBM_TIMEOUT 1 /* 1 second */
40 #define HBM_MINOR_VERSION 1
41 #define HBM_MAJOR_VERSION 1
44 * MEI version with PGI support
46 #define HBM_MINOR_VERSION_PGI 1
47 #define HBM_MAJOR_VERSION_PGI 1
49 /* Host bus message command opcode */
50 #define MEI_HBM_CMD_OP_MSK 0x7f
51 /* Host bus message command RESPONSE */
52 #define MEI_HBM_CMD_RES_MSK 0x80
55 * MEI Bus Message Command IDs
57 #define HOST_START_REQ_CMD 0x01
58 #define HOST_START_RES_CMD 0x81
60 #define HOST_STOP_REQ_CMD 0x02
61 #define HOST_STOP_RES_CMD 0x82
63 #define ME_STOP_REQ_CMD 0x03
65 #define HOST_ENUM_REQ_CMD 0x04
66 #define HOST_ENUM_RES_CMD 0x84
68 #define HOST_CLIENT_PROPERTIES_REQ_CMD 0x05
69 #define HOST_CLIENT_PROPERTIES_RES_CMD 0x85
71 #define CLIENT_CONNECT_REQ_CMD 0x06
72 #define CLIENT_CONNECT_RES_CMD 0x86
74 #define CLIENT_DISCONNECT_REQ_CMD 0x07
75 #define CLIENT_DISCONNECT_RES_CMD 0x87
77 #define MEI_FLOW_CONTROL_CMD 0x08
79 #define MEI_PG_ISOLATION_ENTRY_REQ_CMD 0x0a
80 #define MEI_PG_ISOLATION_ENTRY_RES_CMD 0x8a
81 #define MEI_PG_ISOLATION_EXIT_REQ_CMD 0x0b
82 #define MEI_PG_ISOLATION_EXIT_RES_CMD 0x8b
86 * used by hbm_host_stop_request.reason
88 enum mei_stop_reason_types
{
89 DRIVER_STOP_REQUEST
= 0x00,
90 DEVICE_D1_ENTRY
= 0x01,
91 DEVICE_D2_ENTRY
= 0x02,
92 DEVICE_D3_ENTRY
= 0x03,
93 SYSTEM_S1_ENTRY
= 0x04,
94 SYSTEM_S2_ENTRY
= 0x05,
95 SYSTEM_S3_ENTRY
= 0x06,
96 SYSTEM_S4_ENTRY
= 0x07,
97 SYSTEM_S5_ENTRY
= 0x08
101 * Client Connect Status
102 * used by hbm_client_connect_response.status
104 enum mei_cl_connect_status
{
105 MEI_CL_CONN_SUCCESS
= 0x00,
106 MEI_CL_CONN_NOT_FOUND
= 0x01,
107 MEI_CL_CONN_ALREADY_STARTED
= 0x02,
108 MEI_CL_CONN_OUT_OF_RESOURCES
= 0x03,
109 MEI_CL_CONN_MESSAGE_SMALL
= 0x04
113 * Client Disconnect Status
115 enum mei_cl_disconnect_status
{
116 MEI_CL_DISCONN_SUCCESS
= 0x00
120 * MEI BUS Interface Section
132 struct mei_bus_message
{
138 * struct hbm_cl_cmd - client specific host bus command
139 * CONNECT, DISCONNECT, and FlOW CONTROL
141 * @hbm_cmd - bus message command header
142 * @me_addr - address of the client in ME
143 * @host_addr - address of the client in the driver
146 struct mei_hbm_cl_cmd
{
158 struct hbm_host_version_request
{
161 struct hbm_version host_version
;
164 struct hbm_host_version_response
{
166 u8 host_version_supported
;
167 struct hbm_version me_max_version
;
170 struct hbm_host_stop_request
{
176 struct hbm_host_stop_response
{
181 struct hbm_me_stop_request
{
187 struct hbm_host_enum_request
{
192 struct hbm_host_enum_response
{
195 u8 valid_addresses
[32];
198 struct mei_client_properties
{
199 uuid_le protocol_name
;
201 u8 max_number_of_connections
;
207 struct hbm_props_request
{
214 struct hbm_props_response
{
219 struct mei_client_properties client_properties
;
223 * struct hbm_power_gate - power gate request/response
225 * @hbm_cmd - bus message command header
228 struct hbm_power_gate
{
234 * struct hbm_client_connect_request - connect/disconnect request
236 * @hbm_cmd - bus message command header
237 * @me_addr - address of the client in ME
238 * @host_addr - address of the client in the driver
241 struct hbm_client_connect_request
{
249 * struct hbm_client_connect_response - connect/disconnect response
251 * @hbm_cmd - bus message command header
252 * @me_addr - address of the client in ME
253 * @host_addr - address of the client in the driver
254 * @status - status of the request
256 struct hbm_client_connect_response
{
264 #define MEI_FC_MESSAGE_RESERVED_LENGTH 5
266 struct hbm_flow_control
{
270 u8 reserved
[MEI_FC_MESSAGE_RESERVED_LENGTH
];