1ffc2825cSGreg Kroah-Hartman /* 2ffc2825cSGreg Kroah-Hartman * 3ffc2825cSGreg Kroah-Hartman * Intel Management Engine Interface (Intel MEI) Linux driver 4ffc2825cSGreg Kroah-Hartman * Copyright (c) 2003-2012, Intel Corporation. 5ffc2825cSGreg Kroah-Hartman * 6ffc2825cSGreg Kroah-Hartman * This program is free software; you can redistribute it and/or modify it 7ffc2825cSGreg Kroah-Hartman * under the terms and conditions of the GNU General Public License, 8ffc2825cSGreg Kroah-Hartman * version 2, as published by the Free Software Foundation. 9ffc2825cSGreg Kroah-Hartman * 10ffc2825cSGreg Kroah-Hartman * This program is distributed in the hope it will be useful, but WITHOUT 11ffc2825cSGreg Kroah-Hartman * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12ffc2825cSGreg Kroah-Hartman * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13ffc2825cSGreg Kroah-Hartman * more details. 14ffc2825cSGreg Kroah-Hartman * 15ffc2825cSGreg Kroah-Hartman */ 16ffc2825cSGreg Kroah-Hartman 17ffc2825cSGreg Kroah-Hartman #ifndef _MEI_HW_TYPES_H_ 18ffc2825cSGreg Kroah-Hartman #define _MEI_HW_TYPES_H_ 19ffc2825cSGreg Kroah-Hartman 20ffc2825cSGreg Kroah-Hartman #include <linux/uuid.h> 21ffc2825cSGreg Kroah-Hartman 22ffc2825cSGreg Kroah-Hartman /* 233870c320STomas Winkler * Timeouts in Seconds 24ffc2825cSGreg Kroah-Hartman */ 257d93e58dSTomas Winkler #define MEI_HW_READY_TIMEOUT 2 /* Timeout on ready message */ 263870c320STomas Winkler #define MEI_CONNECT_TIMEOUT 3 /* HPS: at least 2 seconds */ 27ffc2825cSGreg Kroah-Hartman 283870c320STomas Winkler #define MEI_CL_CONNECT_TIMEOUT 15 /* HPS: Client Connect Timeout */ 293870c320STomas Winkler #define MEI_CLIENTS_INIT_TIMEOUT 15 /* HPS: Clients Enumeration Timeout */ 30ffc2825cSGreg Kroah-Hartman 313870c320STomas Winkler #define MEI_IAMTHIF_STALL_TIMER 12 /* HPS */ 323870c320STomas Winkler #define MEI_IAMTHIF_READ_TIMER 10 /* HPS */ 33ffc2825cSGreg Kroah-Hartman 34ba9cdd0eSTomas Winkler #define MEI_PGI_TIMEOUT 1 /* PG Isolation time response 1 sec */ 35859ef2ffSAlexander Usyskin #define MEI_D0I3_TIMEOUT 5 /* D0i3 set/unset max response time */ 367d93e58dSTomas Winkler #define MEI_HBM_TIMEOUT 1 /* 1 second */ 37ffc2825cSGreg Kroah-Hartman 38ffc2825cSGreg Kroah-Hartman /* 39ffc2825cSGreg Kroah-Hartman * MEI Version 40ffc2825cSGreg Kroah-Hartman */ 4161a1aea7STomas Winkler #define HBM_MINOR_VERSION 1 42ffc2825cSGreg Kroah-Hartman #define HBM_MAJOR_VERSION 1 43ffc2825cSGreg Kroah-Hartman 44ee7e5afdSTomas Winkler /* 45ee7e5afdSTomas Winkler * MEI version with PGI support 46ee7e5afdSTomas Winkler */ 47ee7e5afdSTomas Winkler #define HBM_MINOR_VERSION_PGI 1 48ee7e5afdSTomas Winkler #define HBM_MAJOR_VERSION_PGI 1 49ee7e5afdSTomas Winkler 5070ef835cSTomas Winkler /* 5170ef835cSTomas Winkler * MEI version with Dynamic clients support 5270ef835cSTomas Winkler */ 5370ef835cSTomas Winkler #define HBM_MINOR_VERSION_DC 0 5470ef835cSTomas Winkler #define HBM_MAJOR_VERSION_DC 2 5570ef835cSTomas Winkler 5618901357SAlexander Usyskin /* 5718901357SAlexander Usyskin * MEI version with disconnect on connection timeout support 5818901357SAlexander Usyskin */ 5918901357SAlexander Usyskin #define HBM_MINOR_VERSION_DOT 0 6018901357SAlexander Usyskin #define HBM_MAJOR_VERSION_DOT 2 6118901357SAlexander Usyskin 624d99877dSTomas Winkler /* 634d99877dSTomas Winkler * MEI version with notifcation support 644d99877dSTomas Winkler */ 654d99877dSTomas Winkler #define HBM_MINOR_VERSION_EV 0 664d99877dSTomas Winkler #define HBM_MAJOR_VERSION_EV 2 674d99877dSTomas Winkler 68ffc2825cSGreg Kroah-Hartman /* Host bus message command opcode */ 69ffc2825cSGreg Kroah-Hartman #define MEI_HBM_CMD_OP_MSK 0x7f 70ffc2825cSGreg Kroah-Hartman /* Host bus message command RESPONSE */ 71ffc2825cSGreg Kroah-Hartman #define MEI_HBM_CMD_RES_MSK 0x80 72ffc2825cSGreg Kroah-Hartman 73ffc2825cSGreg Kroah-Hartman /* 74ffc2825cSGreg Kroah-Hartman * MEI Bus Message Command IDs 75ffc2825cSGreg Kroah-Hartman */ 76ffc2825cSGreg Kroah-Hartman #define HOST_START_REQ_CMD 0x01 77ffc2825cSGreg Kroah-Hartman #define HOST_START_RES_CMD 0x81 78ffc2825cSGreg Kroah-Hartman 79ffc2825cSGreg Kroah-Hartman #define HOST_STOP_REQ_CMD 0x02 80ffc2825cSGreg Kroah-Hartman #define HOST_STOP_RES_CMD 0x82 81ffc2825cSGreg Kroah-Hartman 82ffc2825cSGreg Kroah-Hartman #define ME_STOP_REQ_CMD 0x03 83ffc2825cSGreg Kroah-Hartman 84ffc2825cSGreg Kroah-Hartman #define HOST_ENUM_REQ_CMD 0x04 85ffc2825cSGreg Kroah-Hartman #define HOST_ENUM_RES_CMD 0x84 86ffc2825cSGreg Kroah-Hartman 87ffc2825cSGreg Kroah-Hartman #define HOST_CLIENT_PROPERTIES_REQ_CMD 0x05 88ffc2825cSGreg Kroah-Hartman #define HOST_CLIENT_PROPERTIES_RES_CMD 0x85 89ffc2825cSGreg Kroah-Hartman 90ffc2825cSGreg Kroah-Hartman #define CLIENT_CONNECT_REQ_CMD 0x06 91ffc2825cSGreg Kroah-Hartman #define CLIENT_CONNECT_RES_CMD 0x86 92ffc2825cSGreg Kroah-Hartman 93ffc2825cSGreg Kroah-Hartman #define CLIENT_DISCONNECT_REQ_CMD 0x07 94ffc2825cSGreg Kroah-Hartman #define CLIENT_DISCONNECT_RES_CMD 0x87 95ffc2825cSGreg Kroah-Hartman 96ffc2825cSGreg Kroah-Hartman #define MEI_FLOW_CONTROL_CMD 0x08 97ffc2825cSGreg Kroah-Hartman 984fcbc99bSTomas Winkler #define MEI_PG_ISOLATION_ENTRY_REQ_CMD 0x0a 994fcbc99bSTomas Winkler #define MEI_PG_ISOLATION_ENTRY_RES_CMD 0x8a 1004fcbc99bSTomas Winkler #define MEI_PG_ISOLATION_EXIT_REQ_CMD 0x0b 1014fcbc99bSTomas Winkler #define MEI_PG_ISOLATION_EXIT_RES_CMD 0x8b 1024fcbc99bSTomas Winkler 10370ef835cSTomas Winkler #define MEI_HBM_ADD_CLIENT_REQ_CMD 0x0f 10470ef835cSTomas Winkler #define MEI_HBM_ADD_CLIENT_RES_CMD 0x8f 105d3c1c809STomas Winkler 106d3c1c809STomas Winkler #define MEI_HBM_NOTIFY_REQ_CMD 0x10 107d3c1c809STomas Winkler #define MEI_HBM_NOTIFY_RES_CMD 0x90 108d3c1c809STomas Winkler #define MEI_HBM_NOTIFICATION_CMD 0x11 109d3c1c809STomas Winkler 110ffc2825cSGreg Kroah-Hartman /* 111ffc2825cSGreg Kroah-Hartman * MEI Stop Reason 112ffc2825cSGreg Kroah-Hartman * used by hbm_host_stop_request.reason 113ffc2825cSGreg Kroah-Hartman */ 114ffc2825cSGreg Kroah-Hartman enum mei_stop_reason_types { 115ffc2825cSGreg Kroah-Hartman DRIVER_STOP_REQUEST = 0x00, 116ffc2825cSGreg Kroah-Hartman DEVICE_D1_ENTRY = 0x01, 117ffc2825cSGreg Kroah-Hartman DEVICE_D2_ENTRY = 0x02, 118ffc2825cSGreg Kroah-Hartman DEVICE_D3_ENTRY = 0x03, 119ffc2825cSGreg Kroah-Hartman SYSTEM_S1_ENTRY = 0x04, 120ffc2825cSGreg Kroah-Hartman SYSTEM_S2_ENTRY = 0x05, 121ffc2825cSGreg Kroah-Hartman SYSTEM_S3_ENTRY = 0x06, 122ffc2825cSGreg Kroah-Hartman SYSTEM_S4_ENTRY = 0x07, 123ffc2825cSGreg Kroah-Hartman SYSTEM_S5_ENTRY = 0x08 124ffc2825cSGreg Kroah-Hartman }; 125ffc2825cSGreg Kroah-Hartman 12689778d6eSTomas Winkler 12789778d6eSTomas Winkler /** 128a8605ea2SAlexander Usyskin * enum mei_hbm_status - mei host bus messages return values 12989778d6eSTomas Winkler * 130a8605ea2SAlexander Usyskin * @MEI_HBMS_SUCCESS : status success 131a8605ea2SAlexander Usyskin * @MEI_HBMS_CLIENT_NOT_FOUND : client not found 132a8605ea2SAlexander Usyskin * @MEI_HBMS_ALREADY_EXISTS : connection already established 133a8605ea2SAlexander Usyskin * @MEI_HBMS_REJECTED : connection is rejected 134a8605ea2SAlexander Usyskin * @MEI_HBMS_INVALID_PARAMETER : invalid parameter 135a8605ea2SAlexander Usyskin * @MEI_HBMS_NOT_ALLOWED : operation not allowed 136a8605ea2SAlexander Usyskin * @MEI_HBMS_ALREADY_STARTED : system is already started 137a8605ea2SAlexander Usyskin * @MEI_HBMS_NOT_STARTED : system not started 138ce23139cSAlexander Usyskin * 139ce23139cSAlexander Usyskin * @MEI_HBMS_MAX : sentinel 14089778d6eSTomas Winkler */ 14189778d6eSTomas Winkler enum mei_hbm_status { 14289778d6eSTomas Winkler MEI_HBMS_SUCCESS = 0, 14389778d6eSTomas Winkler MEI_HBMS_CLIENT_NOT_FOUND = 1, 14489778d6eSTomas Winkler MEI_HBMS_ALREADY_EXISTS = 2, 14589778d6eSTomas Winkler MEI_HBMS_REJECTED = 3, 14689778d6eSTomas Winkler MEI_HBMS_INVALID_PARAMETER = 4, 14789778d6eSTomas Winkler MEI_HBMS_NOT_ALLOWED = 5, 14889778d6eSTomas Winkler MEI_HBMS_ALREADY_STARTED = 6, 14989778d6eSTomas Winkler MEI_HBMS_NOT_STARTED = 7, 15089778d6eSTomas Winkler 15189778d6eSTomas Winkler MEI_HBMS_MAX 15289778d6eSTomas Winkler }; 15389778d6eSTomas Winkler 15489778d6eSTomas Winkler 155ffc2825cSGreg Kroah-Hartman /* 156ffc2825cSGreg Kroah-Hartman * Client Connect Status 157ffc2825cSGreg Kroah-Hartman * used by hbm_client_connect_response.status 158ffc2825cSGreg Kroah-Hartman */ 159285e2996SAlexander Usyskin enum mei_cl_connect_status { 16089778d6eSTomas Winkler MEI_CL_CONN_SUCCESS = MEI_HBMS_SUCCESS, 16189778d6eSTomas Winkler MEI_CL_CONN_NOT_FOUND = MEI_HBMS_CLIENT_NOT_FOUND, 16289778d6eSTomas Winkler MEI_CL_CONN_ALREADY_STARTED = MEI_HBMS_ALREADY_EXISTS, 16389778d6eSTomas Winkler MEI_CL_CONN_OUT_OF_RESOURCES = MEI_HBMS_REJECTED, 16489778d6eSTomas Winkler MEI_CL_CONN_MESSAGE_SMALL = MEI_HBMS_INVALID_PARAMETER, 16571e117f2SAlexander Usyskin MEI_CL_CONN_NOT_ALLOWED = MEI_HBMS_NOT_ALLOWED, 166ffc2825cSGreg Kroah-Hartman }; 167ffc2825cSGreg Kroah-Hartman 168ffc2825cSGreg Kroah-Hartman /* 169ffc2825cSGreg Kroah-Hartman * Client Disconnect Status 170ffc2825cSGreg Kroah-Hartman */ 171285e2996SAlexander Usyskin enum mei_cl_disconnect_status { 17289778d6eSTomas Winkler MEI_CL_DISCONN_SUCCESS = MEI_HBMS_SUCCESS 173ffc2825cSGreg Kroah-Hartman }; 174ffc2825cSGreg Kroah-Hartman 175ffc2825cSGreg Kroah-Hartman /* 176ffc2825cSGreg Kroah-Hartman * MEI BUS Interface Section 177ffc2825cSGreg Kroah-Hartman */ 178ffc2825cSGreg Kroah-Hartman struct mei_msg_hdr { 179ffc2825cSGreg Kroah-Hartman u32 me_addr:8; 180ffc2825cSGreg Kroah-Hartman u32 host_addr:8; 181ffc2825cSGreg Kroah-Hartman u32 length:9; 182479327fcSTomas Winkler u32 reserved:5; 183479327fcSTomas Winkler u32 internal:1; 184ffc2825cSGreg Kroah-Hartman u32 msg_complete:1; 185ffc2825cSGreg Kroah-Hartman } __packed; 186ffc2825cSGreg Kroah-Hartman 187ffc2825cSGreg Kroah-Hartman 188ffc2825cSGreg Kroah-Hartman struct mei_bus_message { 189ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 190ffc2825cSGreg Kroah-Hartman u8 data[0]; 191ffc2825cSGreg Kroah-Hartman } __packed; 192ffc2825cSGreg Kroah-Hartman 193cd51ed64STomas Winkler /** 194cd51ed64STomas Winkler * struct hbm_cl_cmd - client specific host bus command 195cd51ed64STomas Winkler * CONNECT, DISCONNECT, and FlOW CONTROL 196cd51ed64STomas Winkler * 197a8605ea2SAlexander Usyskin * @hbm_cmd: bus message command header 198a8605ea2SAlexander Usyskin * @me_addr: address of the client in ME 199a8605ea2SAlexander Usyskin * @host_addr: address of the client in the driver 200a8605ea2SAlexander Usyskin * @data: generic data 201cd51ed64STomas Winkler */ 202cd51ed64STomas Winkler struct mei_hbm_cl_cmd { 203cd51ed64STomas Winkler u8 hbm_cmd; 204cd51ed64STomas Winkler u8 me_addr; 205cd51ed64STomas Winkler u8 host_addr; 206cd51ed64STomas Winkler u8 data; 207cd51ed64STomas Winkler }; 208cd51ed64STomas Winkler 209ffc2825cSGreg Kroah-Hartman struct hbm_version { 210ffc2825cSGreg Kroah-Hartman u8 minor_version; 211ffc2825cSGreg Kroah-Hartman u8 major_version; 212ffc2825cSGreg Kroah-Hartman } __packed; 213ffc2825cSGreg Kroah-Hartman 214ffc2825cSGreg Kroah-Hartman struct hbm_host_version_request { 215ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 216ffc2825cSGreg Kroah-Hartman u8 reserved; 217ffc2825cSGreg Kroah-Hartman struct hbm_version host_version; 218ffc2825cSGreg Kroah-Hartman } __packed; 219ffc2825cSGreg Kroah-Hartman 220ffc2825cSGreg Kroah-Hartman struct hbm_host_version_response { 221ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 222ffc2825cSGreg Kroah-Hartman u8 host_version_supported; 223ffc2825cSGreg Kroah-Hartman struct hbm_version me_max_version; 224ffc2825cSGreg Kroah-Hartman } __packed; 225ffc2825cSGreg Kroah-Hartman 226ffc2825cSGreg Kroah-Hartman struct hbm_host_stop_request { 227ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 228ffc2825cSGreg Kroah-Hartman u8 reason; 229ffc2825cSGreg Kroah-Hartman u8 reserved[2]; 230ffc2825cSGreg Kroah-Hartman } __packed; 231ffc2825cSGreg Kroah-Hartman 232ffc2825cSGreg Kroah-Hartman struct hbm_host_stop_response { 233ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 234ffc2825cSGreg Kroah-Hartman u8 reserved[3]; 235ffc2825cSGreg Kroah-Hartman } __packed; 236ffc2825cSGreg Kroah-Hartman 237ffc2825cSGreg Kroah-Hartman struct hbm_me_stop_request { 238ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 239ffc2825cSGreg Kroah-Hartman u8 reason; 240ffc2825cSGreg Kroah-Hartman u8 reserved[2]; 241ffc2825cSGreg Kroah-Hartman } __packed; 242ffc2825cSGreg Kroah-Hartman 24370ef835cSTomas Winkler /** 24470ef835cSTomas Winkler * struct hbm_host_enum_request - enumeration request from host to fw 24570ef835cSTomas Winkler * 24670ef835cSTomas Winkler * @hbm_cmd: bus message command header 24770ef835cSTomas Winkler * @allow_add: allow dynamic clients add HBM version >= 2.0 24870ef835cSTomas Winkler * @reserved: reserved 24970ef835cSTomas Winkler */ 250ffc2825cSGreg Kroah-Hartman struct hbm_host_enum_request { 251ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 25270ef835cSTomas Winkler u8 allow_add; 25370ef835cSTomas Winkler u8 reserved[2]; 254ffc2825cSGreg Kroah-Hartman } __packed; 255ffc2825cSGreg Kroah-Hartman 256ffc2825cSGreg Kroah-Hartman struct hbm_host_enum_response { 257ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 258ffc2825cSGreg Kroah-Hartman u8 reserved[3]; 259ffc2825cSGreg Kroah-Hartman u8 valid_addresses[32]; 260ffc2825cSGreg Kroah-Hartman } __packed; 261ffc2825cSGreg Kroah-Hartman 262ffc2825cSGreg Kroah-Hartman struct mei_client_properties { 263ffc2825cSGreg Kroah-Hartman uuid_le protocol_name; 264ffc2825cSGreg Kroah-Hartman u8 protocol_version; 265ffc2825cSGreg Kroah-Hartman u8 max_number_of_connections; 266ffc2825cSGreg Kroah-Hartman u8 fixed_address; 267ffc2825cSGreg Kroah-Hartman u8 single_recv_buf; 268ffc2825cSGreg Kroah-Hartman u32 max_msg_length; 269ffc2825cSGreg Kroah-Hartman } __packed; 270ffc2825cSGreg Kroah-Hartman 271ffc2825cSGreg Kroah-Hartman struct hbm_props_request { 272ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 2733438c1f3STomas Winkler u8 me_addr; 274ffc2825cSGreg Kroah-Hartman u8 reserved[2]; 275ffc2825cSGreg Kroah-Hartman } __packed; 276ffc2825cSGreg Kroah-Hartman 277ffc2825cSGreg Kroah-Hartman struct hbm_props_response { 278ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 2793438c1f3STomas Winkler u8 me_addr; 280ffc2825cSGreg Kroah-Hartman u8 status; 281ffc2825cSGreg Kroah-Hartman u8 reserved[1]; 282ffc2825cSGreg Kroah-Hartman struct mei_client_properties client_properties; 283ffc2825cSGreg Kroah-Hartman } __packed; 284ffc2825cSGreg Kroah-Hartman 285aeba4a06STomas Winkler /** 28670ef835cSTomas Winkler * struct hbm_add_client_request - request to add a client 28770ef835cSTomas Winkler * might be sent by fw after enumeration has already completed 28870ef835cSTomas Winkler * 28970ef835cSTomas Winkler * @hbm_cmd: bus message command header 29070ef835cSTomas Winkler * @me_addr: address of the client in ME 29170ef835cSTomas Winkler * @reserved: reserved 29270ef835cSTomas Winkler * @client_properties: client properties 29370ef835cSTomas Winkler */ 29470ef835cSTomas Winkler struct hbm_add_client_request { 29570ef835cSTomas Winkler u8 hbm_cmd; 29670ef835cSTomas Winkler u8 me_addr; 29770ef835cSTomas Winkler u8 reserved[2]; 29870ef835cSTomas Winkler struct mei_client_properties client_properties; 29970ef835cSTomas Winkler } __packed; 30070ef835cSTomas Winkler 30170ef835cSTomas Winkler /** 30270ef835cSTomas Winkler * struct hbm_add_client_response - response to add a client 30370ef835cSTomas Winkler * sent by the host to report client addition status to fw 30470ef835cSTomas Winkler * 30570ef835cSTomas Winkler * @hbm_cmd: bus message command header 30670ef835cSTomas Winkler * @me_addr: address of the client in ME 30770ef835cSTomas Winkler * @status: if HBMS_SUCCESS then the client can now accept connections. 30870ef835cSTomas Winkler * @reserved: reserved 30970ef835cSTomas Winkler */ 31070ef835cSTomas Winkler struct hbm_add_client_response { 31170ef835cSTomas Winkler u8 hbm_cmd; 31270ef835cSTomas Winkler u8 me_addr; 31370ef835cSTomas Winkler u8 status; 31470ef835cSTomas Winkler u8 reserved[1]; 31570ef835cSTomas Winkler } __packed; 31670ef835cSTomas Winkler 31770ef835cSTomas Winkler /** 3184fcbc99bSTomas Winkler * struct hbm_power_gate - power gate request/response 3194fcbc99bSTomas Winkler * 320a8605ea2SAlexander Usyskin * @hbm_cmd: bus message command header 321a8605ea2SAlexander Usyskin * @reserved: reserved 3224fcbc99bSTomas Winkler */ 3234fcbc99bSTomas Winkler struct hbm_power_gate { 3244fcbc99bSTomas Winkler u8 hbm_cmd; 3254fcbc99bSTomas Winkler u8 reserved[3]; 3264fcbc99bSTomas Winkler } __packed; 3274fcbc99bSTomas Winkler 3284fcbc99bSTomas Winkler /** 329aeba4a06STomas Winkler * struct hbm_client_connect_request - connect/disconnect request 330aeba4a06STomas Winkler * 331a8605ea2SAlexander Usyskin * @hbm_cmd: bus message command header 332a8605ea2SAlexander Usyskin * @me_addr: address of the client in ME 333a8605ea2SAlexander Usyskin * @host_addr: address of the client in the driver 334a8605ea2SAlexander Usyskin * @reserved: reserved 335aeba4a06STomas Winkler */ 336ffc2825cSGreg Kroah-Hartman struct hbm_client_connect_request { 337ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 338ffc2825cSGreg Kroah-Hartman u8 me_addr; 339ffc2825cSGreg Kroah-Hartman u8 host_addr; 340ffc2825cSGreg Kroah-Hartman u8 reserved; 341ffc2825cSGreg Kroah-Hartman } __packed; 342ffc2825cSGreg Kroah-Hartman 343aeba4a06STomas Winkler /** 344aeba4a06STomas Winkler * struct hbm_client_connect_response - connect/disconnect response 345aeba4a06STomas Winkler * 346a8605ea2SAlexander Usyskin * @hbm_cmd: bus message command header 347a8605ea2SAlexander Usyskin * @me_addr: address of the client in ME 348a8605ea2SAlexander Usyskin * @host_addr: address of the client in the driver 349a8605ea2SAlexander Usyskin * @status: status of the request 350aeba4a06STomas Winkler */ 351ffc2825cSGreg Kroah-Hartman struct hbm_client_connect_response { 352ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 353ffc2825cSGreg Kroah-Hartman u8 me_addr; 354ffc2825cSGreg Kroah-Hartman u8 host_addr; 355ffc2825cSGreg Kroah-Hartman u8 status; 356ffc2825cSGreg Kroah-Hartman } __packed; 357ffc2825cSGreg Kroah-Hartman 358ffc2825cSGreg Kroah-Hartman 359ffc2825cSGreg Kroah-Hartman #define MEI_FC_MESSAGE_RESERVED_LENGTH 5 360ffc2825cSGreg Kroah-Hartman 361ffc2825cSGreg Kroah-Hartman struct hbm_flow_control { 362ffc2825cSGreg Kroah-Hartman u8 hbm_cmd; 363ffc2825cSGreg Kroah-Hartman u8 me_addr; 364ffc2825cSGreg Kroah-Hartman u8 host_addr; 365ffc2825cSGreg Kroah-Hartman u8 reserved[MEI_FC_MESSAGE_RESERVED_LENGTH]; 366ffc2825cSGreg Kroah-Hartman } __packed; 367ffc2825cSGreg Kroah-Hartman 368d3c1c809STomas Winkler #define MEI_HBM_NOTIFICATION_START 1 369d3c1c809STomas Winkler #define MEI_HBM_NOTIFICATION_STOP 0 370d3c1c809STomas Winkler /** 371d3c1c809STomas Winkler * struct hbm_notification_request - start/stop notification request 372d3c1c809STomas Winkler * 373d3c1c809STomas Winkler * @hbm_cmd: bus message command header 374d3c1c809STomas Winkler * @me_addr: address of the client in ME 375d3c1c809STomas Winkler * @host_addr: address of the client in the driver 376d3c1c809STomas Winkler * @start: start = 1 or stop = 0 asynchronous notifications 377d3c1c809STomas Winkler */ 378d3c1c809STomas Winkler struct hbm_notification_request { 379d3c1c809STomas Winkler u8 hbm_cmd; 380d3c1c809STomas Winkler u8 me_addr; 381d3c1c809STomas Winkler u8 host_addr; 382d3c1c809STomas Winkler u8 start; 383d3c1c809STomas Winkler } __packed; 384d3c1c809STomas Winkler 385d3c1c809STomas Winkler /** 386d3c1c809STomas Winkler * struct hbm_notification_response - start/stop notification response 387d3c1c809STomas Winkler * 388d3c1c809STomas Winkler * @hbm_cmd: bus message command header 389d3c1c809STomas Winkler * @me_addr: address of the client in ME 390d3c1c809STomas Winkler * @host_addr: - address of the client in the driver 391d3c1c809STomas Winkler * @status: (mei_hbm_status) response status for the request 392d3c1c809STomas Winkler * - MEI_HBMS_SUCCESS: successful stop/start 393d3c1c809STomas Winkler * - MEI_HBMS_CLIENT_NOT_FOUND: if the connection could not be found. 394d3c1c809STomas Winkler * - MEI_HBMS_ALREADY_STARTED: for start requests for a previously 395d3c1c809STomas Winkler * started notification. 396d3c1c809STomas Winkler * - MEI_HBMS_NOT_STARTED: for stop request for a connected client for whom 397d3c1c809STomas Winkler * asynchronous notifications are currently disabled. 398d3c1c809STomas Winkler * 399d3c1c809STomas Winkler * @start: start = 1 or stop = 0 asynchronous notifications 400d3c1c809STomas Winkler * @reserved: reserved 401d3c1c809STomas Winkler */ 402d3c1c809STomas Winkler struct hbm_notification_response { 403d3c1c809STomas Winkler u8 hbm_cmd; 404d3c1c809STomas Winkler u8 me_addr; 405d3c1c809STomas Winkler u8 host_addr; 406d3c1c809STomas Winkler u8 status; 407d3c1c809STomas Winkler u8 start; 408d3c1c809STomas Winkler u8 reserved[3]; 409d3c1c809STomas Winkler } __packed; 410d3c1c809STomas Winkler 411d3c1c809STomas Winkler /** 412d3c1c809STomas Winkler * struct hbm_notification - notification event 413d3c1c809STomas Winkler * 414d3c1c809STomas Winkler * @hbm_cmd: bus message command header 415d3c1c809STomas Winkler * @me_addr: address of the client in ME 416d3c1c809STomas Winkler * @host_addr: address of the client in the driver 417d3c1c809STomas Winkler * @reserved: reserved for alignment 418d3c1c809STomas Winkler */ 419d3c1c809STomas Winkler struct hbm_notification { 420d3c1c809STomas Winkler u8 hbm_cmd; 421d3c1c809STomas Winkler u8 me_addr; 422d3c1c809STomas Winkler u8 host_addr; 423d3c1c809STomas Winkler u8 reserved[1]; 424d3c1c809STomas Winkler } __packed; 425ffc2825cSGreg Kroah-Hartman 426ffc2825cSGreg Kroah-Hartman #endif 427