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_INTEROP_TIMEOUT 7 /* 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 */
38 #define HBM_MINOR_VERSION 0
39 #define HBM_MAJOR_VERSION 1
40 #define HBM_TIMEOUT 1 /* 1 second */
42 /* Host bus message command opcode */
43 #define MEI_HBM_CMD_OP_MSK 0x7f
44 /* Host bus message command RESPONSE */
45 #define MEI_HBM_CMD_RES_MSK 0x80
48 * MEI Bus Message Command IDs
50 #define HOST_START_REQ_CMD 0x01
51 #define HOST_START_RES_CMD 0x81
53 #define HOST_STOP_REQ_CMD 0x02
54 #define HOST_STOP_RES_CMD 0x82
56 #define ME_STOP_REQ_CMD 0x03
58 #define HOST_ENUM_REQ_CMD 0x04
59 #define HOST_ENUM_RES_CMD 0x84
61 #define HOST_CLIENT_PROPERTIES_REQ_CMD 0x05
62 #define HOST_CLIENT_PROPERTIES_RES_CMD 0x85
64 #define CLIENT_CONNECT_REQ_CMD 0x06
65 #define CLIENT_CONNECT_RES_CMD 0x86
67 #define CLIENT_DISCONNECT_REQ_CMD 0x07
68 #define CLIENT_DISCONNECT_RES_CMD 0x87
70 #define MEI_FLOW_CONTROL_CMD 0x08
74 * used by hbm_host_stop_request.reason
76 enum mei_stop_reason_types
{
77 DRIVER_STOP_REQUEST
= 0x00,
78 DEVICE_D1_ENTRY
= 0x01,
79 DEVICE_D2_ENTRY
= 0x02,
80 DEVICE_D3_ENTRY
= 0x03,
81 SYSTEM_S1_ENTRY
= 0x04,
82 SYSTEM_S2_ENTRY
= 0x05,
83 SYSTEM_S3_ENTRY
= 0x06,
84 SYSTEM_S4_ENTRY
= 0x07,
85 SYSTEM_S5_ENTRY
= 0x08
89 * Client Connect Status
90 * used by hbm_client_connect_response.status
92 enum client_connect_status_types
{
95 CCS_ALREADY_STARTED
= 0x02,
96 CCS_OUT_OF_RESOURCES
= 0x03,
97 CCS_MESSAGE_SMALL
= 0x04
101 * Client Disconnect Status
103 enum client_disconnect_status_types
{
108 * MEI BUS Interface Section
119 struct mei_bus_message
{
125 * struct hbm_cl_cmd - client specific host bus command
126 * CONNECT, DISCONNECT, and FlOW CONTROL
128 * @hbm_cmd - bus message command header
129 * @me_addr - address of the client in ME
130 * @host_addr - address of the client in the driver
133 struct mei_hbm_cl_cmd
{
145 struct hbm_host_version_request
{
148 struct hbm_version host_version
;
151 struct hbm_host_version_response
{
153 u8 host_version_supported
;
154 struct hbm_version me_max_version
;
157 struct hbm_host_stop_request
{
163 struct hbm_host_stop_response
{
168 struct hbm_me_stop_request
{
174 struct hbm_host_enum_request
{
179 struct hbm_host_enum_response
{
182 u8 valid_addresses
[32];
185 struct mei_client_properties
{
186 uuid_le protocol_name
;
188 u8 max_number_of_connections
;
194 struct hbm_props_request
{
201 struct hbm_props_response
{
206 struct mei_client_properties client_properties
;
210 * struct hbm_client_connect_request - connect/disconnect request
212 * @hbm_cmd - bus message command header
213 * @me_addr - address of the client in ME
214 * @host_addr - address of the client in the driver
217 struct hbm_client_connect_request
{
225 * struct hbm_client_connect_response - connect/disconnect response
227 * @hbm_cmd - bus message command header
228 * @me_addr - address of the client in ME
229 * @host_addr - address of the client in the driver
230 * @status - status of the request
232 struct hbm_client_connect_response
{
240 #define MEI_FC_MESSAGE_RESERVED_LENGTH 5
242 struct hbm_flow_control
{
246 u8 reserved
[MEI_FC_MESSAGE_RESERVED_LENGTH
];