Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Intel Management Engine Interface (Intel MEI) Linux driver |
Tomas Winkler | 733ba91 | 2012-02-09 19:25:53 +0200 | [diff] [blame] | 4 | * Copyright (c) 2003-2012, Intel Corporation. |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 5 | * |
| 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. |
| 9 | * |
| 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 |
| 13 | * more details. |
| 14 | * |
| 15 | */ |
| 16 | |
| 17 | #ifndef _MEI_HW_TYPES_H_ |
| 18 | #define _MEI_HW_TYPES_H_ |
| 19 | |
| 20 | #include <linux/uuid.h> |
| 21 | |
| 22 | /* |
Tomas Winkler | 3870c32 | 2012-11-01 21:17:14 +0200 | [diff] [blame] | 23 | * Timeouts in Seconds |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 24 | */ |
Tomas Winkler | 7d93e58 | 2014-01-14 23:10:10 +0200 | [diff] [blame] | 25 | #define MEI_HW_READY_TIMEOUT 2 /* Timeout on ready message */ |
Tomas Winkler | 3870c32 | 2012-11-01 21:17:14 +0200 | [diff] [blame] | 26 | #define MEI_CONNECT_TIMEOUT 3 /* HPS: at least 2 seconds */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 27 | |
Tomas Winkler | 3870c32 | 2012-11-01 21:17:14 +0200 | [diff] [blame] | 28 | #define MEI_CL_CONNECT_TIMEOUT 15 /* HPS: Client Connect Timeout */ |
| 29 | #define MEI_CLIENTS_INIT_TIMEOUT 15 /* HPS: Clients Enumeration Timeout */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 30 | |
Tomas Winkler | 3870c32 | 2012-11-01 21:17:14 +0200 | [diff] [blame] | 31 | #define MEI_IAMTHIF_STALL_TIMER 12 /* HPS */ |
| 32 | #define MEI_IAMTHIF_READ_TIMER 10 /* HPS */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 33 | |
Tomas Winkler | ba9cdd0 | 2014-03-18 22:52:00 +0200 | [diff] [blame] | 34 | #define MEI_PGI_TIMEOUT 1 /* PG Isolation time response 1 sec */ |
Tomas Winkler | 7d93e58 | 2014-01-14 23:10:10 +0200 | [diff] [blame] | 35 | #define MEI_HBM_TIMEOUT 1 /* 1 second */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 36 | |
| 37 | /* |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 38 | * MEI Version |
| 39 | */ |
Tomas Winkler | 61a1aea7 | 2014-03-18 22:52:07 +0200 | [diff] [blame] | 40 | #define HBM_MINOR_VERSION 1 |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 41 | #define HBM_MAJOR_VERSION 1 |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 42 | |
Tomas Winkler | ee7e5af | 2014-03-18 22:51:58 +0200 | [diff] [blame] | 43 | /* |
| 44 | * MEI version with PGI support |
| 45 | */ |
| 46 | #define HBM_MINOR_VERSION_PGI 1 |
| 47 | #define HBM_MAJOR_VERSION_PGI 1 |
| 48 | |
Tomas Winkler | 70ef835 | 2015-07-23 21:37:12 +0300 | [diff] [blame] | 49 | /* |
| 50 | * MEI version with Dynamic clients support |
| 51 | */ |
| 52 | #define HBM_MINOR_VERSION_DC 0 |
| 53 | #define HBM_MAJOR_VERSION_DC 2 |
| 54 | |
Alexander Usyskin | 1890135 | 2015-07-23 21:37:13 +0300 | [diff] [blame] | 55 | /* |
| 56 | * MEI version with disconnect on connection timeout support |
| 57 | */ |
| 58 | #define HBM_MINOR_VERSION_DOT 0 |
| 59 | #define HBM_MAJOR_VERSION_DOT 2 |
| 60 | |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 61 | /* Host bus message command opcode */ |
| 62 | #define MEI_HBM_CMD_OP_MSK 0x7f |
| 63 | /* Host bus message command RESPONSE */ |
| 64 | #define MEI_HBM_CMD_RES_MSK 0x80 |
| 65 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 66 | /* |
| 67 | * MEI Bus Message Command IDs |
| 68 | */ |
| 69 | #define HOST_START_REQ_CMD 0x01 |
| 70 | #define HOST_START_RES_CMD 0x81 |
| 71 | |
| 72 | #define HOST_STOP_REQ_CMD 0x02 |
| 73 | #define HOST_STOP_RES_CMD 0x82 |
| 74 | |
| 75 | #define ME_STOP_REQ_CMD 0x03 |
| 76 | |
| 77 | #define HOST_ENUM_REQ_CMD 0x04 |
| 78 | #define HOST_ENUM_RES_CMD 0x84 |
| 79 | |
| 80 | #define HOST_CLIENT_PROPERTIES_REQ_CMD 0x05 |
| 81 | #define HOST_CLIENT_PROPERTIES_RES_CMD 0x85 |
| 82 | |
| 83 | #define CLIENT_CONNECT_REQ_CMD 0x06 |
| 84 | #define CLIENT_CONNECT_RES_CMD 0x86 |
| 85 | |
| 86 | #define CLIENT_DISCONNECT_REQ_CMD 0x07 |
| 87 | #define CLIENT_DISCONNECT_RES_CMD 0x87 |
| 88 | |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 89 | #define MEI_FLOW_CONTROL_CMD 0x08 |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 90 | |
Tomas Winkler | 4fcbc99 | 2014-03-18 22:51:55 +0200 | [diff] [blame] | 91 | #define MEI_PG_ISOLATION_ENTRY_REQ_CMD 0x0a |
| 92 | #define MEI_PG_ISOLATION_ENTRY_RES_CMD 0x8a |
| 93 | #define MEI_PG_ISOLATION_EXIT_REQ_CMD 0x0b |
| 94 | #define MEI_PG_ISOLATION_EXIT_RES_CMD 0x8b |
| 95 | |
Tomas Winkler | 70ef835 | 2015-07-23 21:37:12 +0300 | [diff] [blame] | 96 | #define MEI_HBM_ADD_CLIENT_REQ_CMD 0x0f |
| 97 | #define MEI_HBM_ADD_CLIENT_RES_CMD 0x8f |
Tomas Winkler | d3c1c80 | 2015-07-26 09:54:15 +0300 | [diff] [blame^] | 98 | |
| 99 | #define MEI_HBM_NOTIFY_REQ_CMD 0x10 |
| 100 | #define MEI_HBM_NOTIFY_RES_CMD 0x90 |
| 101 | #define MEI_HBM_NOTIFICATION_CMD 0x11 |
| 102 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 103 | /* |
| 104 | * MEI Stop Reason |
| 105 | * used by hbm_host_stop_request.reason |
| 106 | */ |
| 107 | enum mei_stop_reason_types { |
| 108 | DRIVER_STOP_REQUEST = 0x00, |
| 109 | DEVICE_D1_ENTRY = 0x01, |
| 110 | DEVICE_D2_ENTRY = 0x02, |
| 111 | DEVICE_D3_ENTRY = 0x03, |
| 112 | SYSTEM_S1_ENTRY = 0x04, |
| 113 | SYSTEM_S2_ENTRY = 0x05, |
| 114 | SYSTEM_S3_ENTRY = 0x06, |
| 115 | SYSTEM_S4_ENTRY = 0x07, |
| 116 | SYSTEM_S5_ENTRY = 0x08 |
| 117 | }; |
| 118 | |
Tomas Winkler | 89778d6 | 2014-08-21 14:29:16 +0300 | [diff] [blame] | 119 | |
| 120 | /** |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 121 | * enum mei_hbm_status - mei host bus messages return values |
Tomas Winkler | 89778d6 | 2014-08-21 14:29:16 +0300 | [diff] [blame] | 122 | * |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 123 | * @MEI_HBMS_SUCCESS : status success |
| 124 | * @MEI_HBMS_CLIENT_NOT_FOUND : client not found |
| 125 | * @MEI_HBMS_ALREADY_EXISTS : connection already established |
| 126 | * @MEI_HBMS_REJECTED : connection is rejected |
| 127 | * @MEI_HBMS_INVALID_PARAMETER : invalid parameter |
| 128 | * @MEI_HBMS_NOT_ALLOWED : operation not allowed |
| 129 | * @MEI_HBMS_ALREADY_STARTED : system is already started |
| 130 | * @MEI_HBMS_NOT_STARTED : system not started |
Alexander Usyskin | ce23139 | 2014-09-29 16:31:50 +0300 | [diff] [blame] | 131 | * |
| 132 | * @MEI_HBMS_MAX : sentinel |
Tomas Winkler | 89778d6 | 2014-08-21 14:29:16 +0300 | [diff] [blame] | 133 | */ |
| 134 | enum mei_hbm_status { |
| 135 | MEI_HBMS_SUCCESS = 0, |
| 136 | MEI_HBMS_CLIENT_NOT_FOUND = 1, |
| 137 | MEI_HBMS_ALREADY_EXISTS = 2, |
| 138 | MEI_HBMS_REJECTED = 3, |
| 139 | MEI_HBMS_INVALID_PARAMETER = 4, |
| 140 | MEI_HBMS_NOT_ALLOWED = 5, |
| 141 | MEI_HBMS_ALREADY_STARTED = 6, |
| 142 | MEI_HBMS_NOT_STARTED = 7, |
| 143 | |
| 144 | MEI_HBMS_MAX |
| 145 | }; |
| 146 | |
| 147 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 148 | /* |
| 149 | * Client Connect Status |
| 150 | * used by hbm_client_connect_response.status |
| 151 | */ |
Alexander Usyskin | 285e299 | 2014-02-17 15:13:20 +0200 | [diff] [blame] | 152 | enum mei_cl_connect_status { |
Tomas Winkler | 89778d6 | 2014-08-21 14:29:16 +0300 | [diff] [blame] | 153 | MEI_CL_CONN_SUCCESS = MEI_HBMS_SUCCESS, |
| 154 | MEI_CL_CONN_NOT_FOUND = MEI_HBMS_CLIENT_NOT_FOUND, |
| 155 | MEI_CL_CONN_ALREADY_STARTED = MEI_HBMS_ALREADY_EXISTS, |
| 156 | MEI_CL_CONN_OUT_OF_RESOURCES = MEI_HBMS_REJECTED, |
| 157 | MEI_CL_CONN_MESSAGE_SMALL = MEI_HBMS_INVALID_PARAMETER, |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 158 | }; |
| 159 | |
| 160 | /* |
| 161 | * Client Disconnect Status |
| 162 | */ |
Alexander Usyskin | 285e299 | 2014-02-17 15:13:20 +0200 | [diff] [blame] | 163 | enum mei_cl_disconnect_status { |
Tomas Winkler | 89778d6 | 2014-08-21 14:29:16 +0300 | [diff] [blame] | 164 | MEI_CL_DISCONN_SUCCESS = MEI_HBMS_SUCCESS |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 165 | }; |
| 166 | |
| 167 | /* |
| 168 | * MEI BUS Interface Section |
| 169 | */ |
| 170 | struct mei_msg_hdr { |
| 171 | u32 me_addr:8; |
| 172 | u32 host_addr:8; |
| 173 | u32 length:9; |
Tomas Winkler | 479327f | 2013-12-17 15:56:56 +0200 | [diff] [blame] | 174 | u32 reserved:5; |
| 175 | u32 internal:1; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 176 | u32 msg_complete:1; |
| 177 | } __packed; |
| 178 | |
| 179 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 180 | struct mei_bus_message { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 181 | u8 hbm_cmd; |
| 182 | u8 data[0]; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 183 | } __packed; |
| 184 | |
Tomas Winkler | cd51ed6 | 2012-12-25 19:06:09 +0200 | [diff] [blame] | 185 | /** |
| 186 | * struct hbm_cl_cmd - client specific host bus command |
| 187 | * CONNECT, DISCONNECT, and FlOW CONTROL |
| 188 | * |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 189 | * @hbm_cmd: bus message command header |
| 190 | * @me_addr: address of the client in ME |
| 191 | * @host_addr: address of the client in the driver |
| 192 | * @data: generic data |
Tomas Winkler | cd51ed6 | 2012-12-25 19:06:09 +0200 | [diff] [blame] | 193 | */ |
| 194 | struct mei_hbm_cl_cmd { |
| 195 | u8 hbm_cmd; |
| 196 | u8 me_addr; |
| 197 | u8 host_addr; |
| 198 | u8 data; |
| 199 | }; |
| 200 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 201 | struct hbm_version { |
| 202 | u8 minor_version; |
| 203 | u8 major_version; |
| 204 | } __packed; |
| 205 | |
| 206 | struct hbm_host_version_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 207 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 208 | u8 reserved; |
| 209 | struct hbm_version host_version; |
| 210 | } __packed; |
| 211 | |
| 212 | struct hbm_host_version_response { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 213 | u8 hbm_cmd; |
Tomas Winkler | 4b00706 | 2012-02-23 21:52:55 +0200 | [diff] [blame] | 214 | u8 host_version_supported; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 215 | struct hbm_version me_max_version; |
| 216 | } __packed; |
| 217 | |
| 218 | struct hbm_host_stop_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 219 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 220 | u8 reason; |
| 221 | u8 reserved[2]; |
| 222 | } __packed; |
| 223 | |
| 224 | struct hbm_host_stop_response { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 225 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 226 | u8 reserved[3]; |
| 227 | } __packed; |
| 228 | |
| 229 | struct hbm_me_stop_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 230 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 231 | u8 reason; |
| 232 | u8 reserved[2]; |
| 233 | } __packed; |
| 234 | |
Tomas Winkler | 70ef835 | 2015-07-23 21:37:12 +0300 | [diff] [blame] | 235 | /** |
| 236 | * struct hbm_host_enum_request - enumeration request from host to fw |
| 237 | * |
| 238 | * @hbm_cmd: bus message command header |
| 239 | * @allow_add: allow dynamic clients add HBM version >= 2.0 |
| 240 | * @reserved: reserved |
| 241 | */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 242 | struct hbm_host_enum_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 243 | u8 hbm_cmd; |
Tomas Winkler | 70ef835 | 2015-07-23 21:37:12 +0300 | [diff] [blame] | 244 | u8 allow_add; |
| 245 | u8 reserved[2]; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 246 | } __packed; |
| 247 | |
| 248 | struct hbm_host_enum_response { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 249 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 250 | u8 reserved[3]; |
| 251 | u8 valid_addresses[32]; |
| 252 | } __packed; |
| 253 | |
| 254 | struct mei_client_properties { |
| 255 | uuid_le protocol_name; |
| 256 | u8 protocol_version; |
| 257 | u8 max_number_of_connections; |
| 258 | u8 fixed_address; |
| 259 | u8 single_recv_buf; |
| 260 | u32 max_msg_length; |
| 261 | } __packed; |
| 262 | |
| 263 | struct hbm_props_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 264 | u8 hbm_cmd; |
Tomas Winkler | 3438c1f | 2014-08-21 14:29:10 +0300 | [diff] [blame] | 265 | u8 me_addr; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 266 | u8 reserved[2]; |
| 267 | } __packed; |
| 268 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 269 | struct hbm_props_response { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 270 | u8 hbm_cmd; |
Tomas Winkler | 3438c1f | 2014-08-21 14:29:10 +0300 | [diff] [blame] | 271 | u8 me_addr; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 272 | u8 status; |
| 273 | u8 reserved[1]; |
| 274 | struct mei_client_properties client_properties; |
| 275 | } __packed; |
| 276 | |
Tomas Winkler | aeba4a0 | 2012-11-11 17:38:04 +0200 | [diff] [blame] | 277 | /** |
Tomas Winkler | 70ef835 | 2015-07-23 21:37:12 +0300 | [diff] [blame] | 278 | * struct hbm_add_client_request - request to add a client |
| 279 | * might be sent by fw after enumeration has already completed |
| 280 | * |
| 281 | * @hbm_cmd: bus message command header |
| 282 | * @me_addr: address of the client in ME |
| 283 | * @reserved: reserved |
| 284 | * @client_properties: client properties |
| 285 | */ |
| 286 | struct hbm_add_client_request { |
| 287 | u8 hbm_cmd; |
| 288 | u8 me_addr; |
| 289 | u8 reserved[2]; |
| 290 | struct mei_client_properties client_properties; |
| 291 | } __packed; |
| 292 | |
| 293 | /** |
| 294 | * struct hbm_add_client_response - response to add a client |
| 295 | * sent by the host to report client addition status to fw |
| 296 | * |
| 297 | * @hbm_cmd: bus message command header |
| 298 | * @me_addr: address of the client in ME |
| 299 | * @status: if HBMS_SUCCESS then the client can now accept connections. |
| 300 | * @reserved: reserved |
| 301 | */ |
| 302 | struct hbm_add_client_response { |
| 303 | u8 hbm_cmd; |
| 304 | u8 me_addr; |
| 305 | u8 status; |
| 306 | u8 reserved[1]; |
| 307 | } __packed; |
| 308 | |
| 309 | /** |
Tomas Winkler | 4fcbc99 | 2014-03-18 22:51:55 +0200 | [diff] [blame] | 310 | * struct hbm_power_gate - power gate request/response |
| 311 | * |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 312 | * @hbm_cmd: bus message command header |
| 313 | * @reserved: reserved |
Tomas Winkler | 4fcbc99 | 2014-03-18 22:51:55 +0200 | [diff] [blame] | 314 | */ |
| 315 | struct hbm_power_gate { |
| 316 | u8 hbm_cmd; |
| 317 | u8 reserved[3]; |
| 318 | } __packed; |
| 319 | |
| 320 | /** |
Tomas Winkler | aeba4a0 | 2012-11-11 17:38:04 +0200 | [diff] [blame] | 321 | * struct hbm_client_connect_request - connect/disconnect request |
| 322 | * |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 323 | * @hbm_cmd: bus message command header |
| 324 | * @me_addr: address of the client in ME |
| 325 | * @host_addr: address of the client in the driver |
| 326 | * @reserved: reserved |
Tomas Winkler | aeba4a0 | 2012-11-11 17:38:04 +0200 | [diff] [blame] | 327 | */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 328 | struct hbm_client_connect_request { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 329 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 330 | u8 me_addr; |
| 331 | u8 host_addr; |
| 332 | u8 reserved; |
| 333 | } __packed; |
| 334 | |
Tomas Winkler | aeba4a0 | 2012-11-11 17:38:04 +0200 | [diff] [blame] | 335 | /** |
| 336 | * struct hbm_client_connect_response - connect/disconnect response |
| 337 | * |
Alexander Usyskin | a8605ea | 2014-09-29 16:31:49 +0300 | [diff] [blame] | 338 | * @hbm_cmd: bus message command header |
| 339 | * @me_addr: address of the client in ME |
| 340 | * @host_addr: address of the client in the driver |
| 341 | * @status: status of the request |
Tomas Winkler | aeba4a0 | 2012-11-11 17:38:04 +0200 | [diff] [blame] | 342 | */ |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 343 | struct hbm_client_connect_response { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 344 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 345 | u8 me_addr; |
| 346 | u8 host_addr; |
| 347 | u8 status; |
| 348 | } __packed; |
| 349 | |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 350 | |
| 351 | #define MEI_FC_MESSAGE_RESERVED_LENGTH 5 |
| 352 | |
| 353 | struct hbm_flow_control { |
Tomas Winkler | 1ca7e78 | 2012-02-26 23:18:57 +0200 | [diff] [blame] | 354 | u8 hbm_cmd; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 355 | u8 me_addr; |
| 356 | u8 host_addr; |
| 357 | u8 reserved[MEI_FC_MESSAGE_RESERVED_LENGTH]; |
| 358 | } __packed; |
| 359 | |
Tomas Winkler | d3c1c80 | 2015-07-26 09:54:15 +0300 | [diff] [blame^] | 360 | #define MEI_HBM_NOTIFICATION_START 1 |
| 361 | #define MEI_HBM_NOTIFICATION_STOP 0 |
| 362 | /** |
| 363 | * struct hbm_notification_request - start/stop notification request |
| 364 | * |
| 365 | * @hbm_cmd: bus message command header |
| 366 | * @me_addr: address of the client in ME |
| 367 | * @host_addr: address of the client in the driver |
| 368 | * @start: start = 1 or stop = 0 asynchronous notifications |
| 369 | */ |
| 370 | struct hbm_notification_request { |
| 371 | u8 hbm_cmd; |
| 372 | u8 me_addr; |
| 373 | u8 host_addr; |
| 374 | u8 start; |
| 375 | } __packed; |
| 376 | |
| 377 | /** |
| 378 | * struct hbm_notification_response - start/stop notification response |
| 379 | * |
| 380 | * @hbm_cmd: bus message command header |
| 381 | * @me_addr: address of the client in ME |
| 382 | * @host_addr: - address of the client in the driver |
| 383 | * @status: (mei_hbm_status) response status for the request |
| 384 | * - MEI_HBMS_SUCCESS: successful stop/start |
| 385 | * - MEI_HBMS_CLIENT_NOT_FOUND: if the connection could not be found. |
| 386 | * - MEI_HBMS_ALREADY_STARTED: for start requests for a previously |
| 387 | * started notification. |
| 388 | * - MEI_HBMS_NOT_STARTED: for stop request for a connected client for whom |
| 389 | * asynchronous notifications are currently disabled. |
| 390 | * |
| 391 | * @start: start = 1 or stop = 0 asynchronous notifications |
| 392 | * @reserved: reserved |
| 393 | */ |
| 394 | struct hbm_notification_response { |
| 395 | u8 hbm_cmd; |
| 396 | u8 me_addr; |
| 397 | u8 host_addr; |
| 398 | u8 status; |
| 399 | u8 start; |
| 400 | u8 reserved[3]; |
| 401 | } __packed; |
| 402 | |
| 403 | /** |
| 404 | * struct hbm_notification - notification event |
| 405 | * |
| 406 | * @hbm_cmd: bus message command header |
| 407 | * @me_addr: address of the client in ME |
| 408 | * @host_addr: address of the client in the driver |
| 409 | * @reserved: reserved for alignment |
| 410 | */ |
| 411 | struct hbm_notification { |
| 412 | u8 hbm_cmd; |
| 413 | u8 me_addr; |
| 414 | u8 host_addr; |
| 415 | u8 reserved[1]; |
| 416 | } __packed; |
Oren Weil | 5a6003f | 2011-05-15 13:43:45 +0300 | [diff] [blame] | 417 | |
| 418 | #endif |