Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/qat/qat_api/firmware/include/icp_qat_fw.h
Show First 20 Lines • Show All 480 Lines • ▼ Show 20 Lines | |||||
} icp_qat_fw_comn_resp_t; | } icp_qat_fw_comn_resp_t; | ||||
/* ========================================================================= */ | /* ========================================================================= */ | ||||
/* MACRO DEFINITIONS */ | /* MACRO DEFINITIONS */ | ||||
/* ========================================================================= */ | /* ========================================================================= */ | ||||
/* Common QAT FW request header - structure of LW0 | /* Common QAT FW request header - structure of LW0 | ||||
* + ===== + ---- + ----------- + ----------- + ----------- + ----------- + | * + ===== + ------- + ----------- + ----------- + ----------- + -------- + | ||||
* | Bit | 31 | 30 - 24 | 21 - 16 | 15 - 8 | 7 - 0 | | * | Bit | 31/30 | 29 - 24 | 21 - 16 | 15 - 8 | 7 - 0 | | ||||
* + ===== + ---- + ----------- + ----------- + ----------- + ----------- + | * + ===== + ------- + ----------- + ----------- + ----------- + -------- + | ||||
* | Flags | V | Reserved | Serv Type | Serv Cmd Id | Reserved | | * | Flags | V/Gen | Reserved | Serv Type | Serv Cmd Id | Rsv | | ||||
* + ===== + ---- + ----------- + ----------- + ----------- + ----------- + | * + ===== + ------- + ----------- + ----------- + ----------- + -------- + | ||||
*/ | */ | ||||
/**< @ingroup icp_qat_fw_comn | /**< @ingroup icp_qat_fw_comn | ||||
* Definition of the setting of the header's valid flag */ | * Definition of the setting of the header's valid flag */ | ||||
#define ICP_QAT_FW_COMN_REQ_FLAG_SET 1 | #define ICP_QAT_FW_COMN_REQ_FLAG_SET 1 | ||||
/**< @ingroup icp_qat_fw_comn | /**< @ingroup icp_qat_fw_comn | ||||
* Definition of the setting of the header's valid flag */ | * Definition of the setting of the header's valid flag */ | ||||
#define ICP_QAT_FW_COMN_REQ_FLAG_CLR 0 | #define ICP_QAT_FW_COMN_REQ_FLAG_CLR 0 | ||||
/**< @ingroup icp_qat_fw_comn | /**< @ingroup icp_qat_fw_comn | ||||
* Macros defining the bit position and mask of the 'valid' flag, within the | * Macros defining the bit position and mask of the 'valid' flag, within the | ||||
* hdr_flags field of LW0 (service request and response) */ | * hdr_flags field of LW0 (service request and response) */ | ||||
#define ICP_QAT_FW_COMN_VALID_FLAG_BITPOS 7 | #define ICP_QAT_FW_COMN_VALID_FLAG_BITPOS 7 | ||||
#define ICP_QAT_FW_COMN_VALID_FLAG_MASK 0x1 | #define ICP_QAT_FW_COMN_VALID_FLAG_MASK 0x1 | ||||
/**< @ingroup icp_qat_fw_comn | |||||
* Macros defining the bit position and mask of the 'generation' flag, within | |||||
* the hdr_flags field of LW0 (service request and response) */ | |||||
#define ICP_QAT_FW_COMN_GEN_FLAG_BITPOS 6 | |||||
#define ICP_QAT_FW_COMN_GEN_FLAG_MASK 0x1 | |||||
/**< @ingroup icp_qat_fw_comn | |||||
* The request is targeted for QAT2.0 */ | |||||
#define ICP_QAT_FW_COMN_GEN_2 1 | |||||
/**< @ingroup icp_qat_fw_comn | |||||
* The request is targeted for QAT1.x. QAT2.0 FW will return | |||||
'unsupported request' if GEN1 request type is sent to QAT2.0 FW */ | |||||
#define ICP_QAT_FW_COMN_GEN_1 0 | |||||
#define ICP_QAT_FW_COMN_HDR_RESRVD_FLD_MASK 0x7F | #define ICP_QAT_FW_COMN_HDR_RESRVD_FLD_MASK 0x7F | ||||
/* Common QAT FW response header - structure of LW0 | /* Common QAT FW response header - structure of LW0 | ||||
* + ===== + --- + --- + ----- + ----- + --------- + ----------- + ----- + | * + ===== + --- + --- + ----- + ----- + --------- + ----------- + ----- + | ||||
* | Bit | 31 | 30 | 29 | 28-24 | 21 - 16 | 15 - 8 | 7-0 | | * | Bit | 31 | 30 | 29 | 28-24 | 21 - 16 | 15 - 8 | 7-0 | | ||||
* + ===== + --- + ----+ ----- + ----- + --------- + ----------- + ----- + | * + ===== + --- + ----+ ----- + ----- + --------- + ----------- + ----- + | ||||
* | Flags | V | CNV | CNVNR | Rsvd | Serv Type | Serv Cmd Id | Rsvd | | * | Flags | V | CNV | CNVNR | Rsvd | Serv Type | Serv Cmd Id | Rsvd | | ||||
* + ===== + --- + --- + ----- + ----- + --------- + ----------- + ----- + */ | * + ===== + --- + --- + ----- + ----- + --------- + ----------- + ----- + */ | ||||
/**< @ingroup icp_qat_fw_comn | /**< @ingroup icp_qat_fw_comn | ||||
* Macros defining the bit position and mask of 'CNV' flag | * Macros defining the bit position and mask of 'CNV' flag | ||||
* within the hdr_flags field of LW0 (service response only) */ | * within the hdr_flags field of LW0 (service response only) */ | ||||
#define ICP_QAT_FW_COMN_CNV_FLAG_BITPOS 6 | #define ICP_QAT_FW_COMN_CNV_FLAG_BITPOS 6 | ||||
#define ICP_QAT_FW_COMN_CNV_FLAG_MASK 0x1 | #define ICP_QAT_FW_COMN_CNV_FLAG_MASK 0x1 | ||||
/**< @ingroup icp_qat_fw_comn | /**< @ingroup icp_qat_fw_comn | ||||
* Macros defining the bit position and mask of CNVNR flag | * Macros defining the bit position and mask of CNVNR flag | ||||
* within the hdr_flags field of LW0 (service response only) */ | * within the hdr_flags field of LW0 (service response only) */ | ||||
#define ICP_QAT_FW_COMN_CNVNR_FLAG_BITPOS 5 | #define ICP_QAT_FW_COMN_CNVNR_FLAG_BITPOS 5 | ||||
#define ICP_QAT_FW_COMN_CNVNR_FLAG_MASK 0x1 | #define ICP_QAT_FW_COMN_CNVNR_FLAG_MASK 0x1 | ||||
/**< @ingroup icp_qat_fw_comn | |||||
* Macros defining the bit position and mask of Stored Blocks flag | |||||
* within the hdr_flags field of LW0 (service response only) | |||||
*/ | |||||
#define ICP_QAT_FW_COMN_ST_BLK_FLAG_BITPOS 4 | |||||
#define ICP_QAT_FW_COMN_ST_BLK_FLAG_MASK 0x1 | |||||
/** | /** | ||||
****************************************************************************** | ****************************************************************************** | ||||
* @ingroup icp_qat_fw_comn | * @ingroup icp_qat_fw_comn | ||||
* | * | ||||
* @description | * @description | ||||
* Macro for extraction of Service Type Field | * Macro for extraction of Service Type Field | ||||
* | * | ||||
* @param icp_qat_fw_comn_req_hdr_t Structure 'icp_qat_fw_comn_req_hdr_t' | * @param icp_qat_fw_comn_req_hdr_t Structure 'icp_qat_fw_comn_req_hdr_t' | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
* valid bit from the 'hdr_flags' field. | * valid bit from the 'hdr_flags' field. | ||||
* | * | ||||
*****************************************************************************/ | *****************************************************************************/ | ||||
#define ICP_QAT_FW_COMN_VALID_FLAG_GET(hdr_flags) \ | #define ICP_QAT_FW_COMN_VALID_FLAG_GET(hdr_flags) \ | ||||
QAT_FIELD_GET(hdr_flags, \ | QAT_FIELD_GET(hdr_flags, \ | ||||
ICP_QAT_FW_COMN_VALID_FLAG_BITPOS, \ | ICP_QAT_FW_COMN_VALID_FLAG_BITPOS, \ | ||||
ICP_QAT_FW_COMN_VALID_FLAG_MASK) | ICP_QAT_FW_COMN_VALID_FLAG_MASK) | ||||
/** | |||||
****************************************************************************** | |||||
* @ingroup icp_qat_fw_comn | |||||
* | |||||
* @description | |||||
* Extract the Stored Block flag from the header flags in the | |||||
* response only. | |||||
* | |||||
* @param hdr_flags Response 'hdr' structure to extract the | |||||
* Stored Block bit from the 'hdr_flags' field. | |||||
* | |||||
*****************************************************************************/ | |||||
#define ICP_QAT_FW_COMN_HDR_ST_BLK_FLAG_GET(hdr_flags) \ | |||||
QAT_FIELD_GET(hdr_flags, \ | |||||
ICP_QAT_FW_COMN_ST_BLK_FLAG_BITPOS, \ | |||||
ICP_QAT_FW_COMN_ST_BLK_FLAG_MASK) | |||||
/** | |||||
****************************************************************************** | |||||
* @ingroup icp_qat_fw_comn | |||||
* | |||||
* @description | |||||
* Set the Stored Block bit in the response's header flags. | |||||
* | |||||
* @param hdr_t Response 'hdr_t' structure to set the ST_BLK bit | |||||
* @param val Value of the ST_BLK bit flag. | |||||
* | |||||
*****************************************************************************/ | |||||
#define ICP_QAT_FW_COMN_HDR_ST_BLK_FLAG_SET(hdr_t, val) \ | |||||
QAT_FIELD_SET((hdr_t.hdr_flags), \ | |||||
(val), \ | |||||
ICP_QAT_FW_COMN_ST_BLK_FLAG_BITPOS, \ | |||||
ICP_QAT_FW_COMN_ST_BLK_FLAG_MASK) | |||||
/** | |||||
****************************************************************************** | |||||
* @ingroup icp_qat_fw_comn | |||||
* | |||||
* @description | |||||
* Set the generation bit in the request's header flags. | |||||
* | |||||
* @param hdr_t Request or Response 'hdr_t' structure to set the gen bit | |||||
* @param val Value of the generation bit flag. | |||||
* | |||||
*****************************************************************************/ | |||||
#define ICP_QAT_FW_COMN_HDR_GENERATION_FLAG_SET(hdr_t, val) \ | |||||
ICP_QAT_FW_COMN_GENERATION_FLAG_SET(hdr_t, val) | |||||
/** | |||||
****************************************************************************** | |||||
* @ingroup icp_qat_fw_comn | |||||
* | |||||
* @description | |||||
* Common macro to set the generation bit in the common header | |||||
* | |||||
* @param hdr_t Structure (request or response) containing the header | |||||
* flags field, to allow the generation bit to be set. | |||||
* @param val Value of the generation bit flag. | |||||
* | |||||
*****************************************************************************/ | |||||
#define ICP_QAT_FW_COMN_GENERATION_FLAG_SET(hdr_t, val) \ | |||||
QAT_FIELD_SET((hdr_t.hdr_flags), \ | |||||
(val), \ | |||||
ICP_QAT_FW_COMN_GEN_FLAG_BITPOS, \ | |||||
ICP_QAT_FW_COMN_GEN_FLAG_MASK) | |||||
/** | |||||
****************************************************************************** | |||||
* @ingroup icp_qat_fw_comn | |||||
* | |||||
* @description | |||||
* Common macro to extract the generation flag from the header flags field | |||||
* within the header structure (request or response). | |||||
* | |||||
* @param hdr_t Structure (request or response) to extract the | |||||
* generation bit from the 'hdr_flags' field. | |||||
* | |||||
*****************************************************************************/ | |||||
#define ICP_QAT_FW_COMN_HDR_GENERATION_FLAG_GET(hdr_flags) \ | |||||
QAT_FIELD_GET(hdr_flags, \ | |||||
ICP_QAT_FW_COMN_GEN_FLAG_BITPOS, \ | |||||
ICP_QAT_FW_COMN_GEN_FLAG_MASK) | |||||
/** | /** | ||||
****************************************************************************** | ****************************************************************************** | ||||
* @ingroup icp_qat_fw_comn | * @ingroup icp_qat_fw_comn | ||||
* | * | ||||
* @description | * @description | ||||
* Common macro to extract the remaining reserved flags from the header | * Common macro to extract the remaining reserved flags from the header | ||||
flags field within the header structure (request or response). | flags field within the header structure (request or response). | ||||
* | * | ||||
▲ Show 20 Lines • Show All 663 Lines • Show Last 20 Lines |