cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

hw.h (18202B)


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