xref: /openbmc/linux/drivers/misc/mei/hw.h (revision 14386d47)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2003-2022, Intel Corporation. All rights reserved
4  * Intel Management Engine Interface (Intel MEI) Linux driver
5  */
6 
7 #ifndef _MEI_HW_TYPES_H_
8 #define _MEI_HW_TYPES_H_
9 
10 #include <linux/uuid.h>
11 
12 /*
13  * Timeouts in Seconds
14  */
15 #define MEI_HW_READY_TIMEOUT        2  /* Timeout on ready message */
16 #define MEI_CONNECT_TIMEOUT         3  /* HPS: at least 2 seconds */
17 
18 #define MEI_CL_CONNECT_TIMEOUT     15  /* HPS: Client Connect Timeout */
19 #define MEI_CL_CONNECT_TIMEOUT_SLOW 30 /* HPS: Client Connect Timeout, slow FW */
20 #define MEI_CLIENTS_INIT_TIMEOUT   15  /* HPS: Clients Enumeration Timeout */
21 
22 #define MEI_PGI_TIMEOUT             1  /* PG Isolation time response 1 sec */
23 #define MEI_D0I3_TIMEOUT            5  /* D0i3 set/unset max response time */
24 #define MEI_HBM_TIMEOUT             1  /* 1 second */
25 #define MEI_HBM_TIMEOUT_SLOW        5  /* 5 second, slow FW */
26 
27 #define MKHI_RCV_TIMEOUT 500 /* receive timeout in msec */
28 #define MKHI_RCV_TIMEOUT_SLOW 10000 /* receive timeout in msec, slow FW */
29 
30 /*
31  * FW page size for DMA allocations
32  */
33 #define MEI_FW_PAGE_SIZE 4096UL
34 
35 /*
36  * MEI Version
37  */
38 #define HBM_MINOR_VERSION                   2
39 #define HBM_MAJOR_VERSION                   2
40 
41 /*
42  * MEI version with PGI support
43  */
44 #define HBM_MINOR_VERSION_PGI               1
45 #define HBM_MAJOR_VERSION_PGI               1
46 
47 /*
48  * MEI version with Dynamic clients support
49  */
50 #define HBM_MINOR_VERSION_DC               0
51 #define HBM_MAJOR_VERSION_DC               2
52 
53 /*
54  * MEI version with immediate reply to enum request support
55  */
56 #define HBM_MINOR_VERSION_IE               0
57 #define HBM_MAJOR_VERSION_IE               2
58 
59 /*
60  * MEI version with disconnect on connection timeout support
61  */
62 #define HBM_MINOR_VERSION_DOT              0
63 #define HBM_MAJOR_VERSION_DOT              2
64 
65 /*
66  * MEI version with notification support
67  */
68 #define HBM_MINOR_VERSION_EV               0
69 #define HBM_MAJOR_VERSION_EV               2
70 
71 /*
72  * MEI version with fixed address client support
73  */
74 #define HBM_MINOR_VERSION_FA               0
75 #define HBM_MAJOR_VERSION_FA               2
76 
77 /*
78  * MEI version with OS ver message support
79  */
80 #define HBM_MINOR_VERSION_OS               0
81 #define HBM_MAJOR_VERSION_OS               2
82 
83 /*
84  * MEI version with dma ring support
85  */
86 #define HBM_MINOR_VERSION_DR               1
87 #define HBM_MAJOR_VERSION_DR               2
88 
89 /*
90  * MEI version with vm tag support
91  */
92 #define HBM_MINOR_VERSION_VT               2
93 #define HBM_MAJOR_VERSION_VT               2
94 
95 /*
96  * MEI version with capabilities message support
97  */
98 #define HBM_MINOR_VERSION_CAP              2
99 #define HBM_MAJOR_VERSION_CAP              2
100 
101 /*
102  * MEI version with client DMA support
103  */
104 #define HBM_MINOR_VERSION_CD               2
105 #define HBM_MAJOR_VERSION_CD               2
106 
107 /* Host bus message command opcode */
108 #define MEI_HBM_CMD_OP_MSK                  0x7f
109 /* Host bus message command RESPONSE */
110 #define MEI_HBM_CMD_RES_MSK                 0x80
111 
112 /*
113  * MEI Bus Message Command IDs
114  */
115 #define HOST_START_REQ_CMD                  0x01
116 #define HOST_START_RES_CMD                  0x81
117 
118 #define HOST_STOP_REQ_CMD                   0x02
119 #define HOST_STOP_RES_CMD                   0x82
120 
121 #define ME_STOP_REQ_CMD                     0x03
122 
123 #define HOST_ENUM_REQ_CMD                   0x04
124 #define HOST_ENUM_RES_CMD                   0x84
125 
126 #define HOST_CLIENT_PROPERTIES_REQ_CMD      0x05
127 #define HOST_CLIENT_PROPERTIES_RES_CMD      0x85
128 
129 #define CLIENT_CONNECT_REQ_CMD              0x06
130 #define CLIENT_CONNECT_RES_CMD              0x86
131 
132 #define CLIENT_DISCONNECT_REQ_CMD           0x07
133 #define CLIENT_DISCONNECT_RES_CMD           0x87
134 
135 #define MEI_FLOW_CONTROL_CMD                0x08
136 
137 #define MEI_PG_ISOLATION_ENTRY_REQ_CMD      0x0a
138 #define MEI_PG_ISOLATION_ENTRY_RES_CMD      0x8a
139 #define MEI_PG_ISOLATION_EXIT_REQ_CMD       0x0b
140 #define MEI_PG_ISOLATION_EXIT_RES_CMD       0x8b
141 
142 #define MEI_HBM_ADD_CLIENT_REQ_CMD          0x0f
143 #define MEI_HBM_ADD_CLIENT_RES_CMD          0x8f
144 
145 #define MEI_HBM_NOTIFY_REQ_CMD              0x10
146 #define MEI_HBM_NOTIFY_RES_CMD              0x90
147 #define MEI_HBM_NOTIFICATION_CMD            0x11
148 
149 #define MEI_HBM_DMA_SETUP_REQ_CMD           0x12
150 #define MEI_HBM_DMA_SETUP_RES_CMD           0x92
151 
152 #define MEI_HBM_CAPABILITIES_REQ_CMD        0x13
153 #define MEI_HBM_CAPABILITIES_RES_CMD        0x93
154 
155 #define MEI_HBM_CLIENT_DMA_MAP_REQ_CMD      0x14
156 #define MEI_HBM_CLIENT_DMA_MAP_RES_CMD      0x94
157 
158 #define MEI_HBM_CLIENT_DMA_UNMAP_REQ_CMD    0x15
159 #define MEI_HBM_CLIENT_DMA_UNMAP_RES_CMD    0x95
160 
161 /*
162  * MEI Stop Reason
163  * used by hbm_host_stop_request.reason
164  */
165 enum mei_stop_reason_types {
166 	DRIVER_STOP_REQUEST = 0x00,
167 	DEVICE_D1_ENTRY = 0x01,
168 	DEVICE_D2_ENTRY = 0x02,
169 	DEVICE_D3_ENTRY = 0x03,
170 	SYSTEM_S1_ENTRY = 0x04,
171 	SYSTEM_S2_ENTRY = 0x05,
172 	SYSTEM_S3_ENTRY = 0x06,
173 	SYSTEM_S4_ENTRY = 0x07,
174 	SYSTEM_S5_ENTRY = 0x08
175 };
176 
177 
178 /**
179  * enum mei_hbm_status  - mei host bus messages return values
180  *
181  * @MEI_HBMS_SUCCESS           : status success
182  * @MEI_HBMS_CLIENT_NOT_FOUND  : client not found
183  * @MEI_HBMS_ALREADY_EXISTS    : connection already established
184  * @MEI_HBMS_REJECTED          : connection is rejected
185  * @MEI_HBMS_INVALID_PARAMETER : invalid parameter
186  * @MEI_HBMS_NOT_ALLOWED       : operation not allowed
187  * @MEI_HBMS_ALREADY_STARTED   : system is already started
188  * @MEI_HBMS_NOT_STARTED       : system not started
189  *
190  * @MEI_HBMS_MAX               : sentinel
191  */
192 enum mei_hbm_status {
193 	MEI_HBMS_SUCCESS           = 0,
194 	MEI_HBMS_CLIENT_NOT_FOUND  = 1,
195 	MEI_HBMS_ALREADY_EXISTS    = 2,
196 	MEI_HBMS_REJECTED          = 3,
197 	MEI_HBMS_INVALID_PARAMETER = 4,
198 	MEI_HBMS_NOT_ALLOWED       = 5,
199 	MEI_HBMS_ALREADY_STARTED   = 6,
200 	MEI_HBMS_NOT_STARTED       = 7,
201 
202 	MEI_HBMS_MAX
203 };
204 
205 
206 /*
207  * Client Connect Status
208  * used by hbm_client_connect_response.status
209  */
210 enum mei_cl_connect_status {
211 	MEI_CL_CONN_SUCCESS          = MEI_HBMS_SUCCESS,
212 	MEI_CL_CONN_NOT_FOUND        = MEI_HBMS_CLIENT_NOT_FOUND,
213 	MEI_CL_CONN_ALREADY_STARTED  = MEI_HBMS_ALREADY_EXISTS,
214 	MEI_CL_CONN_OUT_OF_RESOURCES = MEI_HBMS_REJECTED,
215 	MEI_CL_CONN_MESSAGE_SMALL    = MEI_HBMS_INVALID_PARAMETER,
216 	MEI_CL_CONN_NOT_ALLOWED      = MEI_HBMS_NOT_ALLOWED,
217 };
218 
219 /*
220  * Client Disconnect Status
221  */
222 enum mei_cl_disconnect_status {
223 	MEI_CL_DISCONN_SUCCESS = MEI_HBMS_SUCCESS
224 };
225 
226 /**
227  * enum mei_ext_hdr_type - extended header type used in
228  *    extended header TLV
229  *
230  * @MEI_EXT_HDR_NONE: sentinel
231  * @MEI_EXT_HDR_VTAG: vtag header
232  */
233 enum mei_ext_hdr_type {
234 	MEI_EXT_HDR_NONE = 0,
235 	MEI_EXT_HDR_VTAG = 1,
236 };
237 
238 /**
239  * struct mei_ext_hdr - extend header descriptor (TLV)
240  * @type: enum mei_ext_hdr_type
241  * @length: length excluding descriptor
242  * @ext_payload: payload of the specific extended header
243  * @hdr: place holder for actual header
244  */
245 struct mei_ext_hdr {
246 	u8 type;
247 	u8 length;
248 	u8 data[];
249 } __packed;
250 
251 /**
252  * struct mei_ext_meta_hdr - extend header meta data
253  * @count: number of headers
254  * @size: total size of the extended header list excluding meta header
255  * @reserved: reserved
256  * @hdrs: extended headers TLV list
257  */
258 struct mei_ext_meta_hdr {
259 	u8 count;
260 	u8 size;
261 	u8 reserved[2];
262 	u8 hdrs[];
263 } __packed;
264 
265 /**
266  * struct mei_ext_hdr_vtag - extend header for vtag
267  *
268  * @hdr: standard extend header
269  * @vtag: virtual tag
270  * @reserved: reserved
271  */
272 struct mei_ext_hdr_vtag {
273 	struct mei_ext_hdr hdr;
274 	u8 vtag;
275 	u8 reserved;
276 } __packed;
277 
278 /*
279  * Extended header iterator functions
280  */
281 /**
282  * mei_ext_hdr - extended header iterator begin
283  *
284  * @meta: meta header of the extended header list
285  *
286  * Return:
287  *     The first extended header
288  */
289 static inline struct mei_ext_hdr *mei_ext_begin(struct mei_ext_meta_hdr *meta)
290 {
291 	return (struct mei_ext_hdr *)meta->hdrs;
292 }
293 
294 /**
295  * mei_ext_last - check if the ext is the last one in the TLV list
296  *
297  * @meta: meta header of the extended header list
298  * @ext: a meta header on the list
299  *
300  * Return: true if ext is the last header on the list
301  */
302 static inline bool mei_ext_last(struct mei_ext_meta_hdr *meta,
303 				struct mei_ext_hdr *ext)
304 {
305 	return (u8 *)ext >= (u8 *)meta + sizeof(*meta) + (meta->size * 4);
306 }
307 
308 /**
309  * mei_ext_next - following extended header on the TLV list
310  *
311  * @ext: current extend header
312  *
313  * Context: The function does not check for the overflows,
314  *          one should call mei_ext_last before.
315  *
316  * Return: The following extend header after @ext
317  */
318 static inline struct mei_ext_hdr *mei_ext_next(struct mei_ext_hdr *ext)
319 {
320 	return (struct mei_ext_hdr *)((u8 *)ext + (ext->length * 4));
321 }
322 
323 /**
324  * struct mei_msg_hdr - MEI BUS Interface Section
325  *
326  * @me_addr: device address
327  * @host_addr: host address
328  * @length: message length
329  * @reserved: reserved
330  * @extended: message has extended header
331  * @dma_ring: message is on dma ring
332  * @internal: message is internal
333  * @msg_complete: last packet of the message
334  * @extension: extension of the header
335  */
336 struct mei_msg_hdr {
337 	u32 me_addr:8;
338 	u32 host_addr:8;
339 	u32 length:9;
340 	u32 reserved:3;
341 	u32 extended:1;
342 	u32 dma_ring:1;
343 	u32 internal:1;
344 	u32 msg_complete:1;
345 	u32 extension[];
346 } __packed;
347 
348 /* The length is up to 9 bits */
349 #define MEI_MSG_MAX_LEN_MASK GENMASK(9, 0)
350 
351 struct mei_bus_message {
352 	u8 hbm_cmd;
353 	u8 data[];
354 } __packed;
355 
356 /**
357  * struct hbm_cl_cmd - client specific host bus command
358  *	CONNECT, DISCONNECT, and FlOW CONTROL
359  *
360  * @hbm_cmd: bus message command header
361  * @me_addr: address of the client in ME
362  * @host_addr: address of the client in the driver
363  * @data: generic data
364  */
365 struct mei_hbm_cl_cmd {
366 	u8 hbm_cmd;
367 	u8 me_addr;
368 	u8 host_addr;
369 	u8 data;
370 };
371 
372 struct hbm_version {
373 	u8 minor_version;
374 	u8 major_version;
375 } __packed;
376 
377 struct hbm_host_version_request {
378 	u8 hbm_cmd;
379 	u8 reserved;
380 	struct hbm_version host_version;
381 } __packed;
382 
383 struct hbm_host_version_response {
384 	u8 hbm_cmd;
385 	u8 host_version_supported;
386 	struct hbm_version me_max_version;
387 } __packed;
388 
389 struct hbm_host_stop_request {
390 	u8 hbm_cmd;
391 	u8 reason;
392 	u8 reserved[2];
393 } __packed;
394 
395 struct hbm_host_stop_response {
396 	u8 hbm_cmd;
397 	u8 reserved[3];
398 } __packed;
399 
400 struct hbm_me_stop_request {
401 	u8 hbm_cmd;
402 	u8 reason;
403 	u8 reserved[2];
404 } __packed;
405 
406 /**
407  * enum hbm_host_enum_flags - enumeration request flags (HBM version >= 2.0)
408  *
409  * @MEI_HBM_ENUM_F_ALLOW_ADD: allow dynamic clients add
410  * @MEI_HBM_ENUM_F_IMMEDIATE_ENUM: allow FW to send answer immediately
411  */
412 enum hbm_host_enum_flags {
413 	MEI_HBM_ENUM_F_ALLOW_ADD = BIT(0),
414 	MEI_HBM_ENUM_F_IMMEDIATE_ENUM = BIT(1),
415 };
416 
417 /**
418  * struct hbm_host_enum_request - enumeration request from host to fw
419  *
420  * @hbm_cmd : bus message command header
421  * @flags   : request flags
422  * @reserved: reserved
423  */
424 struct hbm_host_enum_request {
425 	u8 hbm_cmd;
426 	u8 flags;
427 	u8 reserved[2];
428 } __packed;
429 
430 struct hbm_host_enum_response {
431 	u8 hbm_cmd;
432 	u8 reserved[3];
433 	u8 valid_addresses[32];
434 } __packed;
435 
436 /**
437  * struct mei_client_properties - mei client properties
438  *
439  * @protocol_name: guid of the client
440  * @protocol_version: client protocol version
441  * @max_number_of_connections: number of possible connections.
442  * @fixed_address: fixed me address (0 if the client is dynamic)
443  * @single_recv_buf: 1 if all connections share a single receive buffer.
444  * @vt_supported: the client support vtag
445  * @reserved: reserved
446  * @max_msg_length: MTU of the client
447  */
448 struct mei_client_properties {
449 	uuid_le protocol_name;
450 	u8 protocol_version;
451 	u8 max_number_of_connections;
452 	u8 fixed_address;
453 	u8 single_recv_buf:1;
454 	u8 vt_supported:1;
455 	u8 reserved:6;
456 	u32 max_msg_length;
457 } __packed;
458 
459 struct hbm_props_request {
460 	u8 hbm_cmd;
461 	u8 me_addr;
462 	u8 reserved[2];
463 } __packed;
464 
465 struct hbm_props_response {
466 	u8 hbm_cmd;
467 	u8 me_addr;
468 	u8 status;
469 	u8 reserved;
470 	struct mei_client_properties client_properties;
471 } __packed;
472 
473 /**
474  * struct hbm_add_client_request - request to add a client
475  *     might be sent by fw after enumeration has already completed
476  *
477  * @hbm_cmd: bus message command header
478  * @me_addr: address of the client in ME
479  * @reserved: reserved
480  * @client_properties: client properties
481  */
482 struct hbm_add_client_request {
483 	u8 hbm_cmd;
484 	u8 me_addr;
485 	u8 reserved[2];
486 	struct mei_client_properties client_properties;
487 } __packed;
488 
489 /**
490  * struct hbm_add_client_response - response to add a client
491  *     sent by the host to report client addition status to fw
492  *
493  * @hbm_cmd: bus message command header
494  * @me_addr: address of the client in ME
495  * @status: if HBMS_SUCCESS then the client can now accept connections.
496  * @reserved: reserved
497  */
498 struct hbm_add_client_response {
499 	u8 hbm_cmd;
500 	u8 me_addr;
501 	u8 status;
502 	u8 reserved;
503 } __packed;
504 
505 /**
506  * struct hbm_power_gate - power gate request/response
507  *
508  * @hbm_cmd: bus message command header
509  * @reserved: reserved
510  */
511 struct hbm_power_gate {
512 	u8 hbm_cmd;
513 	u8 reserved[3];
514 } __packed;
515 
516 /**
517  * struct hbm_client_connect_request - connect/disconnect request
518  *
519  * @hbm_cmd: bus message command header
520  * @me_addr: address of the client in ME
521  * @host_addr: address of the client in the driver
522  * @reserved: reserved
523  */
524 struct hbm_client_connect_request {
525 	u8 hbm_cmd;
526 	u8 me_addr;
527 	u8 host_addr;
528 	u8 reserved;
529 } __packed;
530 
531 /**
532  * struct hbm_client_connect_response - connect/disconnect response
533  *
534  * @hbm_cmd: bus message command header
535  * @me_addr: address of the client in ME
536  * @host_addr: address of the client in the driver
537  * @status: status of the request
538  */
539 struct hbm_client_connect_response {
540 	u8 hbm_cmd;
541 	u8 me_addr;
542 	u8 host_addr;
543 	u8 status;
544 } __packed;
545 
546 
547 #define MEI_FC_MESSAGE_RESERVED_LENGTH           5
548 
549 struct hbm_flow_control {
550 	u8 hbm_cmd;
551 	u8 me_addr;
552 	u8 host_addr;
553 	u8 reserved[MEI_FC_MESSAGE_RESERVED_LENGTH];
554 } __packed;
555 
556 #define MEI_HBM_NOTIFICATION_START 1
557 #define MEI_HBM_NOTIFICATION_STOP  0
558 /**
559  * struct hbm_notification_request - start/stop notification request
560  *
561  * @hbm_cmd: bus message command header
562  * @me_addr: address of the client in ME
563  * @host_addr: address of the client in the driver
564  * @start:  start = 1 or stop = 0 asynchronous notifications
565  */
566 struct hbm_notification_request {
567 	u8 hbm_cmd;
568 	u8 me_addr;
569 	u8 host_addr;
570 	u8 start;
571 } __packed;
572 
573 /**
574  * struct hbm_notification_response - start/stop notification response
575  *
576  * @hbm_cmd: bus message command header
577  * @me_addr: address of the client in ME
578  * @host_addr: - address of the client in the driver
579  * @status: (mei_hbm_status) response status for the request
580  *  - MEI_HBMS_SUCCESS: successful stop/start
581  *  - MEI_HBMS_CLIENT_NOT_FOUND: if the connection could not be found.
582  *  - MEI_HBMS_ALREADY_STARTED: for start requests for a previously
583  *                         started notification.
584  *  - MEI_HBMS_NOT_STARTED: for stop request for a connected client for whom
585  *                         asynchronous notifications are currently disabled.
586  *
587  * @start:  start = 1 or stop = 0 asynchronous notifications
588  * @reserved: reserved
589  */
590 struct hbm_notification_response {
591 	u8 hbm_cmd;
592 	u8 me_addr;
593 	u8 host_addr;
594 	u8 status;
595 	u8 start;
596 	u8 reserved[3];
597 } __packed;
598 
599 /**
600  * struct hbm_notification - notification event
601  *
602  * @hbm_cmd: bus message command header
603  * @me_addr:  address of the client in ME
604  * @host_addr:  address of the client in the driver
605  * @reserved: reserved for alignment
606  */
607 struct hbm_notification {
608 	u8 hbm_cmd;
609 	u8 me_addr;
610 	u8 host_addr;
611 	u8 reserved;
612 } __packed;
613 
614 /**
615  * struct hbm_dma_mem_dscr - dma ring
616  *
617  * @addr_hi: the high 32bits of 64 bit address
618  * @addr_lo: the low  32bits of 64 bit address
619  * @size   : size in bytes (must be power of 2)
620  */
621 struct hbm_dma_mem_dscr {
622 	u32 addr_hi;
623 	u32 addr_lo;
624 	u32 size;
625 } __packed;
626 
627 enum {
628 	DMA_DSCR_HOST = 0,
629 	DMA_DSCR_DEVICE = 1,
630 	DMA_DSCR_CTRL = 2,
631 	DMA_DSCR_NUM,
632 };
633 
634 /**
635  * struct hbm_dma_setup_request - dma setup request
636  *
637  * @hbm_cmd: bus message command header
638  * @reserved: reserved for alignment
639  * @dma_dscr: dma descriptor for HOST, DEVICE, and CTRL
640  */
641 struct hbm_dma_setup_request {
642 	u8 hbm_cmd;
643 	u8 reserved[3];
644 	struct hbm_dma_mem_dscr dma_dscr[DMA_DSCR_NUM];
645 } __packed;
646 
647 /**
648  * struct hbm_dma_setup_response - dma setup response
649  *
650  * @hbm_cmd: bus message command header
651  * @status: 0 on success; otherwise DMA setup failed.
652  * @reserved: reserved for alignment
653  */
654 struct hbm_dma_setup_response {
655 	u8 hbm_cmd;
656 	u8 status;
657 	u8 reserved[2];
658 } __packed;
659 
660 /**
661  * struct mei_dma_ring_ctrl - dma ring control block
662  *
663  * @hbuf_wr_idx: host circular buffer write index in slots
664  * @reserved1: reserved for alignment
665  * @hbuf_rd_idx: host circular buffer read index in slots
666  * @reserved2: reserved for alignment
667  * @dbuf_wr_idx: device circular buffer write index in slots
668  * @reserved3: reserved for alignment
669  * @dbuf_rd_idx: device circular buffer read index in slots
670  * @reserved4: reserved for alignment
671  */
672 struct hbm_dma_ring_ctrl {
673 	u32 hbuf_wr_idx;
674 	u32 reserved1;
675 	u32 hbuf_rd_idx;
676 	u32 reserved2;
677 	u32 dbuf_wr_idx;
678 	u32 reserved3;
679 	u32 dbuf_rd_idx;
680 	u32 reserved4;
681 } __packed;
682 
683 /* virtual tag supported */
684 #define HBM_CAP_VT BIT(0)
685 /* client dma supported */
686 #define HBM_CAP_CD BIT(2)
687 
688 /**
689  * struct hbm_capability_request - capability request from host to fw
690  *
691  * @hbm_cmd : bus message command header
692  * @capability_requested: bitmask of capabilities requested by host
693  */
694 struct hbm_capability_request {
695 	u8 hbm_cmd;
696 	u8 capability_requested[3];
697 } __packed;
698 
699 /**
700  * struct hbm_capability_response - capability response from fw to host
701  *
702  * @hbm_cmd : bus message command header
703  * @capability_granted: bitmask of capabilities granted by FW
704  */
705 struct hbm_capability_response {
706 	u8 hbm_cmd;
707 	u8 capability_granted[3];
708 } __packed;
709 
710 /**
711  * struct hbm_client_dma_map_request - client dma map request from host to fw
712  *
713  * @hbm_cmd: bus message command header
714  * @client_buffer_id: client buffer id
715  * @reserved: reserved
716  * @address_lsb: DMA address LSB
717  * @address_msb: DMA address MSB
718  * @size: DMA size
719  */
720 struct hbm_client_dma_map_request {
721 	u8 hbm_cmd;
722 	u8 client_buffer_id;
723 	u8 reserved[2];
724 	u32 address_lsb;
725 	u32 address_msb;
726 	u32 size;
727 } __packed;
728 
729 /**
730  * struct hbm_client_dma_unmap_request
731  *    client dma unmap request from the host to the firmware
732  *
733  * @hbm_cmd: bus message command header
734  * @status: unmap status
735  * @client_buffer_id: client buffer id
736  * @reserved: reserved
737  */
738 struct hbm_client_dma_unmap_request {
739 	u8 hbm_cmd;
740 	u8 status;
741 	u8 client_buffer_id;
742 	u8 reserved;
743 } __packed;
744 
745 /**
746  * struct hbm_client_dma_response
747  *   client dma unmap response from the firmware to the host
748  *
749  * @hbm_cmd: bus message command header
750  * @status: command status
751  */
752 struct hbm_client_dma_response {
753 	u8 hbm_cmd;
754 	u8 status;
755 } __packed;
756 
757 #endif
758