drivers/crypto/intel/qat/qat_common/icp_qat_hw.h
Source file repositories/reference/linux-study-clean/drivers/crypto/intel/qat/qat_common/icp_qat_hw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/intel/qat/qat_common/icp_qat_hw.h- Extension
.h- Size
- 12701 bytes
- Lines
- 392
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.h
Detected Declarations
struct icp_qat_hw_auth_configstruct icp_qat_hw_ucs_cipher_configstruct icp_qat_hw_auth_counterstruct icp_qat_hw_auth_setupstruct icp_qat_hw_auth_sha512struct icp_qat_hw_auth_algo_blkstruct icp_qat_hw_cipher_configstruct icp_qat_hw_cipher_aes256_f8struct icp_qat_hw_ucs_cipher_aes256_f8struct icp_qat_hw_cipher_algo_blkstruct icp_qat_hw_compression_configenum icp_qat_hw_ae_idenum icp_qat_hw_qat_idenum icp_qat_hw_auth_algoenum icp_qat_hw_auth_modeenum icp_qat_slice_maskenum icp_qat_capabilities_maskenum icp_qat_hw_cipher_algoenum icp_qat_hw_cipher_modeenum icp_qat_hw_cipher_direnum icp_qat_hw_cipher_convertenum icp_qat_hw_compression_directionenum icp_qat_hw_compression_delayed_matchenum icp_qat_hw_compression_algoenum icp_qat_hw_compression_depthenum icp_qat_hw_compression_file_type
Annotated Snippet
struct icp_qat_hw_auth_config {
__u32 config;
__u32 reserved;
};
struct icp_qat_hw_ucs_cipher_config {
__u32 val;
__u32 reserved[3];
};
enum icp_qat_slice_mask {
ICP_ACCEL_MASK_CIPHER_SLICE = BIT(0),
ICP_ACCEL_MASK_AUTH_SLICE = BIT(1),
ICP_ACCEL_MASK_PKE_SLICE = BIT(2),
ICP_ACCEL_MASK_COMPRESS_SLICE = BIT(3),
ICP_ACCEL_MASK_LZS_SLICE = BIT(4),
ICP_ACCEL_MASK_EIA3_SLICE = BIT(5),
ICP_ACCEL_MASK_SHA3_SLICE = BIT(6),
};
enum icp_qat_capabilities_mask {
ICP_ACCEL_CAPABILITIES_CRYPTO_SYMMETRIC = BIT(0),
ICP_ACCEL_CAPABILITIES_CRYPTO_ASYMMETRIC = BIT(1),
ICP_ACCEL_CAPABILITIES_CIPHER = BIT(2),
ICP_ACCEL_CAPABILITIES_AUTHENTICATION = BIT(3),
ICP_ACCEL_CAPABILITIES_RESERVED_1 = BIT(4),
ICP_ACCEL_CAPABILITIES_COMPRESSION = BIT(5),
/* Bit 6 is currently reserved */
ICP_ACCEL_CAPABILITIES_5G = BIT(7),
ICP_ACCEL_CAPABILITIES_ZUC = BIT(8),
ICP_ACCEL_CAPABILITIES_SHA3 = BIT(9),
/* Bits 10-11 are currently reserved */
ICP_ACCEL_CAPABILITIES_HKDF = BIT(12),
ICP_ACCEL_CAPABILITIES_ECEDMONT = BIT(13),
ICP_ACCEL_CAPABILITIES_EXT_ALGCHAIN = BIT(14),
ICP_ACCEL_CAPABILITIES_SHA3_EXT = BIT(15),
ICP_ACCEL_CAPABILITIES_AESGCM_SPC = BIT(16),
ICP_ACCEL_CAPABILITIES_CHACHA_POLY = BIT(17),
ICP_ACCEL_CAPABILITIES_SM2 = BIT(18),
ICP_ACCEL_CAPABILITIES_SM3 = BIT(19),
ICP_ACCEL_CAPABILITIES_SM4 = BIT(20),
/* Bit 21 is currently reserved */
ICP_ACCEL_CAPABILITIES_CNV_INTEGRITY = BIT(22),
ICP_ACCEL_CAPABILITIES_CNV_INTEGRITY64 = BIT(23),
ICP_ACCEL_CAPABILITIES_LZ4_COMPRESSION = BIT(24),
ICP_ACCEL_CAPABILITIES_LZ4S_COMPRESSION = BIT(25),
ICP_ACCEL_CAPABILITIES_AES_V2 = BIT(26),
ICP_ACCEL_CAPABILITIES_KPT = BIT(27),
/* Bit 28 is currently reserved */
ICP_ACCEL_CAPABILITIES_ZUC_256 = BIT(29),
ICP_ACCEL_CAPABILITIES_WIRELESS_CRYPTO_EXT = BIT(30),
};
#define QAT_AUTH_MODE_BITPOS 4
#define QAT_AUTH_MODE_MASK 0xF
#define QAT_AUTH_ALGO_BITPOS 0
#define QAT_AUTH_ALGO_MASK 0xF
#define QAT_AUTH_CMP_BITPOS 8
#define QAT_AUTH_CMP_MASK 0x7F
#define QAT_AUTH_SHA3_PADDING_BITPOS 16
#define QAT_AUTH_SHA3_PADDING_MASK 0x1
#define QAT_AUTH_ALGO_SHA3_BITPOS 22
#define QAT_AUTH_ALGO_SHA3_MASK 0x3
#define ICP_QAT_HW_AUTH_CONFIG_BUILD(mode, algo, cmp_len) \
(((mode & QAT_AUTH_MODE_MASK) << QAT_AUTH_MODE_BITPOS) | \
((algo & QAT_AUTH_ALGO_MASK) << QAT_AUTH_ALGO_BITPOS) | \
(((algo >> 4) & QAT_AUTH_ALGO_SHA3_MASK) << \
QAT_AUTH_ALGO_SHA3_BITPOS) | \
(((((algo == ICP_QAT_HW_AUTH_ALGO_SHA3_256) || \
(algo == ICP_QAT_HW_AUTH_ALGO_SHA3_512)) ? 1 : 0) \
& QAT_AUTH_SHA3_PADDING_MASK) << QAT_AUTH_SHA3_PADDING_BITPOS) | \
((cmp_len & QAT_AUTH_CMP_MASK) << QAT_AUTH_CMP_BITPOS))
struct icp_qat_hw_auth_counter {
__be32 counter;
__u32 reserved;
};
#define QAT_AUTH_COUNT_MASK 0xFFFFFFFF
#define QAT_AUTH_COUNT_BITPOS 0
#define ICP_QAT_HW_AUTH_COUNT_BUILD(val) \
(((val) & QAT_AUTH_COUNT_MASK) << QAT_AUTH_COUNT_BITPOS)
struct icp_qat_hw_auth_setup {
struct icp_qat_hw_auth_config auth_config;
struct icp_qat_hw_auth_counter auth_counter;
};
#define QAT_HW_DEFAULT_ALIGNMENT 8
#define QAT_HW_ROUND_UP(val, n) (((val) + ((n) - 1)) & (~(n - 1)))
Annotation
- Immediate include surface: `linux/bits.h`.
- Detected declarations: `struct icp_qat_hw_auth_config`, `struct icp_qat_hw_ucs_cipher_config`, `struct icp_qat_hw_auth_counter`, `struct icp_qat_hw_auth_setup`, `struct icp_qat_hw_auth_sha512`, `struct icp_qat_hw_auth_algo_blk`, `struct icp_qat_hw_cipher_config`, `struct icp_qat_hw_cipher_aes256_f8`, `struct icp_qat_hw_ucs_cipher_aes256_f8`, `struct icp_qat_hw_cipher_algo_blk`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.