1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47#ifndef _ICP_QAT_FW_INIT_ADMIN_H_
48#define _ICP_QAT_FW_INIT_ADMIN_H_
49
50#include "icp_qat_fw.h"
51
52enum icp_qat_fw_init_admin_cmd_id {
53 ICP_QAT_FW_INIT_ME = 0,
54 ICP_QAT_FW_TRNG_ENABLE = 1,
55 ICP_QAT_FW_TRNG_DISABLE = 2,
56 ICP_QAT_FW_CONSTANTS_CFG = 3,
57 ICP_QAT_FW_STATUS_GET = 4,
58 ICP_QAT_FW_COUNTERS_GET = 5,
59 ICP_QAT_FW_LOOPBACK = 6,
60 ICP_QAT_FW_HEARTBEAT_SYNC = 7,
61 ICP_QAT_FW_HEARTBEAT_GET = 8
62};
63
64enum icp_qat_fw_init_admin_resp_status {
65 ICP_QAT_FW_INIT_RESP_STATUS_SUCCESS = 0,
66 ICP_QAT_FW_INIT_RESP_STATUS_FAIL
67};
68
69struct icp_qat_fw_init_admin_req {
70 uint16_t init_cfg_sz;
71 uint8_t resrvd1;
72 uint8_t init_admin_cmd_id;
73 uint32_t resrvd2;
74 uint64_t opaque_data;
75 uint64_t init_cfg_ptr;
76 uint64_t resrvd3;
77};
78
79struct icp_qat_fw_init_admin_resp_hdr {
80 uint8_t flags;
81 uint8_t resrvd1;
82 uint8_t status;
83 uint8_t init_admin_cmd_id;
84};
85
86struct icp_qat_fw_init_admin_resp_pars {
87 union {
88 uint32_t resrvd1[ICP_QAT_FW_NUM_LONGWORDS_4];
89 struct {
90 uint32_t version_patch_num;
91 uint8_t context_id;
92 uint8_t ae_id;
93 uint16_t resrvd1;
94 uint64_t resrvd2;
95 } s1;
96 struct {
97 uint64_t req_rec_count;
98 uint64_t resp_sent_count;
99 } s2;
100 } u;
101};
102
103struct icp_qat_fw_init_admin_resp {
104 struct icp_qat_fw_init_admin_resp_hdr init_resp_hdr;
105 union {
106 uint32_t resrvd2;
107 struct {
108 uint16_t version_minor_num;
109 uint16_t version_major_num;
110 } s;
111 } u;
112 uint64_t opaque_data;
113 struct icp_qat_fw_init_admin_resp_pars init_resp_pars;
114};
115
116#define ICP_QAT_FW_COMN_HEARTBEAT_OK 0
117#define ICP_QAT_FW_COMN_HEARTBEAT_BLOCKED 1
118#define ICP_QAT_FW_COMN_HEARTBEAT_FLAG_BITPOS 0
119#define ICP_QAT_FW_COMN_HEARTBEAT_FLAG_MASK 0x1
120#define ICP_QAT_FW_COMN_STATUS_RESRVD_FLD_MASK 0xFE
121#define ICP_QAT_FW_COMN_HEARTBEAT_HDR_FLAG_GET(hdr_t) \
122 ICP_QAT_FW_COMN_HEARTBEAT_FLAG_GET(hdr_t.flags)
123
124#define ICP_QAT_FW_COMN_HEARTBEAT_HDR_FLAG_SET(hdr_t, val) \
125 ICP_QAT_FW_COMN_HEARTBEAT_FLAG_SET(hdr_t, val)
126
127#define ICP_QAT_FW_COMN_HEARTBEAT_FLAG_GET(flags) \
128 QAT_FIELD_GET(flags, \
129 ICP_QAT_FW_COMN_HEARTBEAT_FLAG_BITPOS, \
130 ICP_QAT_FW_COMN_HEARTBEAT_FLAG_MASK)
131#endif
132