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