18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * CAAM descriptor composition header 48c2ecf20Sopenharmony_ci * Definitions to support CAAM descriptor instruction generation 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright 2008-2011 Freescale Semiconductor, Inc. 78c2ecf20Sopenharmony_ci * Copyright 2018 NXP 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef DESC_H 118c2ecf20Sopenharmony_ci#define DESC_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* 148c2ecf20Sopenharmony_ci * 16-byte hardware scatter/gather table 158c2ecf20Sopenharmony_ci * An 8-byte table exists in the hardware spec, but has never been 168c2ecf20Sopenharmony_ci * implemented to date. The 8/16 option is selected at RTL-compile-time. 178c2ecf20Sopenharmony_ci * and this selection is visible in the Compile Time Parameters Register 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define SEC4_SG_LEN_EXT 0x80000000 /* Entry points to table */ 218c2ecf20Sopenharmony_ci#define SEC4_SG_LEN_FIN 0x40000000 /* Last entry in table */ 228c2ecf20Sopenharmony_ci#define SEC4_SG_BPID_MASK 0x000000ff 238c2ecf20Sopenharmony_ci#define SEC4_SG_BPID_SHIFT 16 248c2ecf20Sopenharmony_ci#define SEC4_SG_LEN_MASK 0x3fffffff /* Excludes EXT and FINAL */ 258c2ecf20Sopenharmony_ci#define SEC4_SG_OFFSET_MASK 0x00001fff 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Max size of any CAAM descriptor in 32-bit words, inclusive of header */ 288c2ecf20Sopenharmony_ci#define MAX_CAAM_DESCSIZE 64 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* Block size of any entity covered/uncovered with a KEK/TKEK */ 318c2ecf20Sopenharmony_ci#define KEK_BLOCKSIZE 16 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* 348c2ecf20Sopenharmony_ci * Supported descriptor command types as they show up 358c2ecf20Sopenharmony_ci * inside a descriptor command word. 368c2ecf20Sopenharmony_ci */ 378c2ecf20Sopenharmony_ci#define CMD_SHIFT 27 388c2ecf20Sopenharmony_ci#define CMD_MASK 0xf8000000 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define CMD_KEY (0x00 << CMD_SHIFT) 418c2ecf20Sopenharmony_ci#define CMD_SEQ_KEY (0x01 << CMD_SHIFT) 428c2ecf20Sopenharmony_ci#define CMD_LOAD (0x02 << CMD_SHIFT) 438c2ecf20Sopenharmony_ci#define CMD_SEQ_LOAD (0x03 << CMD_SHIFT) 448c2ecf20Sopenharmony_ci#define CMD_FIFO_LOAD (0x04 << CMD_SHIFT) 458c2ecf20Sopenharmony_ci#define CMD_SEQ_FIFO_LOAD (0x05 << CMD_SHIFT) 468c2ecf20Sopenharmony_ci#define CMD_STORE (0x0a << CMD_SHIFT) 478c2ecf20Sopenharmony_ci#define CMD_SEQ_STORE (0x0b << CMD_SHIFT) 488c2ecf20Sopenharmony_ci#define CMD_FIFO_STORE (0x0c << CMD_SHIFT) 498c2ecf20Sopenharmony_ci#define CMD_SEQ_FIFO_STORE (0x0d << CMD_SHIFT) 508c2ecf20Sopenharmony_ci#define CMD_MOVE_LEN (0x0e << CMD_SHIFT) 518c2ecf20Sopenharmony_ci#define CMD_MOVE (0x0f << CMD_SHIFT) 528c2ecf20Sopenharmony_ci#define CMD_OPERATION (0x10 << CMD_SHIFT) 538c2ecf20Sopenharmony_ci#define CMD_SIGNATURE (0x12 << CMD_SHIFT) 548c2ecf20Sopenharmony_ci#define CMD_JUMP (0x14 << CMD_SHIFT) 558c2ecf20Sopenharmony_ci#define CMD_MATH (0x15 << CMD_SHIFT) 568c2ecf20Sopenharmony_ci#define CMD_DESC_HDR (0x16 << CMD_SHIFT) 578c2ecf20Sopenharmony_ci#define CMD_SHARED_DESC_HDR (0x17 << CMD_SHIFT) 588c2ecf20Sopenharmony_ci#define CMD_SEQ_IN_PTR (0x1e << CMD_SHIFT) 598c2ecf20Sopenharmony_ci#define CMD_SEQ_OUT_PTR (0x1f << CMD_SHIFT) 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* General-purpose class selector for all commands */ 628c2ecf20Sopenharmony_ci#define CLASS_SHIFT 25 638c2ecf20Sopenharmony_ci#define CLASS_MASK (0x03 << CLASS_SHIFT) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define CLASS_NONE (0x00 << CLASS_SHIFT) 668c2ecf20Sopenharmony_ci#define CLASS_1 (0x01 << CLASS_SHIFT) 678c2ecf20Sopenharmony_ci#define CLASS_2 (0x02 << CLASS_SHIFT) 688c2ecf20Sopenharmony_ci#define CLASS_BOTH (0x03 << CLASS_SHIFT) 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci/* 718c2ecf20Sopenharmony_ci * Descriptor header command constructs 728c2ecf20Sopenharmony_ci * Covers shared, job, and trusted descriptor headers 738c2ecf20Sopenharmony_ci */ 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci/* 768c2ecf20Sopenharmony_ci * Do Not Run - marks a descriptor inexecutable if there was 778c2ecf20Sopenharmony_ci * a preceding error somewhere 788c2ecf20Sopenharmony_ci */ 798c2ecf20Sopenharmony_ci#define HDR_DNR 0x01000000 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci/* 828c2ecf20Sopenharmony_ci * ONE - should always be set. Combination of ONE (always 838c2ecf20Sopenharmony_ci * set) and ZRO (always clear) forms an endianness sanity check 848c2ecf20Sopenharmony_ci */ 858c2ecf20Sopenharmony_ci#define HDR_ONE 0x00800000 868c2ecf20Sopenharmony_ci#define HDR_ZRO 0x00008000 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci/* Start Index or SharedDesc Length */ 898c2ecf20Sopenharmony_ci#define HDR_START_IDX_SHIFT 16 908c2ecf20Sopenharmony_ci#define HDR_START_IDX_MASK (0x3f << HDR_START_IDX_SHIFT) 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci/* If shared descriptor header, 6-bit length */ 938c2ecf20Sopenharmony_ci#define HDR_DESCLEN_SHR_MASK 0x3f 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci/* If non-shared header, 7-bit length */ 968c2ecf20Sopenharmony_ci#define HDR_DESCLEN_MASK 0x7f 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci/* This is a TrustedDesc (if not SharedDesc) */ 998c2ecf20Sopenharmony_ci#define HDR_TRUSTED 0x00004000 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci/* Make into TrustedDesc (if not SharedDesc) */ 1028c2ecf20Sopenharmony_ci#define HDR_MAKE_TRUSTED 0x00002000 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci/* Save context if self-shared (if SharedDesc) */ 1058c2ecf20Sopenharmony_ci#define HDR_SAVECTX 0x00001000 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci/* Next item points to SharedDesc */ 1088c2ecf20Sopenharmony_ci#define HDR_SHARED 0x00001000 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci/* 1118c2ecf20Sopenharmony_ci * Reverse Execution Order - execute JobDesc first, then 1128c2ecf20Sopenharmony_ci * execute SharedDesc (normally SharedDesc goes first). 1138c2ecf20Sopenharmony_ci */ 1148c2ecf20Sopenharmony_ci#define HDR_REVERSE 0x00000800 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci/* Propagate DNR property to SharedDesc */ 1178c2ecf20Sopenharmony_ci#define HDR_PROP_DNR 0x00000800 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci/* JobDesc/SharedDesc share property */ 1208c2ecf20Sopenharmony_ci#define HDR_SD_SHARE_SHIFT 8 1218c2ecf20Sopenharmony_ci#define HDR_SD_SHARE_MASK (0x03 << HDR_SD_SHARE_SHIFT) 1228c2ecf20Sopenharmony_ci#define HDR_JD_SHARE_SHIFT 8 1238c2ecf20Sopenharmony_ci#define HDR_JD_SHARE_MASK (0x07 << HDR_JD_SHARE_SHIFT) 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci#define HDR_SHARE_NEVER (0x00 << HDR_SD_SHARE_SHIFT) 1268c2ecf20Sopenharmony_ci#define HDR_SHARE_WAIT (0x01 << HDR_SD_SHARE_SHIFT) 1278c2ecf20Sopenharmony_ci#define HDR_SHARE_SERIAL (0x02 << HDR_SD_SHARE_SHIFT) 1288c2ecf20Sopenharmony_ci#define HDR_SHARE_ALWAYS (0x03 << HDR_SD_SHARE_SHIFT) 1298c2ecf20Sopenharmony_ci#define HDR_SHARE_DEFER (0x04 << HDR_SD_SHARE_SHIFT) 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* JobDesc/SharedDesc descriptor length */ 1328c2ecf20Sopenharmony_ci#define HDR_JD_LENGTH_MASK 0x7f 1338c2ecf20Sopenharmony_ci#define HDR_SD_LENGTH_MASK 0x3f 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci/* 1368c2ecf20Sopenharmony_ci * KEY/SEQ_KEY Command Constructs 1378c2ecf20Sopenharmony_ci */ 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci/* Key Destination Class: 01 = Class 1, 02 - Class 2 */ 1408c2ecf20Sopenharmony_ci#define KEY_DEST_CLASS_SHIFT 25 /* use CLASS_1 or CLASS_2 */ 1418c2ecf20Sopenharmony_ci#define KEY_DEST_CLASS_MASK (0x03 << KEY_DEST_CLASS_SHIFT) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* Scatter-Gather Table/Variable Length Field */ 1448c2ecf20Sopenharmony_ci#define KEY_SGF 0x01000000 1458c2ecf20Sopenharmony_ci#define KEY_VLF 0x01000000 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/* Immediate - Key follows command in the descriptor */ 1488c2ecf20Sopenharmony_ci#define KEY_IMM 0x00800000 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci/* 1518c2ecf20Sopenharmony_ci * Encrypted - Key is encrypted either with the KEK, or 1528c2ecf20Sopenharmony_ci * with the TDKEK if TK is set 1538c2ecf20Sopenharmony_ci */ 1548c2ecf20Sopenharmony_ci#define KEY_ENC 0x00400000 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci/* 1578c2ecf20Sopenharmony_ci * No Write Back - Do not allow key to be FIFO STOREd 1588c2ecf20Sopenharmony_ci */ 1598c2ecf20Sopenharmony_ci#define KEY_NWB 0x00200000 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci/* 1628c2ecf20Sopenharmony_ci * Enhanced Encryption of Key 1638c2ecf20Sopenharmony_ci */ 1648c2ecf20Sopenharmony_ci#define KEY_EKT 0x00100000 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci/* 1678c2ecf20Sopenharmony_ci * Encrypted with Trusted Key 1688c2ecf20Sopenharmony_ci */ 1698c2ecf20Sopenharmony_ci#define KEY_TK 0x00008000 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci/* 1728c2ecf20Sopenharmony_ci * KDEST - Key Destination: 0 - class key register, 1738c2ecf20Sopenharmony_ci * 1 - PKHA 'e', 2 - AFHA Sbox, 3 - MDHA split-key 1748c2ecf20Sopenharmony_ci */ 1758c2ecf20Sopenharmony_ci#define KEY_DEST_SHIFT 16 1768c2ecf20Sopenharmony_ci#define KEY_DEST_MASK (0x03 << KEY_DEST_SHIFT) 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci#define KEY_DEST_CLASS_REG (0x00 << KEY_DEST_SHIFT) 1798c2ecf20Sopenharmony_ci#define KEY_DEST_PKHA_E (0x01 << KEY_DEST_SHIFT) 1808c2ecf20Sopenharmony_ci#define KEY_DEST_AFHA_SBOX (0x02 << KEY_DEST_SHIFT) 1818c2ecf20Sopenharmony_ci#define KEY_DEST_MDHA_SPLIT (0x03 << KEY_DEST_SHIFT) 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci/* Length in bytes */ 1848c2ecf20Sopenharmony_ci#define KEY_LENGTH_MASK 0x000003ff 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci/* 1878c2ecf20Sopenharmony_ci * LOAD/SEQ_LOAD/STORE/SEQ_STORE Command Constructs 1888c2ecf20Sopenharmony_ci */ 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci/* 1918c2ecf20Sopenharmony_ci * Load/Store Destination: 0 = class independent CCB, 1928c2ecf20Sopenharmony_ci * 1 = class 1 CCB, 2 = class 2 CCB, 3 = DECO 1938c2ecf20Sopenharmony_ci */ 1948c2ecf20Sopenharmony_ci#define LDST_CLASS_SHIFT 25 1958c2ecf20Sopenharmony_ci#define LDST_CLASS_MASK (0x03 << LDST_CLASS_SHIFT) 1968c2ecf20Sopenharmony_ci#define LDST_CLASS_IND_CCB (0x00 << LDST_CLASS_SHIFT) 1978c2ecf20Sopenharmony_ci#define LDST_CLASS_1_CCB (0x01 << LDST_CLASS_SHIFT) 1988c2ecf20Sopenharmony_ci#define LDST_CLASS_2_CCB (0x02 << LDST_CLASS_SHIFT) 1998c2ecf20Sopenharmony_ci#define LDST_CLASS_DECO (0x03 << LDST_CLASS_SHIFT) 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci/* Scatter-Gather Table/Variable Length Field */ 2028c2ecf20Sopenharmony_ci#define LDST_SGF 0x01000000 2038c2ecf20Sopenharmony_ci#define LDST_VLF LDST_SGF 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci/* Immediate - Key follows this command in descriptor */ 2068c2ecf20Sopenharmony_ci#define LDST_IMM_MASK 1 2078c2ecf20Sopenharmony_ci#define LDST_IMM_SHIFT 23 2088c2ecf20Sopenharmony_ci#define LDST_IMM (LDST_IMM_MASK << LDST_IMM_SHIFT) 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci/* SRC/DST - Destination for LOAD, Source for STORE */ 2118c2ecf20Sopenharmony_ci#define LDST_SRCDST_SHIFT 16 2128c2ecf20Sopenharmony_ci#define LDST_SRCDST_MASK (0x7f << LDST_SRCDST_SHIFT) 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define LDST_SRCDST_BYTE_CONTEXT (0x20 << LDST_SRCDST_SHIFT) 2158c2ecf20Sopenharmony_ci#define LDST_SRCDST_BYTE_KEY (0x40 << LDST_SRCDST_SHIFT) 2168c2ecf20Sopenharmony_ci#define LDST_SRCDST_BYTE_INFIFO (0x7c << LDST_SRCDST_SHIFT) 2178c2ecf20Sopenharmony_ci#define LDST_SRCDST_BYTE_OUTFIFO (0x7e << LDST_SRCDST_SHIFT) 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_MODE_REG (0x00 << LDST_SRCDST_SHIFT) 2208c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_KEYSZ_REG (0x01 << LDST_SRCDST_SHIFT) 2218c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DATASZ_REG (0x02 << LDST_SRCDST_SHIFT) 2228c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_ICVSZ_REG (0x03 << LDST_SRCDST_SHIFT) 2238c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_CHACTRL (0x06 << LDST_SRCDST_SHIFT) 2248c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECOCTRL (0x06 << LDST_SRCDST_SHIFT) 2258c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_IRQCTRL (0x07 << LDST_SRCDST_SHIFT) 2268c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_PCLOVRD (0x07 << LDST_SRCDST_SHIFT) 2278c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_CLRW (0x08 << LDST_SRCDST_SHIFT) 2288c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH0 (0x08 << LDST_SRCDST_SHIFT) 2298c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_STAT (0x09 << LDST_SRCDST_SHIFT) 2308c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH1 (0x09 << LDST_SRCDST_SHIFT) 2318c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH2 (0x0a << LDST_SRCDST_SHIFT) 2328c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_AAD_SZ (0x0b << LDST_SRCDST_SHIFT) 2338c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH3 (0x0b << LDST_SRCDST_SHIFT) 2348c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_CLASS1_IV_SZ (0x0c << LDST_SRCDST_SHIFT) 2358c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_ALTDS_CLASS1 (0x0f << LDST_SRCDST_SHIFT) 2368c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_A_SZ (0x10 << LDST_SRCDST_SHIFT) 2378c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_B_SZ (0x11 << LDST_SRCDST_SHIFT) 2388c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_N_SZ (0x12 << LDST_SRCDST_SHIFT) 2398c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_E_SZ (0x13 << LDST_SRCDST_SHIFT) 2408c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_CLASS_CTX (0x20 << LDST_SRCDST_SHIFT) 2418c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF (0x40 << LDST_SRCDST_SHIFT) 2428c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_JOB (0x41 << LDST_SRCDST_SHIFT) 2438c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_SHARED (0x42 << LDST_SRCDST_SHIFT) 2448c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_JOB_WE (0x45 << LDST_SRCDST_SHIFT) 2458c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_SHARED_WE (0x46 << LDST_SRCDST_SHIFT) 2468c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_INFO_FIFO_SM (0x71 << LDST_SRCDST_SHIFT) 2478c2ecf20Sopenharmony_ci#define LDST_SRCDST_WORD_INFO_FIFO (0x7a << LDST_SRCDST_SHIFT) 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci/* Offset in source/destination */ 2508c2ecf20Sopenharmony_ci#define LDST_OFFSET_SHIFT 8 2518c2ecf20Sopenharmony_ci#define LDST_OFFSET_MASK (0xff << LDST_OFFSET_SHIFT) 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci/* LDOFF definitions used when DST = LDST_SRCDST_WORD_DECOCTRL */ 2548c2ecf20Sopenharmony_ci/* These could also be shifted by LDST_OFFSET_SHIFT - this reads better */ 2558c2ecf20Sopenharmony_ci#define LDOFF_CHG_SHARE_SHIFT 0 2568c2ecf20Sopenharmony_ci#define LDOFF_CHG_SHARE_MASK (0x3 << LDOFF_CHG_SHARE_SHIFT) 2578c2ecf20Sopenharmony_ci#define LDOFF_CHG_SHARE_NEVER (0x1 << LDOFF_CHG_SHARE_SHIFT) 2588c2ecf20Sopenharmony_ci#define LDOFF_CHG_SHARE_OK_PROP (0x2 << LDOFF_CHG_SHARE_SHIFT) 2598c2ecf20Sopenharmony_ci#define LDOFF_CHG_SHARE_OK_NO_PROP (0x3 << LDOFF_CHG_SHARE_SHIFT) 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci#define LDOFF_ENABLE_AUTO_NFIFO (1 << 2) 2628c2ecf20Sopenharmony_ci#define LDOFF_DISABLE_AUTO_NFIFO (1 << 3) 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_SHIFT 4 2658c2ecf20Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_MASK (0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT) 2668c2ecf20Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_SEQ (0x1 << LDOFF_CHG_NONSEQLIODN_SHIFT) 2678c2ecf20Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_NON_SEQ (0x2 << LDOFF_CHG_NONSEQLIODN_SHIFT) 2688c2ecf20Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_TRUSTED (0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT) 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_SHIFT 6 2718c2ecf20Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_MASK (0x3 << LDOFF_CHG_SEQLIODN_SHIFT) 2728c2ecf20Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_SEQ (0x1 << LDOFF_CHG_SEQLIODN_SHIFT) 2738c2ecf20Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_NON_SEQ (0x2 << LDOFF_CHG_SEQLIODN_SHIFT) 2748c2ecf20Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_TRUSTED (0x3 << LDOFF_CHG_SEQLIODN_SHIFT) 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci/* Data length in bytes */ 2778c2ecf20Sopenharmony_ci#define LDST_LEN_SHIFT 0 2788c2ecf20Sopenharmony_ci#define LDST_LEN_MASK (0xff << LDST_LEN_SHIFT) 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci/* Special Length definitions when dst=deco-ctrl */ 2818c2ecf20Sopenharmony_ci#define LDLEN_ENABLE_OSL_COUNT (1 << 7) 2828c2ecf20Sopenharmony_ci#define LDLEN_RST_CHA_OFIFO_PTR (1 << 6) 2838c2ecf20Sopenharmony_ci#define LDLEN_RST_OFIFO (1 << 5) 2848c2ecf20Sopenharmony_ci#define LDLEN_SET_OFIFO_OFF_VALID (1 << 4) 2858c2ecf20Sopenharmony_ci#define LDLEN_SET_OFIFO_OFF_RSVD (1 << 3) 2868c2ecf20Sopenharmony_ci#define LDLEN_SET_OFIFO_OFFSET_SHIFT 0 2878c2ecf20Sopenharmony_ci#define LDLEN_SET_OFIFO_OFFSET_MASK (3 << LDLEN_SET_OFIFO_OFFSET_SHIFT) 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci/* Special Length definitions when dst=sm, nfifo-{sm,m} */ 2908c2ecf20Sopenharmony_ci#define LDLEN_MATH0 0 2918c2ecf20Sopenharmony_ci#define LDLEN_MATH1 1 2928c2ecf20Sopenharmony_ci#define LDLEN_MATH2 2 2938c2ecf20Sopenharmony_ci#define LDLEN_MATH3 3 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci/* 2968c2ecf20Sopenharmony_ci * FIFO_LOAD/FIFO_STORE/SEQ_FIFO_LOAD/SEQ_FIFO_STORE 2978c2ecf20Sopenharmony_ci * Command Constructs 2988c2ecf20Sopenharmony_ci */ 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci/* 3018c2ecf20Sopenharmony_ci * Load Destination: 0 = skip (SEQ_FIFO_LOAD only), 3028c2ecf20Sopenharmony_ci * 1 = Load for Class1, 2 = Load for Class2, 3 = Load both 3038c2ecf20Sopenharmony_ci * Store Source: 0 = normal, 1 = Class1key, 2 = Class2key 3048c2ecf20Sopenharmony_ci */ 3058c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_SHIFT 25 3068c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_MASK (0x03 << FIFOLD_CLASS_SHIFT) 3078c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_SKIP (0x00 << FIFOLD_CLASS_SHIFT) 3088c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_CLASS1 (0x01 << FIFOLD_CLASS_SHIFT) 3098c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_CLASS2 (0x02 << FIFOLD_CLASS_SHIFT) 3108c2ecf20Sopenharmony_ci#define FIFOLD_CLASS_BOTH (0x03 << FIFOLD_CLASS_SHIFT) 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci#define FIFOST_CLASS_SHIFT 25 3138c2ecf20Sopenharmony_ci#define FIFOST_CLASS_MASK (0x03 << FIFOST_CLASS_SHIFT) 3148c2ecf20Sopenharmony_ci#define FIFOST_CLASS_NORMAL (0x00 << FIFOST_CLASS_SHIFT) 3158c2ecf20Sopenharmony_ci#define FIFOST_CLASS_CLASS1KEY (0x01 << FIFOST_CLASS_SHIFT) 3168c2ecf20Sopenharmony_ci#define FIFOST_CLASS_CLASS2KEY (0x02 << FIFOST_CLASS_SHIFT) 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ci/* 3198c2ecf20Sopenharmony_ci * Scatter-Gather Table/Variable Length Field 3208c2ecf20Sopenharmony_ci * If set for FIFO_LOAD, refers to a SG table. Within 3218c2ecf20Sopenharmony_ci * SEQ_FIFO_LOAD, is variable input sequence 3228c2ecf20Sopenharmony_ci */ 3238c2ecf20Sopenharmony_ci#define FIFOLDST_SGF_SHIFT 24 3248c2ecf20Sopenharmony_ci#define FIFOLDST_SGF_MASK (1 << FIFOLDST_SGF_SHIFT) 3258c2ecf20Sopenharmony_ci#define FIFOLDST_VLF_MASK (1 << FIFOLDST_SGF_SHIFT) 3268c2ecf20Sopenharmony_ci#define FIFOLDST_SGF (1 << FIFOLDST_SGF_SHIFT) 3278c2ecf20Sopenharmony_ci#define FIFOLDST_VLF (1 << FIFOLDST_SGF_SHIFT) 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci/* Immediate - Data follows command in descriptor */ 3308c2ecf20Sopenharmony_ci#define FIFOLD_IMM_SHIFT 23 3318c2ecf20Sopenharmony_ci#define FIFOLD_IMM_MASK (1 << FIFOLD_IMM_SHIFT) 3328c2ecf20Sopenharmony_ci#define FIFOLD_IMM (1 << FIFOLD_IMM_SHIFT) 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci/* Continue - Not the last FIFO store to come */ 3358c2ecf20Sopenharmony_ci#define FIFOST_CONT_SHIFT 23 3368c2ecf20Sopenharmony_ci#define FIFOST_CONT_MASK (1 << FIFOST_CONT_SHIFT) 3378c2ecf20Sopenharmony_ci 3388c2ecf20Sopenharmony_ci/* 3398c2ecf20Sopenharmony_ci * Extended Length - use 32-bit extended length that 3408c2ecf20Sopenharmony_ci * follows the pointer field. Illegal with IMM set 3418c2ecf20Sopenharmony_ci */ 3428c2ecf20Sopenharmony_ci#define FIFOLDST_EXT_SHIFT 22 3438c2ecf20Sopenharmony_ci#define FIFOLDST_EXT_MASK (1 << FIFOLDST_EXT_SHIFT) 3448c2ecf20Sopenharmony_ci#define FIFOLDST_EXT (1 << FIFOLDST_EXT_SHIFT) 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci/* Input data type.*/ 3478c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_SHIFT 16 3488c2ecf20Sopenharmony_ci#define FIFOLD_CONT_TYPE_SHIFT 19 /* shift past last-flush bits */ 3498c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_MASK (0x3f << FIFOLD_TYPE_SHIFT) 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ci/* PK types */ 3528c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK (0x00 << FIFOLD_TYPE_SHIFT) 3538c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_MASK (0x30 << FIFOLD_TYPE_SHIFT) 3548c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_TYPEMASK (0x0f << FIFOLD_TYPE_SHIFT) 3558c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_A0 (0x00 << FIFOLD_TYPE_SHIFT) 3568c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_A1 (0x01 << FIFOLD_TYPE_SHIFT) 3578c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_A2 (0x02 << FIFOLD_TYPE_SHIFT) 3588c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_A3 (0x03 << FIFOLD_TYPE_SHIFT) 3598c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_B0 (0x04 << FIFOLD_TYPE_SHIFT) 3608c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_B1 (0x05 << FIFOLD_TYPE_SHIFT) 3618c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_B2 (0x06 << FIFOLD_TYPE_SHIFT) 3628c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_B3 (0x07 << FIFOLD_TYPE_SHIFT) 3638c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_N (0x08 << FIFOLD_TYPE_SHIFT) 3648c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_A (0x0c << FIFOLD_TYPE_SHIFT) 3658c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_PK_B (0x0d << FIFOLD_TYPE_SHIFT) 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci/* Other types. Need to OR in last/flush bits as desired */ 3688c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_MSG_MASK (0x38 << FIFOLD_TYPE_SHIFT) 3698c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_MSG (0x10 << FIFOLD_TYPE_SHIFT) 3708c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_MSG1OUT2 (0x18 << FIFOLD_TYPE_SHIFT) 3718c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_IV (0x20 << FIFOLD_TYPE_SHIFT) 3728c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_BITDATA (0x28 << FIFOLD_TYPE_SHIFT) 3738c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_AAD (0x30 << FIFOLD_TYPE_SHIFT) 3748c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_ICV (0x38 << FIFOLD_TYPE_SHIFT) 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci/* Last/Flush bits for use with "other" types above */ 3778c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_ACT_MASK (0x07 << FIFOLD_TYPE_SHIFT) 3788c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_NOACTION (0x00 << FIFOLD_TYPE_SHIFT) 3798c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_FLUSH1 (0x01 << FIFOLD_TYPE_SHIFT) 3808c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LAST1 (0x02 << FIFOLD_TYPE_SHIFT) 3818c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LAST2FLUSH (0x03 << FIFOLD_TYPE_SHIFT) 3828c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LAST2 (0x04 << FIFOLD_TYPE_SHIFT) 3838c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LAST2FLUSH1 (0x05 << FIFOLD_TYPE_SHIFT) 3848c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LASTBOTH (0x06 << FIFOLD_TYPE_SHIFT) 3858c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_LASTBOTHFL (0x07 << FIFOLD_TYPE_SHIFT) 3868c2ecf20Sopenharmony_ci#define FIFOLD_TYPE_NOINFOFIFO (0x0F << FIFOLD_TYPE_SHIFT) 3878c2ecf20Sopenharmony_ci 3888c2ecf20Sopenharmony_ci#define FIFOLDST_LEN_MASK 0xffff 3898c2ecf20Sopenharmony_ci#define FIFOLDST_EXT_LEN_MASK 0xffffffff 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ci/* Output data types */ 3928c2ecf20Sopenharmony_ci#define FIFOST_TYPE_SHIFT 16 3938c2ecf20Sopenharmony_ci#define FIFOST_TYPE_MASK (0x3f << FIFOST_TYPE_SHIFT) 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_A0 (0x00 << FIFOST_TYPE_SHIFT) 3968c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_A1 (0x01 << FIFOST_TYPE_SHIFT) 3978c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_A2 (0x02 << FIFOST_TYPE_SHIFT) 3988c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_A3 (0x03 << FIFOST_TYPE_SHIFT) 3998c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_B0 (0x04 << FIFOST_TYPE_SHIFT) 4008c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_B1 (0x05 << FIFOST_TYPE_SHIFT) 4018c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_B2 (0x06 << FIFOST_TYPE_SHIFT) 4028c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_B3 (0x07 << FIFOST_TYPE_SHIFT) 4038c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_N (0x08 << FIFOST_TYPE_SHIFT) 4048c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_A (0x0c << FIFOST_TYPE_SHIFT) 4058c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_B (0x0d << FIFOST_TYPE_SHIFT) 4068c2ecf20Sopenharmony_ci#define FIFOST_TYPE_AF_SBOX_JKEK (0x20 << FIFOST_TYPE_SHIFT) 4078c2ecf20Sopenharmony_ci#define FIFOST_TYPE_AF_SBOX_TKEK (0x21 << FIFOST_TYPE_SHIFT) 4088c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_E_JKEK (0x22 << FIFOST_TYPE_SHIFT) 4098c2ecf20Sopenharmony_ci#define FIFOST_TYPE_PKHA_E_TKEK (0x23 << FIFOST_TYPE_SHIFT) 4108c2ecf20Sopenharmony_ci#define FIFOST_TYPE_KEY_KEK (0x24 << FIFOST_TYPE_SHIFT) 4118c2ecf20Sopenharmony_ci#define FIFOST_TYPE_KEY_TKEK (0x25 << FIFOST_TYPE_SHIFT) 4128c2ecf20Sopenharmony_ci#define FIFOST_TYPE_SPLIT_KEK (0x26 << FIFOST_TYPE_SHIFT) 4138c2ecf20Sopenharmony_ci#define FIFOST_TYPE_SPLIT_TKEK (0x27 << FIFOST_TYPE_SHIFT) 4148c2ecf20Sopenharmony_ci#define FIFOST_TYPE_OUTFIFO_KEK (0x28 << FIFOST_TYPE_SHIFT) 4158c2ecf20Sopenharmony_ci#define FIFOST_TYPE_OUTFIFO_TKEK (0x29 << FIFOST_TYPE_SHIFT) 4168c2ecf20Sopenharmony_ci#define FIFOST_TYPE_MESSAGE_DATA (0x30 << FIFOST_TYPE_SHIFT) 4178c2ecf20Sopenharmony_ci#define FIFOST_TYPE_RNGSTORE (0x34 << FIFOST_TYPE_SHIFT) 4188c2ecf20Sopenharmony_ci#define FIFOST_TYPE_RNGFIFO (0x35 << FIFOST_TYPE_SHIFT) 4198c2ecf20Sopenharmony_ci#define FIFOST_TYPE_METADATA (0x3e << FIFOST_TYPE_SHIFT) 4208c2ecf20Sopenharmony_ci#define FIFOST_TYPE_SKIP (0x3f << FIFOST_TYPE_SHIFT) 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ci/* 4238c2ecf20Sopenharmony_ci * OPERATION Command Constructs 4248c2ecf20Sopenharmony_ci */ 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_ci/* Operation type selectors - OP TYPE */ 4278c2ecf20Sopenharmony_ci#define OP_TYPE_SHIFT 24 4288c2ecf20Sopenharmony_ci#define OP_TYPE_MASK (0x07 << OP_TYPE_SHIFT) 4298c2ecf20Sopenharmony_ci 4308c2ecf20Sopenharmony_ci#define OP_TYPE_UNI_PROTOCOL (0x00 << OP_TYPE_SHIFT) 4318c2ecf20Sopenharmony_ci#define OP_TYPE_PK (0x01 << OP_TYPE_SHIFT) 4328c2ecf20Sopenharmony_ci#define OP_TYPE_CLASS1_ALG (0x02 << OP_TYPE_SHIFT) 4338c2ecf20Sopenharmony_ci#define OP_TYPE_CLASS2_ALG (0x04 << OP_TYPE_SHIFT) 4348c2ecf20Sopenharmony_ci#define OP_TYPE_DECAP_PROTOCOL (0x06 << OP_TYPE_SHIFT) 4358c2ecf20Sopenharmony_ci#define OP_TYPE_ENCAP_PROTOCOL (0x07 << OP_TYPE_SHIFT) 4368c2ecf20Sopenharmony_ci 4378c2ecf20Sopenharmony_ci/* ProtocolID selectors - PROTID */ 4388c2ecf20Sopenharmony_ci#define OP_PCLID_SHIFT 16 4398c2ecf20Sopenharmony_ci#define OP_PCLID_MASK (0xff << 16) 4408c2ecf20Sopenharmony_ci 4418c2ecf20Sopenharmony_ci/* Assuming OP_TYPE = OP_TYPE_UNI_PROTOCOL */ 4428c2ecf20Sopenharmony_ci#define OP_PCLID_IKEV1_PRF (0x01 << OP_PCLID_SHIFT) 4438c2ecf20Sopenharmony_ci#define OP_PCLID_IKEV2_PRF (0x02 << OP_PCLID_SHIFT) 4448c2ecf20Sopenharmony_ci#define OP_PCLID_SSL30_PRF (0x08 << OP_PCLID_SHIFT) 4458c2ecf20Sopenharmony_ci#define OP_PCLID_TLS10_PRF (0x09 << OP_PCLID_SHIFT) 4468c2ecf20Sopenharmony_ci#define OP_PCLID_TLS11_PRF (0x0a << OP_PCLID_SHIFT) 4478c2ecf20Sopenharmony_ci#define OP_PCLID_DTLS10_PRF (0x0c << OP_PCLID_SHIFT) 4488c2ecf20Sopenharmony_ci#define OP_PCLID_PRF (0x06 << OP_PCLID_SHIFT) 4498c2ecf20Sopenharmony_ci#define OP_PCLID_BLOB (0x0d << OP_PCLID_SHIFT) 4508c2ecf20Sopenharmony_ci#define OP_PCLID_SECRETKEY (0x11 << OP_PCLID_SHIFT) 4518c2ecf20Sopenharmony_ci#define OP_PCLID_PUBLICKEYPAIR (0x14 << OP_PCLID_SHIFT) 4528c2ecf20Sopenharmony_ci#define OP_PCLID_DSASIGN (0x15 << OP_PCLID_SHIFT) 4538c2ecf20Sopenharmony_ci#define OP_PCLID_DSAVERIFY (0x16 << OP_PCLID_SHIFT) 4548c2ecf20Sopenharmony_ci#define OP_PCLID_RSAENC_PUBKEY (0x18 << OP_PCLID_SHIFT) 4558c2ecf20Sopenharmony_ci#define OP_PCLID_RSADEC_PRVKEY (0x19 << OP_PCLID_SHIFT) 4568c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_MD5 (0x20 << OP_PCLID_SHIFT) 4578c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_SHA1 (0x21 << OP_PCLID_SHIFT) 4588c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_SHA224 (0x22 << OP_PCLID_SHIFT) 4598c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_SHA256 (0x23 << OP_PCLID_SHIFT) 4608c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_SHA384 (0x24 << OP_PCLID_SHIFT) 4618c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_SHA512 (0x25 << OP_PCLID_SHIFT) 4628c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_MD5 (0x60 << OP_PCLID_SHIFT) 4638c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA1 (0x61 << OP_PCLID_SHIFT) 4648c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA224 (0x62 << OP_PCLID_SHIFT) 4658c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA256 (0x63 << OP_PCLID_SHIFT) 4668c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA384 (0x64 << OP_PCLID_SHIFT) 4678c2ecf20Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA512 (0x65 << OP_PCLID_SHIFT) 4688c2ecf20Sopenharmony_ci 4698c2ecf20Sopenharmony_ci/* Assuming OP_TYPE = OP_TYPE_DECAP_PROTOCOL/ENCAP_PROTOCOL */ 4708c2ecf20Sopenharmony_ci#define OP_PCLID_IPSEC (0x01 << OP_PCLID_SHIFT) 4718c2ecf20Sopenharmony_ci#define OP_PCLID_SRTP (0x02 << OP_PCLID_SHIFT) 4728c2ecf20Sopenharmony_ci#define OP_PCLID_MACSEC (0x03 << OP_PCLID_SHIFT) 4738c2ecf20Sopenharmony_ci#define OP_PCLID_WIFI (0x04 << OP_PCLID_SHIFT) 4748c2ecf20Sopenharmony_ci#define OP_PCLID_WIMAX (0x05 << OP_PCLID_SHIFT) 4758c2ecf20Sopenharmony_ci#define OP_PCLID_SSL30 (0x08 << OP_PCLID_SHIFT) 4768c2ecf20Sopenharmony_ci#define OP_PCLID_TLS10 (0x09 << OP_PCLID_SHIFT) 4778c2ecf20Sopenharmony_ci#define OP_PCLID_TLS11 (0x0a << OP_PCLID_SHIFT) 4788c2ecf20Sopenharmony_ci#define OP_PCLID_TLS12 (0x0b << OP_PCLID_SHIFT) 4798c2ecf20Sopenharmony_ci#define OP_PCLID_DTLS (0x0c << OP_PCLID_SHIFT) 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_ci/* 4828c2ecf20Sopenharmony_ci * ProtocolInfo selectors 4838c2ecf20Sopenharmony_ci */ 4848c2ecf20Sopenharmony_ci#define OP_PCLINFO_MASK 0xffff 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ci/* for OP_PCLID_IPSEC */ 4878c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_CIPHER_MASK 0xff00 4888c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AUTH_MASK 0x00ff 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_DES_IV64 0x0100 4918c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_DES 0x0200 4928c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_3DES 0x0300 4938c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_CBC 0x0c00 4948c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_CTR 0x0d00 4958c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_XTS 0x1600 4968c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM8 0x0e00 4978c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM12 0x0f00 4988c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM16 0x1000 4998c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM8 0x1200 5008c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM12 0x1300 5018c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM16 0x1400 5028c2ecf20Sopenharmony_ci 5038c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_NULL 0x0000 5048c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_MD5_96 0x0001 5058c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA1_96 0x0002 5068c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_AES_XCBC_MAC_96 0x0005 5078c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_MD5_128 0x0006 5088c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA1_160 0x0007 5098c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_256_128 0x000c 5108c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_384_192 0x000d 5118c2ecf20Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_512_256 0x000e 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci/* For SRTP - OP_PCLID_SRTP */ 5148c2ecf20Sopenharmony_ci#define OP_PCL_SRTP_CIPHER_MASK 0xff00 5158c2ecf20Sopenharmony_ci#define OP_PCL_SRTP_AUTH_MASK 0x00ff 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci#define OP_PCL_SRTP_AES_CTR 0x0d00 5188c2ecf20Sopenharmony_ci 5198c2ecf20Sopenharmony_ci#define OP_PCL_SRTP_HMAC_SHA1_160 0x0007 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci/* For SSL 3.0 - OP_PCLID_SSL30 */ 5228c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA 0x002f 5238c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_2 0x0030 5248c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_3 0x0031 5258c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_4 0x0032 5268c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_5 0x0033 5278c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_6 0x0034 5288c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_7 0x008c 5298c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_8 0x0090 5308c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_9 0x0094 5318c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_10 0xc004 5328c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_11 0xc009 5338c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_12 0xc00e 5348c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_13 0xc013 5358c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_14 0xc018 5368c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_15 0xc01d 5378c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_16 0xc01e 5388c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_17 0xc01f 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA 0x0035 5418c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_2 0x0036 5428c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_3 0x0037 5438c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_4 0x0038 5448c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_5 0x0039 5458c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_6 0x003a 5468c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_7 0x008d 5478c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_8 0x0091 5488c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_9 0x0095 5498c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_10 0xc005 5508c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_11 0xc00a 5518c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_12 0xc00f 5528c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_13 0xc014 5538c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_14 0xc019 5548c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_15 0xc020 5558c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_16 0xc021 5568c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_17 0xc022 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_MD5 0x0023 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA 0x001f 5618c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_2 0x008b 5628c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_3 0x008f 5638c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_4 0x0093 5648c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_5 0x000a 5658c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_6 0x000d 5668c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_7 0x0010 5678c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_8 0x0013 5688c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_9 0x0016 5698c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_10 0x001b 5708c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_11 0xc003 5718c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_12 0xc008 5728c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_13 0xc00d 5738c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_14 0xc012 5748c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_15 0xc017 5758c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_16 0xc01a 5768c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_17 0xc01b 5778c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_18 0xc01c 5788c2ecf20Sopenharmony_ci 5798c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_MD5 0x0029 5808c2ecf20Sopenharmony_ci 5818c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_MD5 0x0022 5828c2ecf20Sopenharmony_ci 5838c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA 0x0008 5848c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_2 0x000b 5858c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_3 0x000e 5868c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_4 0x0011 5878c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_5 0x0014 5888c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_6 0x0019 5898c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_7 0x0026 5908c2ecf20Sopenharmony_ci 5918c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA 0x001e 5928c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_2 0x0009 5938c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_3 0x000c 5948c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_4 0x000f 5958c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_5 0x0012 5968c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_6 0x0015 5978c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_7 0x001a 5988c2ecf20Sopenharmony_ci 5998c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5 0x0024 6008c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5_2 0x0004 6018c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5_3 0x0018 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5 0x002b 6048c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5_2 0x0003 6058c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5_3 0x0017 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA 0x0020 6088c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_2 0x008a 6098c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_3 0x008e 6108c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_4 0x0092 6118c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_5 0x0005 6128c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_6 0xc002 6138c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_7 0xc007 6148c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_8 0xc00c 6158c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_9 0xc011 6168c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_10 0xc016 6178c2ecf20Sopenharmony_ci 6188c2ecf20Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_SHA 0x0028 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci/* For TLS 1.0 - OP_PCLID_TLS10 */ 6228c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA 0x002f 6238c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_2 0x0030 6248c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_3 0x0031 6258c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_4 0x0032 6268c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_5 0x0033 6278c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_6 0x0034 6288c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_7 0x008c 6298c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_8 0x0090 6308c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_9 0x0094 6318c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_10 0xc004 6328c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_11 0xc009 6338c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_12 0xc00e 6348c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_13 0xc013 6358c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_14 0xc018 6368c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_15 0xc01d 6378c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_16 0xc01e 6388c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_17 0xc01f 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA 0x0035 6418c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_2 0x0036 6428c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_3 0x0037 6438c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_4 0x0038 6448c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_5 0x0039 6458c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_6 0x003a 6468c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_7 0x008d 6478c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_8 0x0091 6488c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_9 0x0095 6498c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_10 0xc005 6508c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_11 0xc00a 6518c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_12 0xc00f 6528c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_13 0xc014 6538c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_14 0xc019 6548c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_15 0xc020 6558c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_16 0xc021 6568c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_17 0xc022 6578c2ecf20Sopenharmony_ci 6588c2ecf20Sopenharmony_ci/* #define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0x0023 */ 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA 0x001f 6618c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_2 0x008b 6628c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_3 0x008f 6638c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_4 0x0093 6648c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_5 0x000a 6658c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_6 0x000d 6668c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_7 0x0010 6678c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_8 0x0013 6688c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_9 0x0016 6698c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_10 0x001b 6708c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_11 0xc003 6718c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_12 0xc008 6728c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_13 0xc00d 6738c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_14 0xc012 6748c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_15 0xc017 6758c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_16 0xc01a 6768c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_17 0xc01b 6778c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_18 0xc01c 6788c2ecf20Sopenharmony_ci 6798c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_MD5 0x0029 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_MD5 0x0022 6828c2ecf20Sopenharmony_ci 6838c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA 0x0008 6848c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_2 0x000b 6858c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_3 0x000e 6868c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_4 0x0011 6878c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_5 0x0014 6888c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_6 0x0019 6898c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_7 0x0026 6908c2ecf20Sopenharmony_ci 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA 0x001e 6938c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_2 0x0009 6948c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_3 0x000c 6958c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_4 0x000f 6968c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_5 0x0012 6978c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_6 0x0015 6988c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_7 0x001a 6998c2ecf20Sopenharmony_ci 7008c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5 0x0024 7018c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5_2 0x0004 7028c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5_3 0x0018 7038c2ecf20Sopenharmony_ci 7048c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5 0x002b 7058c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5_2 0x0003 7068c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5_3 0x0017 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA 0x0020 7098c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_2 0x008a 7108c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_3 0x008e 7118c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_4 0x0092 7128c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_5 0x0005 7138c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_6 0xc002 7148c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_7 0xc007 7158c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_8 0xc00c 7168c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_9 0xc011 7178c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_10 0xc016 7188c2ecf20Sopenharmony_ci 7198c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_SHA 0x0028 7208c2ecf20Sopenharmony_ci 7218c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0xff23 7228c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA160 0xff30 7238c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA224 0xff34 7248c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA256 0xff36 7258c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA384 0xff33 7268c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA512 0xff35 7278c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA160 0xff80 7288c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA224 0xff84 7298c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA256 0xff86 7308c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA384 0xff83 7318c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA512 0xff85 7328c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA160 0xff20 7338c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA224 0xff24 7348c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA256 0xff26 7358c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA384 0xff23 7368c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA512 0xff25 7378c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA160 0xff60 7388c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA224 0xff64 7398c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA256 0xff66 7408c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA384 0xff63 7418c2ecf20Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA512 0xff65 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_ci/* For TLS 1.1 - OP_PCLID_TLS11 */ 7468c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA 0x002f 7478c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_2 0x0030 7488c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_3 0x0031 7498c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_4 0x0032 7508c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_5 0x0033 7518c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_6 0x0034 7528c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_7 0x008c 7538c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_8 0x0090 7548c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_9 0x0094 7558c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_10 0xc004 7568c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_11 0xc009 7578c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_12 0xc00e 7588c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_13 0xc013 7598c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_14 0xc018 7608c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_15 0xc01d 7618c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_16 0xc01e 7628c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_17 0xc01f 7638c2ecf20Sopenharmony_ci 7648c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA 0x0035 7658c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_2 0x0036 7668c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_3 0x0037 7678c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_4 0x0038 7688c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_5 0x0039 7698c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_6 0x003a 7708c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_7 0x008d 7718c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_8 0x0091 7728c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_9 0x0095 7738c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_10 0xc005 7748c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_11 0xc00a 7758c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_12 0xc00f 7768c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_13 0xc014 7778c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_14 0xc019 7788c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_15 0xc020 7798c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_16 0xc021 7808c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_17 0xc022 7818c2ecf20Sopenharmony_ci 7828c2ecf20Sopenharmony_ci/* #define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0x0023 */ 7838c2ecf20Sopenharmony_ci 7848c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA 0x001f 7858c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_2 0x008b 7868c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_3 0x008f 7878c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_4 0x0093 7888c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_5 0x000a 7898c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_6 0x000d 7908c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_7 0x0010 7918c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_8 0x0013 7928c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_9 0x0016 7938c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_10 0x001b 7948c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_11 0xc003 7958c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_12 0xc008 7968c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_13 0xc00d 7978c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_14 0xc012 7988c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_15 0xc017 7998c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_16 0xc01a 8008c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_17 0xc01b 8018c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_18 0xc01c 8028c2ecf20Sopenharmony_ci 8038c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_MD5 0x0029 8048c2ecf20Sopenharmony_ci 8058c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_MD5 0x0022 8068c2ecf20Sopenharmony_ci 8078c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA 0x0008 8088c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_2 0x000b 8098c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_3 0x000e 8108c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_4 0x0011 8118c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_5 0x0014 8128c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_6 0x0019 8138c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_7 0x0026 8148c2ecf20Sopenharmony_ci 8158c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA 0x001e 8168c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_2 0x0009 8178c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_3 0x000c 8188c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_4 0x000f 8198c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_5 0x0012 8208c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_6 0x0015 8218c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_7 0x001a 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5 0x0024 8248c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5_2 0x0004 8258c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5_3 0x0018 8268c2ecf20Sopenharmony_ci 8278c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5 0x002b 8288c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5_2 0x0003 8298c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5_3 0x0017 8308c2ecf20Sopenharmony_ci 8318c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA 0x0020 8328c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_2 0x008a 8338c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_3 0x008e 8348c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_4 0x0092 8358c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_5 0x0005 8368c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_6 0xc002 8378c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_7 0xc007 8388c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_8 0xc00c 8398c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_9 0xc011 8408c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_10 0xc016 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_SHA 0x0028 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0xff23 8458c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA160 0xff30 8468c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA224 0xff34 8478c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA256 0xff36 8488c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA384 0xff33 8498c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA512 0xff35 8508c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA160 0xff80 8518c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA224 0xff84 8528c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA256 0xff86 8538c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA384 0xff83 8548c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA512 0xff85 8558c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA160 0xff20 8568c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA224 0xff24 8578c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA256 0xff26 8588c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA384 0xff23 8598c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA512 0xff25 8608c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA160 0xff60 8618c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA224 0xff64 8628c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA256 0xff66 8638c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA384 0xff63 8648c2ecf20Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA512 0xff65 8658c2ecf20Sopenharmony_ci 8668c2ecf20Sopenharmony_ci 8678c2ecf20Sopenharmony_ci/* For TLS 1.2 - OP_PCLID_TLS12 */ 8688c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA 0x002f 8698c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_2 0x0030 8708c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_3 0x0031 8718c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_4 0x0032 8728c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_5 0x0033 8738c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_6 0x0034 8748c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_7 0x008c 8758c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_8 0x0090 8768c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_9 0x0094 8778c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_10 0xc004 8788c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_11 0xc009 8798c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_12 0xc00e 8808c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_13 0xc013 8818c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_14 0xc018 8828c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_15 0xc01d 8838c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_16 0xc01e 8848c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_17 0xc01f 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA 0x0035 8878c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_2 0x0036 8888c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_3 0x0037 8898c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_4 0x0038 8908c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_5 0x0039 8918c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_6 0x003a 8928c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_7 0x008d 8938c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_8 0x0091 8948c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_9 0x0095 8958c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_10 0xc005 8968c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_11 0xc00a 8978c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_12 0xc00f 8988c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_13 0xc014 8998c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_14 0xc019 9008c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_15 0xc020 9018c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_16 0xc021 9028c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_17 0xc022 9038c2ecf20Sopenharmony_ci 9048c2ecf20Sopenharmony_ci/* #define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0x0023 */ 9058c2ecf20Sopenharmony_ci 9068c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA 0x001f 9078c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_2 0x008b 9088c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_3 0x008f 9098c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_4 0x0093 9108c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_5 0x000a 9118c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_6 0x000d 9128c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_7 0x0010 9138c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_8 0x0013 9148c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_9 0x0016 9158c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_10 0x001b 9168c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_11 0xc003 9178c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_12 0xc008 9188c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_13 0xc00d 9198c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_14 0xc012 9208c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_15 0xc017 9218c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_16 0xc01a 9228c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_17 0xc01b 9238c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_18 0xc01c 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_MD5 0x0029 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_MD5 0x0022 9288c2ecf20Sopenharmony_ci 9298c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA 0x0008 9308c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_2 0x000b 9318c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_3 0x000e 9328c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_4 0x0011 9338c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_5 0x0014 9348c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_6 0x0019 9358c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_7 0x0026 9368c2ecf20Sopenharmony_ci 9378c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA 0x001e 9388c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_2 0x0009 9398c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_3 0x000c 9408c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_4 0x000f 9418c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_5 0x0012 9428c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_6 0x0015 9438c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_7 0x001a 9448c2ecf20Sopenharmony_ci 9458c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5 0x0024 9468c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5_2 0x0004 9478c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5_3 0x0018 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5 0x002b 9508c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5_2 0x0003 9518c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5_3 0x0017 9528c2ecf20Sopenharmony_ci 9538c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA 0x0020 9548c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_2 0x008a 9558c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_3 0x008e 9568c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_4 0x0092 9578c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_5 0x0005 9588c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_6 0xc002 9598c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_7 0xc007 9608c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_8 0xc00c 9618c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_9 0xc011 9628c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_10 0xc016 9638c2ecf20Sopenharmony_ci 9648c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_SHA 0x0028 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ci/* #define OP_PCL_TLS12_AES_128_CBC_SHA256 0x003c */ 9678c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_2 0x003e 9688c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_3 0x003f 9698c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_4 0x0040 9708c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_5 0x0067 9718c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_6 0x006c 9728c2ecf20Sopenharmony_ci 9738c2ecf20Sopenharmony_ci/* #define OP_PCL_TLS12_AES_256_CBC_SHA256 0x003d */ 9748c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_2 0x0068 9758c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_3 0x0069 9768c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_4 0x006a 9778c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_5 0x006b 9788c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_6 0x006d 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_ci/* AEAD_AES_xxx_CCM/GCM remain to be defined... */ 9818c2ecf20Sopenharmony_ci 9828c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0xff23 9838c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA160 0xff30 9848c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA224 0xff34 9858c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA256 0xff36 9868c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA384 0xff33 9878c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA512 0xff35 9888c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA160 0xff80 9898c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA224 0xff84 9908c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256 0xff86 9918c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA384 0xff83 9928c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA512 0xff85 9938c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA160 0xff20 9948c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA224 0xff24 9958c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA256 0xff26 9968c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA384 0xff23 9978c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA512 0xff25 9988c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA160 0xff60 9998c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA224 0xff64 10008c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256 0xff66 10018c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA384 0xff63 10028c2ecf20Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA512 0xff65 10038c2ecf20Sopenharmony_ci 10048c2ecf20Sopenharmony_ci/* For DTLS - OP_PCLID_DTLS */ 10058c2ecf20Sopenharmony_ci 10068c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA 0x002f 10078c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_2 0x0030 10088c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_3 0x0031 10098c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_4 0x0032 10108c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_5 0x0033 10118c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_6 0x0034 10128c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_7 0x008c 10138c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_8 0x0090 10148c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_9 0x0094 10158c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_10 0xc004 10168c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_11 0xc009 10178c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_12 0xc00e 10188c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_13 0xc013 10198c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_14 0xc018 10208c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_15 0xc01d 10218c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_16 0xc01e 10228c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_17 0xc01f 10238c2ecf20Sopenharmony_ci 10248c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA 0x0035 10258c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_2 0x0036 10268c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_3 0x0037 10278c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_4 0x0038 10288c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_5 0x0039 10298c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_6 0x003a 10308c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_7 0x008d 10318c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_8 0x0091 10328c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_9 0x0095 10338c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_10 0xc005 10348c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_11 0xc00a 10358c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_12 0xc00f 10368c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_13 0xc014 10378c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_14 0xc019 10388c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_15 0xc020 10398c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_16 0xc021 10408c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_17 0xc022 10418c2ecf20Sopenharmony_ci 10428c2ecf20Sopenharmony_ci/* #define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0x0023 */ 10438c2ecf20Sopenharmony_ci 10448c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA 0x001f 10458c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_2 0x008b 10468c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_3 0x008f 10478c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_4 0x0093 10488c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_5 0x000a 10498c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_6 0x000d 10508c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_7 0x0010 10518c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_8 0x0013 10528c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_9 0x0016 10538c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_10 0x001b 10548c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_11 0xc003 10558c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_12 0xc008 10568c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_13 0xc00d 10578c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_14 0xc012 10588c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_15 0xc017 10598c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_16 0xc01a 10608c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_17 0xc01b 10618c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_18 0xc01c 10628c2ecf20Sopenharmony_ci 10638c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_MD5 0x0029 10648c2ecf20Sopenharmony_ci 10658c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_MD5 0x0022 10668c2ecf20Sopenharmony_ci 10678c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA 0x0008 10688c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_2 0x000b 10698c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_3 0x000e 10708c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_4 0x0011 10718c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_5 0x0014 10728c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_6 0x0019 10738c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_7 0x0026 10748c2ecf20Sopenharmony_ci 10758c2ecf20Sopenharmony_ci 10768c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA 0x001e 10778c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_2 0x0009 10788c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_3 0x000c 10798c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_4 0x000f 10808c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_5 0x0012 10818c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_6 0x0015 10828c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_7 0x001a 10838c2ecf20Sopenharmony_ci 10848c2ecf20Sopenharmony_ci 10858c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0xff23 10868c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA160 0xff30 10878c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA224 0xff34 10888c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA256 0xff36 10898c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA384 0xff33 10908c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA512 0xff35 10918c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA160 0xff80 10928c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA224 0xff84 10938c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA256 0xff86 10948c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA384 0xff83 10958c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA512 0xff85 10968c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA160 0xff20 10978c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA224 0xff24 10988c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA256 0xff26 10998c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA384 0xff23 11008c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA512 0xff25 11018c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA160 0xff60 11028c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA224 0xff64 11038c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA256 0xff66 11048c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA384 0xff63 11058c2ecf20Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA512 0xff65 11068c2ecf20Sopenharmony_ci 11078c2ecf20Sopenharmony_ci/* 802.16 WiMAX protinfos */ 11088c2ecf20Sopenharmony_ci#define OP_PCL_WIMAX_OFDM 0x0201 11098c2ecf20Sopenharmony_ci#define OP_PCL_WIMAX_OFDMA 0x0231 11108c2ecf20Sopenharmony_ci 11118c2ecf20Sopenharmony_ci/* 802.11 WiFi protinfos */ 11128c2ecf20Sopenharmony_ci#define OP_PCL_WIFI 0xac04 11138c2ecf20Sopenharmony_ci 11148c2ecf20Sopenharmony_ci/* MacSec protinfos */ 11158c2ecf20Sopenharmony_ci#define OP_PCL_MACSEC 0x0001 11168c2ecf20Sopenharmony_ci 11178c2ecf20Sopenharmony_ci/* Derived Key Protocol (DKP) Protinfo */ 11188c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_SHIFT 14 11198c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_MASK (3 << OP_PCL_DKP_SRC_SHIFT) 11208c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_IMM (0 << OP_PCL_DKP_SRC_SHIFT) 11218c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_SEQ (1 << OP_PCL_DKP_SRC_SHIFT) 11228c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_PTR (2 << OP_PCL_DKP_SRC_SHIFT) 11238c2ecf20Sopenharmony_ci#define OP_PCL_DKP_SRC_SGF (3 << OP_PCL_DKP_SRC_SHIFT) 11248c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_SHIFT 12 11258c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_MASK (3 << OP_PCL_DKP_DST_SHIFT) 11268c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_IMM (0 << OP_PCL_DKP_DST_SHIFT) 11278c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_SEQ (1 << OP_PCL_DKP_DST_SHIFT) 11288c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_PTR (2 << OP_PCL_DKP_DST_SHIFT) 11298c2ecf20Sopenharmony_ci#define OP_PCL_DKP_DST_SGF (3 << OP_PCL_DKP_DST_SHIFT) 11308c2ecf20Sopenharmony_ci#define OP_PCL_DKP_KEY_SHIFT 0 11318c2ecf20Sopenharmony_ci#define OP_PCL_DKP_KEY_MASK (0xfff << OP_PCL_DKP_KEY_SHIFT) 11328c2ecf20Sopenharmony_ci 11338c2ecf20Sopenharmony_ci/* PKI unidirectional protocol protinfo bits */ 11348c2ecf20Sopenharmony_ci#define OP_PCL_PKPROT_TEST 0x0008 11358c2ecf20Sopenharmony_ci#define OP_PCL_PKPROT_DECRYPT 0x0004 11368c2ecf20Sopenharmony_ci#define OP_PCL_PKPROT_ECC 0x0002 11378c2ecf20Sopenharmony_ci#define OP_PCL_PKPROT_F2M 0x0001 11388c2ecf20Sopenharmony_ci 11398c2ecf20Sopenharmony_ci/* For non-protocol/alg-only op commands */ 11408c2ecf20Sopenharmony_ci#define OP_ALG_TYPE_SHIFT 24 11418c2ecf20Sopenharmony_ci#define OP_ALG_TYPE_MASK (0x7 << OP_ALG_TYPE_SHIFT) 11428c2ecf20Sopenharmony_ci#define OP_ALG_TYPE_CLASS1 (2 << OP_ALG_TYPE_SHIFT) 11438c2ecf20Sopenharmony_ci#define OP_ALG_TYPE_CLASS2 (4 << OP_ALG_TYPE_SHIFT) 11448c2ecf20Sopenharmony_ci 11458c2ecf20Sopenharmony_ci/* version register fields */ 11468c2ecf20Sopenharmony_ci#define OP_VER_CCHA_NUM 0x000000ff /* Number CCHAs instantiated */ 11478c2ecf20Sopenharmony_ci#define OP_VER_CCHA_MISC 0x0000ff00 /* CCHA Miscellaneous Information */ 11488c2ecf20Sopenharmony_ci#define OP_VER_CCHA_REV 0x00ff0000 /* CCHA Revision Number */ 11498c2ecf20Sopenharmony_ci#define OP_VER_CCHA_VID 0xff000000 /* CCHA Version ID */ 11508c2ecf20Sopenharmony_ci 11518c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHIFT 16 11528c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_MASK (0xff << OP_ALG_ALGSEL_SHIFT) 11538c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SUBMASK (0x0f << OP_ALG_ALGSEL_SHIFT) 11548c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_AES (0x10 << OP_ALG_ALGSEL_SHIFT) 11558c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_DES (0x20 << OP_ALG_ALGSEL_SHIFT) 11568c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_3DES (0x21 << OP_ALG_ALGSEL_SHIFT) 11578c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_ARC4 (0x30 << OP_ALG_ALGSEL_SHIFT) 11588c2ecf20Sopenharmony_ci#define OP_ALG_CHA_MDHA (0x40 << OP_ALG_ALGSEL_SHIFT) 11598c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_MD5 (0x40 << OP_ALG_ALGSEL_SHIFT) 11608c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHA1 (0x41 << OP_ALG_ALGSEL_SHIFT) 11618c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHA224 (0x42 << OP_ALG_ALGSEL_SHIFT) 11628c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHA256 (0x43 << OP_ALG_ALGSEL_SHIFT) 11638c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHA384 (0x44 << OP_ALG_ALGSEL_SHIFT) 11648c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SHA512 (0x45 << OP_ALG_ALGSEL_SHIFT) 11658c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_RNG (0x50 << OP_ALG_ALGSEL_SHIFT) 11668c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW (0x60 << OP_ALG_ALGSEL_SHIFT) 11678c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW_F8 (0x60 << OP_ALG_ALGSEL_SHIFT) 11688c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_KASUMI (0x70 << OP_ALG_ALGSEL_SHIFT) 11698c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_CRC (0x90 << OP_ALG_ALGSEL_SHIFT) 11708c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW_F9 (0xA0 << OP_ALG_ALGSEL_SHIFT) 11718c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_CHACHA20 (0xD0 << OP_ALG_ALGSEL_SHIFT) 11728c2ecf20Sopenharmony_ci#define OP_ALG_ALGSEL_POLY1305 (0xE0 << OP_ALG_ALGSEL_SHIFT) 11738c2ecf20Sopenharmony_ci 11748c2ecf20Sopenharmony_ci#define OP_ALG_AAI_SHIFT 4 11758c2ecf20Sopenharmony_ci#define OP_ALG_AAI_MASK (0x1ff << OP_ALG_AAI_SHIFT) 11768c2ecf20Sopenharmony_ci 11778c2ecf20Sopenharmony_ci/* blockcipher AAI set */ 11788c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD128 (0x00 << OP_ALG_AAI_SHIFT) 11798c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD8 (0x01 << OP_ALG_AAI_SHIFT) 11808c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD16 (0x02 << OP_ALG_AAI_SHIFT) 11818c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD24 (0x03 << OP_ALG_AAI_SHIFT) 11828c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD32 (0x04 << OP_ALG_AAI_SHIFT) 11838c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD40 (0x05 << OP_ALG_AAI_SHIFT) 11848c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD48 (0x06 << OP_ALG_AAI_SHIFT) 11858c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD56 (0x07 << OP_ALG_AAI_SHIFT) 11868c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD64 (0x08 << OP_ALG_AAI_SHIFT) 11878c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD72 (0x09 << OP_ALG_AAI_SHIFT) 11888c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD80 (0x0a << OP_ALG_AAI_SHIFT) 11898c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD88 (0x0b << OP_ALG_AAI_SHIFT) 11908c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD96 (0x0c << OP_ALG_AAI_SHIFT) 11918c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD104 (0x0d << OP_ALG_AAI_SHIFT) 11928c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD112 (0x0e << OP_ALG_AAI_SHIFT) 11938c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD120 (0x0f << OP_ALG_AAI_SHIFT) 11948c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CBC (0x10 << OP_ALG_AAI_SHIFT) 11958c2ecf20Sopenharmony_ci#define OP_ALG_AAI_ECB (0x20 << OP_ALG_AAI_SHIFT) 11968c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CFB (0x30 << OP_ALG_AAI_SHIFT) 11978c2ecf20Sopenharmony_ci#define OP_ALG_AAI_OFB (0x40 << OP_ALG_AAI_SHIFT) 11988c2ecf20Sopenharmony_ci#define OP_ALG_AAI_XTS (0x50 << OP_ALG_AAI_SHIFT) 11998c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CMAC (0x60 << OP_ALG_AAI_SHIFT) 12008c2ecf20Sopenharmony_ci#define OP_ALG_AAI_XCBC_MAC (0x70 << OP_ALG_AAI_SHIFT) 12018c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CCM (0x80 << OP_ALG_AAI_SHIFT) 12028c2ecf20Sopenharmony_ci#define OP_ALG_AAI_GCM (0x90 << OP_ALG_AAI_SHIFT) 12038c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CBC_XCBCMAC (0xa0 << OP_ALG_AAI_SHIFT) 12048c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CTR_XCBCMAC (0xb0 << OP_ALG_AAI_SHIFT) 12058c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CHECKODD (0x80 << OP_ALG_AAI_SHIFT) 12068c2ecf20Sopenharmony_ci#define OP_ALG_AAI_DK (0x100 << OP_ALG_AAI_SHIFT) 12078c2ecf20Sopenharmony_ci 12088c2ecf20Sopenharmony_ci/* randomizer AAI set */ 12098c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG (0x00 << OP_ALG_AAI_SHIFT) 12108c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG_NZB (0x10 << OP_ALG_AAI_SHIFT) 12118c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG_OBP (0x20 << OP_ALG_AAI_SHIFT) 12128c2ecf20Sopenharmony_ci 12138c2ecf20Sopenharmony_ci/* RNG4 AAI set */ 12148c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG4_SH_0 (0x00 << OP_ALG_AAI_SHIFT) 12158c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG4_SH_1 (0x01 << OP_ALG_AAI_SHIFT) 12168c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG4_PS (0x40 << OP_ALG_AAI_SHIFT) 12178c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG4_AI (0x80 << OP_ALG_AAI_SHIFT) 12188c2ecf20Sopenharmony_ci#define OP_ALG_AAI_RNG4_SK (0x100 << OP_ALG_AAI_SHIFT) 12198c2ecf20Sopenharmony_ci 12208c2ecf20Sopenharmony_ci/* Chacha20 AAI set */ 12218c2ecf20Sopenharmony_ci#define OP_ALG_AAI_AEAD (0x002 << OP_ALG_AAI_SHIFT) 12228c2ecf20Sopenharmony_ci#define OP_ALG_AAI_KEYSTREAM (0x001 << OP_ALG_AAI_SHIFT) 12238c2ecf20Sopenharmony_ci#define OP_ALG_AAI_BC8 (0x008 << OP_ALG_AAI_SHIFT) 12248c2ecf20Sopenharmony_ci 12258c2ecf20Sopenharmony_ci/* hmac/smac AAI set */ 12268c2ecf20Sopenharmony_ci#define OP_ALG_AAI_HASH (0x00 << OP_ALG_AAI_SHIFT) 12278c2ecf20Sopenharmony_ci#define OP_ALG_AAI_HMAC (0x01 << OP_ALG_AAI_SHIFT) 12288c2ecf20Sopenharmony_ci#define OP_ALG_AAI_SMAC (0x02 << OP_ALG_AAI_SHIFT) 12298c2ecf20Sopenharmony_ci#define OP_ALG_AAI_HMAC_PRECOMP (0x04 << OP_ALG_AAI_SHIFT) 12308c2ecf20Sopenharmony_ci 12318c2ecf20Sopenharmony_ci/* CRC AAI set*/ 12328c2ecf20Sopenharmony_ci#define OP_ALG_AAI_802 (0x01 << OP_ALG_AAI_SHIFT) 12338c2ecf20Sopenharmony_ci#define OP_ALG_AAI_3385 (0x02 << OP_ALG_AAI_SHIFT) 12348c2ecf20Sopenharmony_ci#define OP_ALG_AAI_CUST_POLY (0x04 << OP_ALG_AAI_SHIFT) 12358c2ecf20Sopenharmony_ci#define OP_ALG_AAI_DIS (0x10 << OP_ALG_AAI_SHIFT) 12368c2ecf20Sopenharmony_ci#define OP_ALG_AAI_DOS (0x20 << OP_ALG_AAI_SHIFT) 12378c2ecf20Sopenharmony_ci#define OP_ALG_AAI_DOC (0x40 << OP_ALG_AAI_SHIFT) 12388c2ecf20Sopenharmony_ci 12398c2ecf20Sopenharmony_ci/* Kasumi/SNOW AAI set */ 12408c2ecf20Sopenharmony_ci#define OP_ALG_AAI_F8 (0xc0 << OP_ALG_AAI_SHIFT) 12418c2ecf20Sopenharmony_ci#define OP_ALG_AAI_F9 (0xc8 << OP_ALG_AAI_SHIFT) 12428c2ecf20Sopenharmony_ci#define OP_ALG_AAI_GSM (0x10 << OP_ALG_AAI_SHIFT) 12438c2ecf20Sopenharmony_ci#define OP_ALG_AAI_EDGE (0x20 << OP_ALG_AAI_SHIFT) 12448c2ecf20Sopenharmony_ci 12458c2ecf20Sopenharmony_ci#define OP_ALG_AS_SHIFT 2 12468c2ecf20Sopenharmony_ci#define OP_ALG_AS_MASK (0x3 << OP_ALG_AS_SHIFT) 12478c2ecf20Sopenharmony_ci#define OP_ALG_AS_UPDATE (0 << OP_ALG_AS_SHIFT) 12488c2ecf20Sopenharmony_ci#define OP_ALG_AS_INIT (1 << OP_ALG_AS_SHIFT) 12498c2ecf20Sopenharmony_ci#define OP_ALG_AS_FINALIZE (2 << OP_ALG_AS_SHIFT) 12508c2ecf20Sopenharmony_ci#define OP_ALG_AS_INITFINAL (3 << OP_ALG_AS_SHIFT) 12518c2ecf20Sopenharmony_ci 12528c2ecf20Sopenharmony_ci#define OP_ALG_ICV_SHIFT 1 12538c2ecf20Sopenharmony_ci#define OP_ALG_ICV_MASK (1 << OP_ALG_ICV_SHIFT) 12548c2ecf20Sopenharmony_ci#define OP_ALG_ICV_OFF (0 << OP_ALG_ICV_SHIFT) 12558c2ecf20Sopenharmony_ci#define OP_ALG_ICV_ON (1 << OP_ALG_ICV_SHIFT) 12568c2ecf20Sopenharmony_ci 12578c2ecf20Sopenharmony_ci#define OP_ALG_PR_ON BIT(1) 12588c2ecf20Sopenharmony_ci 12598c2ecf20Sopenharmony_ci#define OP_ALG_DIR_SHIFT 0 12608c2ecf20Sopenharmony_ci#define OP_ALG_DIR_MASK 1 12618c2ecf20Sopenharmony_ci#define OP_ALG_DECRYPT 0 12628c2ecf20Sopenharmony_ci#define OP_ALG_ENCRYPT 1 12638c2ecf20Sopenharmony_ci 12648c2ecf20Sopenharmony_ci/* PKHA algorithm type set */ 12658c2ecf20Sopenharmony_ci#define OP_ALG_PK 0x00800000 12668c2ecf20Sopenharmony_ci#define OP_ALG_PK_FUN_MASK 0x3f /* clrmem, modmath, or cpymem */ 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci/* PKHA mode clear memory functions */ 12698c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_A_RAM 0x80000 12708c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_B_RAM 0x40000 12718c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_E_RAM 0x20000 12728c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_N_RAM 0x10000 12738c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_CLEARMEM 0x00001 12748c2ecf20Sopenharmony_ci 12758c2ecf20Sopenharmony_ci/* PKHA mode modular-arithmetic functions */ 12768c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_IN_MONTY 0x80000 12778c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_OUT_MONTY 0x40000 12788c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_F2M 0x20000 12798c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_R2_IN 0x10000 12808c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_PRJECTV 0x00800 12818c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_TIME_EQ 0x400 12828c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_OUT_B 0x000 12838c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_OUT_A 0x100 12848c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ADD 0x002 12858c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_SUB_AB 0x003 12868c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_SUB_BA 0x004 12878c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_MULT 0x005 12888c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_EXPO 0x006 12898c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_REDUCT 0x007 12908c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_INV 0x008 12918c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_ADD 0x009 12928c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_DBL 0x00a 12938c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_MULT 0x00b 12948c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_MONT_CNST 0x00c 12958c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_CRT_CNST 0x00d 12968c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_GCD 0x00e 12978c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_MOD_PRIMALITY 0x00f 12988c2ecf20Sopenharmony_ci 12998c2ecf20Sopenharmony_ci/* PKHA mode copy-memory functions */ 13008c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_SHIFT 17 13018c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_MASK (7 << OP_ALG_PKMODE_SRC_REG_SHIFT) 13028c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_SHIFT 10 13038c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_MASK (7 << OP_ALG_PKMODE_DST_REG_SHIFT) 13048c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_SHIFT 8 13058c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_MASK (3 << OP_ALG_PKMODE_SRC_SEG_SHIFT) 13068c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_SHIFT 6 13078c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_MASK (3 << OP_ALG_PKMODE_DST_SEG_SHIFT) 13088c2ecf20Sopenharmony_ci 13098c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_A (0 << OP_ALG_PKMODE_SRC_REG_SHIFT) 13108c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_B (1 << OP_ALG_PKMODE_SRC_REG_SHIFT) 13118c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_N (3 << OP_ALG_PKMODE_SRC_REG_SHIFT) 13128c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_A (0 << OP_ALG_PKMODE_DST_REG_SHIFT) 13138c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_B (1 << OP_ALG_PKMODE_DST_REG_SHIFT) 13148c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_E (2 << OP_ALG_PKMODE_DST_REG_SHIFT) 13158c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_N (3 << OP_ALG_PKMODE_DST_REG_SHIFT) 13168c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_0 (0 << OP_ALG_PKMODE_SRC_SEG_SHIFT) 13178c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_1 (1 << OP_ALG_PKMODE_SRC_SEG_SHIFT) 13188c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_2 (2 << OP_ALG_PKMODE_SRC_SEG_SHIFT) 13198c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_3 (3 << OP_ALG_PKMODE_SRC_SEG_SHIFT) 13208c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_0 (0 << OP_ALG_PKMODE_DST_SEG_SHIFT) 13218c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_1 (1 << OP_ALG_PKMODE_DST_SEG_SHIFT) 13228c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_2 (2 << OP_ALG_PKMODE_DST_SEG_SHIFT) 13238c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_3 (3 << OP_ALG_PKMODE_DST_SEG_SHIFT) 13248c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_CPYMEM_N_SZ 0x80 13258c2ecf20Sopenharmony_ci#define OP_ALG_PKMODE_CPYMEM_SRC_SZ 0x81 13268c2ecf20Sopenharmony_ci 13278c2ecf20Sopenharmony_ci/* 13288c2ecf20Sopenharmony_ci * SEQ_IN_PTR Command Constructs 13298c2ecf20Sopenharmony_ci */ 13308c2ecf20Sopenharmony_ci 13318c2ecf20Sopenharmony_ci/* Release Buffers */ 13328c2ecf20Sopenharmony_ci#define SQIN_RBS 0x04000000 13338c2ecf20Sopenharmony_ci 13348c2ecf20Sopenharmony_ci/* Sequence pointer is really a descriptor */ 13358c2ecf20Sopenharmony_ci#define SQIN_INL 0x02000000 13368c2ecf20Sopenharmony_ci 13378c2ecf20Sopenharmony_ci/* Sequence pointer is a scatter-gather table */ 13388c2ecf20Sopenharmony_ci#define SQIN_SGF 0x01000000 13398c2ecf20Sopenharmony_ci 13408c2ecf20Sopenharmony_ci/* Appends to a previous pointer */ 13418c2ecf20Sopenharmony_ci#define SQIN_PRE 0x00800000 13428c2ecf20Sopenharmony_ci 13438c2ecf20Sopenharmony_ci/* Use extended length following pointer */ 13448c2ecf20Sopenharmony_ci#define SQIN_EXT 0x00400000 13458c2ecf20Sopenharmony_ci 13468c2ecf20Sopenharmony_ci/* Restore sequence with pointer/length */ 13478c2ecf20Sopenharmony_ci#define SQIN_RTO 0x00200000 13488c2ecf20Sopenharmony_ci 13498c2ecf20Sopenharmony_ci/* Replace job descriptor */ 13508c2ecf20Sopenharmony_ci#define SQIN_RJD 0x00100000 13518c2ecf20Sopenharmony_ci 13528c2ecf20Sopenharmony_ci#define SQIN_LEN_SHIFT 0 13538c2ecf20Sopenharmony_ci#define SQIN_LEN_MASK (0xffff << SQIN_LEN_SHIFT) 13548c2ecf20Sopenharmony_ci 13558c2ecf20Sopenharmony_ci/* 13568c2ecf20Sopenharmony_ci * SEQ_OUT_PTR Command Constructs 13578c2ecf20Sopenharmony_ci */ 13588c2ecf20Sopenharmony_ci 13598c2ecf20Sopenharmony_ci/* Sequence pointer is a scatter-gather table */ 13608c2ecf20Sopenharmony_ci#define SQOUT_SGF 0x01000000 13618c2ecf20Sopenharmony_ci 13628c2ecf20Sopenharmony_ci/* Appends to a previous pointer */ 13638c2ecf20Sopenharmony_ci#define SQOUT_PRE SQIN_PRE 13648c2ecf20Sopenharmony_ci 13658c2ecf20Sopenharmony_ci/* Restore sequence with pointer/length */ 13668c2ecf20Sopenharmony_ci#define SQOUT_RTO SQIN_RTO 13678c2ecf20Sopenharmony_ci 13688c2ecf20Sopenharmony_ci/* Use extended length following pointer */ 13698c2ecf20Sopenharmony_ci#define SQOUT_EXT 0x00400000 13708c2ecf20Sopenharmony_ci 13718c2ecf20Sopenharmony_ci#define SQOUT_LEN_SHIFT 0 13728c2ecf20Sopenharmony_ci#define SQOUT_LEN_MASK (0xffff << SQOUT_LEN_SHIFT) 13738c2ecf20Sopenharmony_ci 13748c2ecf20Sopenharmony_ci 13758c2ecf20Sopenharmony_ci/* 13768c2ecf20Sopenharmony_ci * SIGNATURE Command Constructs 13778c2ecf20Sopenharmony_ci */ 13788c2ecf20Sopenharmony_ci 13798c2ecf20Sopenharmony_ci/* TYPE field is all that's relevant */ 13808c2ecf20Sopenharmony_ci#define SIGN_TYPE_SHIFT 16 13818c2ecf20Sopenharmony_ci#define SIGN_TYPE_MASK (0x0f << SIGN_TYPE_SHIFT) 13828c2ecf20Sopenharmony_ci 13838c2ecf20Sopenharmony_ci#define SIGN_TYPE_FINAL (0x00 << SIGN_TYPE_SHIFT) 13848c2ecf20Sopenharmony_ci#define SIGN_TYPE_FINAL_RESTORE (0x01 << SIGN_TYPE_SHIFT) 13858c2ecf20Sopenharmony_ci#define SIGN_TYPE_FINAL_NONZERO (0x02 << SIGN_TYPE_SHIFT) 13868c2ecf20Sopenharmony_ci#define SIGN_TYPE_IMM_2 (0x0a << SIGN_TYPE_SHIFT) 13878c2ecf20Sopenharmony_ci#define SIGN_TYPE_IMM_3 (0x0b << SIGN_TYPE_SHIFT) 13888c2ecf20Sopenharmony_ci#define SIGN_TYPE_IMM_4 (0x0c << SIGN_TYPE_SHIFT) 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_ci/* 13918c2ecf20Sopenharmony_ci * MOVE Command Constructs 13928c2ecf20Sopenharmony_ci */ 13938c2ecf20Sopenharmony_ci 13948c2ecf20Sopenharmony_ci#define MOVE_AUX_SHIFT 25 13958c2ecf20Sopenharmony_ci#define MOVE_AUX_MASK (3 << MOVE_AUX_SHIFT) 13968c2ecf20Sopenharmony_ci#define MOVE_AUX_MS (2 << MOVE_AUX_SHIFT) 13978c2ecf20Sopenharmony_ci#define MOVE_AUX_LS (1 << MOVE_AUX_SHIFT) 13988c2ecf20Sopenharmony_ci 13998c2ecf20Sopenharmony_ci#define MOVE_WAITCOMP_SHIFT 24 14008c2ecf20Sopenharmony_ci#define MOVE_WAITCOMP_MASK (1 << MOVE_WAITCOMP_SHIFT) 14018c2ecf20Sopenharmony_ci#define MOVE_WAITCOMP (1 << MOVE_WAITCOMP_SHIFT) 14028c2ecf20Sopenharmony_ci 14038c2ecf20Sopenharmony_ci#define MOVE_SRC_SHIFT 20 14048c2ecf20Sopenharmony_ci#define MOVE_SRC_MASK (0x0f << MOVE_SRC_SHIFT) 14058c2ecf20Sopenharmony_ci#define MOVE_SRC_CLASS1CTX (0x00 << MOVE_SRC_SHIFT) 14068c2ecf20Sopenharmony_ci#define MOVE_SRC_CLASS2CTX (0x01 << MOVE_SRC_SHIFT) 14078c2ecf20Sopenharmony_ci#define MOVE_SRC_OUTFIFO (0x02 << MOVE_SRC_SHIFT) 14088c2ecf20Sopenharmony_ci#define MOVE_SRC_DESCBUF (0x03 << MOVE_SRC_SHIFT) 14098c2ecf20Sopenharmony_ci#define MOVE_SRC_MATH0 (0x04 << MOVE_SRC_SHIFT) 14108c2ecf20Sopenharmony_ci#define MOVE_SRC_MATH1 (0x05 << MOVE_SRC_SHIFT) 14118c2ecf20Sopenharmony_ci#define MOVE_SRC_MATH2 (0x06 << MOVE_SRC_SHIFT) 14128c2ecf20Sopenharmony_ci#define MOVE_SRC_MATH3 (0x07 << MOVE_SRC_SHIFT) 14138c2ecf20Sopenharmony_ci#define MOVE_SRC_INFIFO (0x08 << MOVE_SRC_SHIFT) 14148c2ecf20Sopenharmony_ci#define MOVE_SRC_INFIFO_CL (0x09 << MOVE_SRC_SHIFT) 14158c2ecf20Sopenharmony_ci#define MOVE_SRC_AUX_ABLK (0x0a << MOVE_SRC_SHIFT) 14168c2ecf20Sopenharmony_ci 14178c2ecf20Sopenharmony_ci#define MOVE_DEST_SHIFT 16 14188c2ecf20Sopenharmony_ci#define MOVE_DEST_MASK (0x0f << MOVE_DEST_SHIFT) 14198c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS1CTX (0x00 << MOVE_DEST_SHIFT) 14208c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS2CTX (0x01 << MOVE_DEST_SHIFT) 14218c2ecf20Sopenharmony_ci#define MOVE_DEST_OUTFIFO (0x02 << MOVE_DEST_SHIFT) 14228c2ecf20Sopenharmony_ci#define MOVE_DEST_DESCBUF (0x03 << MOVE_DEST_SHIFT) 14238c2ecf20Sopenharmony_ci#define MOVE_DEST_MATH0 (0x04 << MOVE_DEST_SHIFT) 14248c2ecf20Sopenharmony_ci#define MOVE_DEST_MATH1 (0x05 << MOVE_DEST_SHIFT) 14258c2ecf20Sopenharmony_ci#define MOVE_DEST_MATH2 (0x06 << MOVE_DEST_SHIFT) 14268c2ecf20Sopenharmony_ci#define MOVE_DEST_MATH3 (0x07 << MOVE_DEST_SHIFT) 14278c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS1INFIFO (0x08 << MOVE_DEST_SHIFT) 14288c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS2INFIFO (0x09 << MOVE_DEST_SHIFT) 14298c2ecf20Sopenharmony_ci#define MOVE_DEST_INFIFO_NOINFO (0x0a << MOVE_DEST_SHIFT) 14308c2ecf20Sopenharmony_ci#define MOVE_DEST_PK_A (0x0c << MOVE_DEST_SHIFT) 14318c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS1KEY (0x0d << MOVE_DEST_SHIFT) 14328c2ecf20Sopenharmony_ci#define MOVE_DEST_CLASS2KEY (0x0e << MOVE_DEST_SHIFT) 14338c2ecf20Sopenharmony_ci 14348c2ecf20Sopenharmony_ci#define MOVE_OFFSET_SHIFT 8 14358c2ecf20Sopenharmony_ci#define MOVE_OFFSET_MASK (0xff << MOVE_OFFSET_SHIFT) 14368c2ecf20Sopenharmony_ci 14378c2ecf20Sopenharmony_ci#define MOVE_LEN_SHIFT 0 14388c2ecf20Sopenharmony_ci#define MOVE_LEN_MASK (0xff << MOVE_LEN_SHIFT) 14398c2ecf20Sopenharmony_ci 14408c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_SHIFT 0 14418c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_MASK (0x3 << MOVE_LEN_SHIFT) 14428c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_MATH0 (0 << MOVELEN_MRSEL_SHIFT) 14438c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_MATH1 (1 << MOVELEN_MRSEL_SHIFT) 14448c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_MATH2 (2 << MOVELEN_MRSEL_SHIFT) 14458c2ecf20Sopenharmony_ci#define MOVELEN_MRSEL_MATH3 (3 << MOVELEN_MRSEL_SHIFT) 14468c2ecf20Sopenharmony_ci 14478c2ecf20Sopenharmony_ci/* 14488c2ecf20Sopenharmony_ci * MATH Command Constructs 14498c2ecf20Sopenharmony_ci */ 14508c2ecf20Sopenharmony_ci 14518c2ecf20Sopenharmony_ci#define MATH_IFB_SHIFT 26 14528c2ecf20Sopenharmony_ci#define MATH_IFB_MASK (1 << MATH_IFB_SHIFT) 14538c2ecf20Sopenharmony_ci#define MATH_IFB (1 << MATH_IFB_SHIFT) 14548c2ecf20Sopenharmony_ci 14558c2ecf20Sopenharmony_ci#define MATH_NFU_SHIFT 25 14568c2ecf20Sopenharmony_ci#define MATH_NFU_MASK (1 << MATH_NFU_SHIFT) 14578c2ecf20Sopenharmony_ci#define MATH_NFU (1 << MATH_NFU_SHIFT) 14588c2ecf20Sopenharmony_ci 14598c2ecf20Sopenharmony_ci#define MATH_STL_SHIFT 24 14608c2ecf20Sopenharmony_ci#define MATH_STL_MASK (1 << MATH_STL_SHIFT) 14618c2ecf20Sopenharmony_ci#define MATH_STL (1 << MATH_STL_SHIFT) 14628c2ecf20Sopenharmony_ci 14638c2ecf20Sopenharmony_ci/* Function selectors */ 14648c2ecf20Sopenharmony_ci#define MATH_FUN_SHIFT 20 14658c2ecf20Sopenharmony_ci#define MATH_FUN_MASK (0x0f << MATH_FUN_SHIFT) 14668c2ecf20Sopenharmony_ci#define MATH_FUN_ADD (0x00 << MATH_FUN_SHIFT) 14678c2ecf20Sopenharmony_ci#define MATH_FUN_ADDC (0x01 << MATH_FUN_SHIFT) 14688c2ecf20Sopenharmony_ci#define MATH_FUN_SUB (0x02 << MATH_FUN_SHIFT) 14698c2ecf20Sopenharmony_ci#define MATH_FUN_SUBB (0x03 << MATH_FUN_SHIFT) 14708c2ecf20Sopenharmony_ci#define MATH_FUN_OR (0x04 << MATH_FUN_SHIFT) 14718c2ecf20Sopenharmony_ci#define MATH_FUN_AND (0x05 << MATH_FUN_SHIFT) 14728c2ecf20Sopenharmony_ci#define MATH_FUN_XOR (0x06 << MATH_FUN_SHIFT) 14738c2ecf20Sopenharmony_ci#define MATH_FUN_LSHIFT (0x07 << MATH_FUN_SHIFT) 14748c2ecf20Sopenharmony_ci#define MATH_FUN_RSHIFT (0x08 << MATH_FUN_SHIFT) 14758c2ecf20Sopenharmony_ci#define MATH_FUN_SHLD (0x09 << MATH_FUN_SHIFT) 14768c2ecf20Sopenharmony_ci#define MATH_FUN_ZBYT (0x0a << MATH_FUN_SHIFT) 14778c2ecf20Sopenharmony_ci 14788c2ecf20Sopenharmony_ci/* Source 0 selectors */ 14798c2ecf20Sopenharmony_ci#define MATH_SRC0_SHIFT 16 14808c2ecf20Sopenharmony_ci#define MATH_SRC0_MASK (0x0f << MATH_SRC0_SHIFT) 14818c2ecf20Sopenharmony_ci#define MATH_SRC0_REG0 (0x00 << MATH_SRC0_SHIFT) 14828c2ecf20Sopenharmony_ci#define MATH_SRC0_REG1 (0x01 << MATH_SRC0_SHIFT) 14838c2ecf20Sopenharmony_ci#define MATH_SRC0_REG2 (0x02 << MATH_SRC0_SHIFT) 14848c2ecf20Sopenharmony_ci#define MATH_SRC0_REG3 (0x03 << MATH_SRC0_SHIFT) 14858c2ecf20Sopenharmony_ci#define MATH_SRC0_IMM (0x04 << MATH_SRC0_SHIFT) 14868c2ecf20Sopenharmony_ci#define MATH_SRC0_DPOVRD (0x07 << MATH_SRC0_SHIFT) 14878c2ecf20Sopenharmony_ci#define MATH_SRC0_SEQINLEN (0x08 << MATH_SRC0_SHIFT) 14888c2ecf20Sopenharmony_ci#define MATH_SRC0_SEQOUTLEN (0x09 << MATH_SRC0_SHIFT) 14898c2ecf20Sopenharmony_ci#define MATH_SRC0_VARSEQINLEN (0x0a << MATH_SRC0_SHIFT) 14908c2ecf20Sopenharmony_ci#define MATH_SRC0_VARSEQOUTLEN (0x0b << MATH_SRC0_SHIFT) 14918c2ecf20Sopenharmony_ci#define MATH_SRC0_ZERO (0x0c << MATH_SRC0_SHIFT) 14928c2ecf20Sopenharmony_ci 14938c2ecf20Sopenharmony_ci/* Source 1 selectors */ 14948c2ecf20Sopenharmony_ci#define MATH_SRC1_SHIFT 12 14958c2ecf20Sopenharmony_ci#define MATH_SRC1_MASK (0x0f << MATH_SRC1_SHIFT) 14968c2ecf20Sopenharmony_ci#define MATH_SRC1_REG0 (0x00 << MATH_SRC1_SHIFT) 14978c2ecf20Sopenharmony_ci#define MATH_SRC1_REG1 (0x01 << MATH_SRC1_SHIFT) 14988c2ecf20Sopenharmony_ci#define MATH_SRC1_REG2 (0x02 << MATH_SRC1_SHIFT) 14998c2ecf20Sopenharmony_ci#define MATH_SRC1_REG3 (0x03 << MATH_SRC1_SHIFT) 15008c2ecf20Sopenharmony_ci#define MATH_SRC1_IMM (0x04 << MATH_SRC1_SHIFT) 15018c2ecf20Sopenharmony_ci#define MATH_SRC1_DPOVRD (0x07 << MATH_SRC1_SHIFT) 15028c2ecf20Sopenharmony_ci#define MATH_SRC1_INFIFO (0x0a << MATH_SRC1_SHIFT) 15038c2ecf20Sopenharmony_ci#define MATH_SRC1_OUTFIFO (0x0b << MATH_SRC1_SHIFT) 15048c2ecf20Sopenharmony_ci#define MATH_SRC1_ONE (0x0c << MATH_SRC1_SHIFT) 15058c2ecf20Sopenharmony_ci 15068c2ecf20Sopenharmony_ci/* Destination selectors */ 15078c2ecf20Sopenharmony_ci#define MATH_DEST_SHIFT 8 15088c2ecf20Sopenharmony_ci#define MATH_DEST_MASK (0x0f << MATH_DEST_SHIFT) 15098c2ecf20Sopenharmony_ci#define MATH_DEST_REG0 (0x00 << MATH_DEST_SHIFT) 15108c2ecf20Sopenharmony_ci#define MATH_DEST_REG1 (0x01 << MATH_DEST_SHIFT) 15118c2ecf20Sopenharmony_ci#define MATH_DEST_REG2 (0x02 << MATH_DEST_SHIFT) 15128c2ecf20Sopenharmony_ci#define MATH_DEST_REG3 (0x03 << MATH_DEST_SHIFT) 15138c2ecf20Sopenharmony_ci#define MATH_DEST_DPOVRD (0x07 << MATH_DEST_SHIFT) 15148c2ecf20Sopenharmony_ci#define MATH_DEST_SEQINLEN (0x08 << MATH_DEST_SHIFT) 15158c2ecf20Sopenharmony_ci#define MATH_DEST_SEQOUTLEN (0x09 << MATH_DEST_SHIFT) 15168c2ecf20Sopenharmony_ci#define MATH_DEST_VARSEQINLEN (0x0a << MATH_DEST_SHIFT) 15178c2ecf20Sopenharmony_ci#define MATH_DEST_VARSEQOUTLEN (0x0b << MATH_DEST_SHIFT) 15188c2ecf20Sopenharmony_ci#define MATH_DEST_NONE (0x0f << MATH_DEST_SHIFT) 15198c2ecf20Sopenharmony_ci 15208c2ecf20Sopenharmony_ci/* Length selectors */ 15218c2ecf20Sopenharmony_ci#define MATH_LEN_SHIFT 0 15228c2ecf20Sopenharmony_ci#define MATH_LEN_MASK (0x0f << MATH_LEN_SHIFT) 15238c2ecf20Sopenharmony_ci#define MATH_LEN_1BYTE 0x01 15248c2ecf20Sopenharmony_ci#define MATH_LEN_2BYTE 0x02 15258c2ecf20Sopenharmony_ci#define MATH_LEN_4BYTE 0x04 15268c2ecf20Sopenharmony_ci#define MATH_LEN_8BYTE 0x08 15278c2ecf20Sopenharmony_ci 15288c2ecf20Sopenharmony_ci/* 15298c2ecf20Sopenharmony_ci * JUMP Command Constructs 15308c2ecf20Sopenharmony_ci */ 15318c2ecf20Sopenharmony_ci 15328c2ecf20Sopenharmony_ci#define JUMP_CLASS_SHIFT 25 15338c2ecf20Sopenharmony_ci#define JUMP_CLASS_MASK (3 << JUMP_CLASS_SHIFT) 15348c2ecf20Sopenharmony_ci#define JUMP_CLASS_NONE 0 15358c2ecf20Sopenharmony_ci#define JUMP_CLASS_CLASS1 (1 << JUMP_CLASS_SHIFT) 15368c2ecf20Sopenharmony_ci#define JUMP_CLASS_CLASS2 (2 << JUMP_CLASS_SHIFT) 15378c2ecf20Sopenharmony_ci#define JUMP_CLASS_BOTH (3 << JUMP_CLASS_SHIFT) 15388c2ecf20Sopenharmony_ci 15398c2ecf20Sopenharmony_ci#define JUMP_JSL_SHIFT 24 15408c2ecf20Sopenharmony_ci#define JUMP_JSL_MASK (1 << JUMP_JSL_SHIFT) 15418c2ecf20Sopenharmony_ci#define JUMP_JSL (1 << JUMP_JSL_SHIFT) 15428c2ecf20Sopenharmony_ci 15438c2ecf20Sopenharmony_ci#define JUMP_TYPE_SHIFT 22 15448c2ecf20Sopenharmony_ci#define JUMP_TYPE_LOCAL (0x00 << JUMP_TYPE_SHIFT) 15458c2ecf20Sopenharmony_ci#define JUMP_TYPE_NONLOCAL (0x01 << JUMP_TYPE_SHIFT) 15468c2ecf20Sopenharmony_ci#define JUMP_TYPE_HALT (0x02 << JUMP_TYPE_SHIFT) 15478c2ecf20Sopenharmony_ci#define JUMP_TYPE_HALT_USER (0x03 << JUMP_TYPE_SHIFT) 15488c2ecf20Sopenharmony_ci 15498c2ecf20Sopenharmony_ci#define JUMP_TEST_SHIFT 16 15508c2ecf20Sopenharmony_ci#define JUMP_TEST_MASK (0x03 << JUMP_TEST_SHIFT) 15518c2ecf20Sopenharmony_ci#define JUMP_TEST_ALL (0x00 << JUMP_TEST_SHIFT) 15528c2ecf20Sopenharmony_ci#define JUMP_TEST_INVALL (0x01 << JUMP_TEST_SHIFT) 15538c2ecf20Sopenharmony_ci#define JUMP_TEST_ANY (0x02 << JUMP_TEST_SHIFT) 15548c2ecf20Sopenharmony_ci#define JUMP_TEST_INVANY (0x03 << JUMP_TEST_SHIFT) 15558c2ecf20Sopenharmony_ci 15568c2ecf20Sopenharmony_ci/* Condition codes. JSL bit is factored in */ 15578c2ecf20Sopenharmony_ci#define JUMP_COND_SHIFT 8 15588c2ecf20Sopenharmony_ci#define JUMP_COND_MASK (0x100ff << JUMP_COND_SHIFT) 15598c2ecf20Sopenharmony_ci#define JUMP_COND_PK_0 (0x80 << JUMP_COND_SHIFT) 15608c2ecf20Sopenharmony_ci#define JUMP_COND_PK_GCD_1 (0x40 << JUMP_COND_SHIFT) 15618c2ecf20Sopenharmony_ci#define JUMP_COND_PK_PRIME (0x20 << JUMP_COND_SHIFT) 15628c2ecf20Sopenharmony_ci#define JUMP_COND_MATH_N (0x08 << JUMP_COND_SHIFT) 15638c2ecf20Sopenharmony_ci#define JUMP_COND_MATH_Z (0x04 << JUMP_COND_SHIFT) 15648c2ecf20Sopenharmony_ci#define JUMP_COND_MATH_C (0x02 << JUMP_COND_SHIFT) 15658c2ecf20Sopenharmony_ci#define JUMP_COND_MATH_NV (0x01 << JUMP_COND_SHIFT) 15668c2ecf20Sopenharmony_ci 15678c2ecf20Sopenharmony_ci#define JUMP_COND_JRP ((0x80 << JUMP_COND_SHIFT) | JUMP_JSL) 15688c2ecf20Sopenharmony_ci#define JUMP_COND_SHRD ((0x40 << JUMP_COND_SHIFT) | JUMP_JSL) 15698c2ecf20Sopenharmony_ci#define JUMP_COND_SELF ((0x20 << JUMP_COND_SHIFT) | JUMP_JSL) 15708c2ecf20Sopenharmony_ci#define JUMP_COND_CALM ((0x10 << JUMP_COND_SHIFT) | JUMP_JSL) 15718c2ecf20Sopenharmony_ci#define JUMP_COND_NIP ((0x08 << JUMP_COND_SHIFT) | JUMP_JSL) 15728c2ecf20Sopenharmony_ci#define JUMP_COND_NIFP ((0x04 << JUMP_COND_SHIFT) | JUMP_JSL) 15738c2ecf20Sopenharmony_ci#define JUMP_COND_NOP ((0x02 << JUMP_COND_SHIFT) | JUMP_JSL) 15748c2ecf20Sopenharmony_ci#define JUMP_COND_NCP ((0x01 << JUMP_COND_SHIFT) | JUMP_JSL) 15758c2ecf20Sopenharmony_ci 15768c2ecf20Sopenharmony_ci#define JUMP_OFFSET_SHIFT 0 15778c2ecf20Sopenharmony_ci#define JUMP_OFFSET_MASK (0xff << JUMP_OFFSET_SHIFT) 15788c2ecf20Sopenharmony_ci 15798c2ecf20Sopenharmony_ci/* 15808c2ecf20Sopenharmony_ci * NFIFO ENTRY 15818c2ecf20Sopenharmony_ci * Data Constructs 15828c2ecf20Sopenharmony_ci * 15838c2ecf20Sopenharmony_ci */ 15848c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_SHIFT 30 15858c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_MASK (3 << NFIFOENTRY_DEST_SHIFT) 15868c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_DECO (0 << NFIFOENTRY_DEST_SHIFT) 15878c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_CLASS1 (1 << NFIFOENTRY_DEST_SHIFT) 15888c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_CLASS2 (2 << NFIFOENTRY_DEST_SHIFT) 15898c2ecf20Sopenharmony_ci#define NFIFOENTRY_DEST_BOTH (3 << NFIFOENTRY_DEST_SHIFT) 15908c2ecf20Sopenharmony_ci 15918c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC2_SHIFT 29 15928c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC2_MASK (1 << NFIFOENTRY_LC2_SHIFT) 15938c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC2 (1 << NFIFOENTRY_LC2_SHIFT) 15948c2ecf20Sopenharmony_ci 15958c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC1_SHIFT 28 15968c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC1_MASK (1 << NFIFOENTRY_LC1_SHIFT) 15978c2ecf20Sopenharmony_ci#define NFIFOENTRY_LC1 (1 << NFIFOENTRY_LC1_SHIFT) 15988c2ecf20Sopenharmony_ci 15998c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC2_SHIFT 27 16008c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC2_MASK (1 << NFIFOENTRY_FC2_SHIFT) 16018c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC2 (1 << NFIFOENTRY_FC2_SHIFT) 16028c2ecf20Sopenharmony_ci 16038c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC1_SHIFT 26 16048c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC1_MASK (1 << NFIFOENTRY_FC1_SHIFT) 16058c2ecf20Sopenharmony_ci#define NFIFOENTRY_FC1 (1 << NFIFOENTRY_FC1_SHIFT) 16068c2ecf20Sopenharmony_ci 16078c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_SHIFT 24 16088c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_MASK (3 << NFIFOENTRY_STYPE_SHIFT) 16098c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_DFIFO (0 << NFIFOENTRY_STYPE_SHIFT) 16108c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_OFIFO (1 << NFIFOENTRY_STYPE_SHIFT) 16118c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_PAD (2 << NFIFOENTRY_STYPE_SHIFT) 16128c2ecf20Sopenharmony_ci#define NFIFOENTRY_STYPE_SNOOP (3 << NFIFOENTRY_STYPE_SHIFT) 16138c2ecf20Sopenharmony_ci 16148c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_SHIFT 20 16158c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_MASK (0xF << NFIFOENTRY_DTYPE_SHIFT) 16168c2ecf20Sopenharmony_ci 16178c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_SBOX (0x0 << NFIFOENTRY_DTYPE_SHIFT) 16188c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_AAD (0x1 << NFIFOENTRY_DTYPE_SHIFT) 16198c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_IV (0x2 << NFIFOENTRY_DTYPE_SHIFT) 16208c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_SAD (0x3 << NFIFOENTRY_DTYPE_SHIFT) 16218c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_ICV (0xA << NFIFOENTRY_DTYPE_SHIFT) 16228c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_POLY (0xB << NFIFOENTRY_DTYPE_SHIFT) 16238c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_SKIP (0xE << NFIFOENTRY_DTYPE_SHIFT) 16248c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_MSG (0xF << NFIFOENTRY_DTYPE_SHIFT) 16258c2ecf20Sopenharmony_ci 16268c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A0 (0x0 << NFIFOENTRY_DTYPE_SHIFT) 16278c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A1 (0x1 << NFIFOENTRY_DTYPE_SHIFT) 16288c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A2 (0x2 << NFIFOENTRY_DTYPE_SHIFT) 16298c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A3 (0x3 << NFIFOENTRY_DTYPE_SHIFT) 16308c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B0 (0x4 << NFIFOENTRY_DTYPE_SHIFT) 16318c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B1 (0x5 << NFIFOENTRY_DTYPE_SHIFT) 16328c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B2 (0x6 << NFIFOENTRY_DTYPE_SHIFT) 16338c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B3 (0x7 << NFIFOENTRY_DTYPE_SHIFT) 16348c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_N (0x8 << NFIFOENTRY_DTYPE_SHIFT) 16358c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_E (0x9 << NFIFOENTRY_DTYPE_SHIFT) 16368c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A (0xC << NFIFOENTRY_DTYPE_SHIFT) 16378c2ecf20Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B (0xD << NFIFOENTRY_DTYPE_SHIFT) 16388c2ecf20Sopenharmony_ci 16398c2ecf20Sopenharmony_ci 16408c2ecf20Sopenharmony_ci#define NFIFOENTRY_BND_SHIFT 19 16418c2ecf20Sopenharmony_ci#define NFIFOENTRY_BND_MASK (1 << NFIFOENTRY_BND_SHIFT) 16428c2ecf20Sopenharmony_ci#define NFIFOENTRY_BND (1 << NFIFOENTRY_BND_SHIFT) 16438c2ecf20Sopenharmony_ci 16448c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_SHIFT 16 16458c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_MASK (0x7 << NFIFOENTRY_PTYPE_SHIFT) 16468c2ecf20Sopenharmony_ci 16478c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_ZEROS (0x0 << NFIFOENTRY_PTYPE_SHIFT) 16488c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NOZEROS (0x1 << NFIFOENTRY_PTYPE_SHIFT) 16498c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_INCREMENT (0x2 << NFIFOENTRY_PTYPE_SHIFT) 16508c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND (0x3 << NFIFOENTRY_PTYPE_SHIFT) 16518c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_ZEROS_NZ (0x4 << NFIFOENTRY_PTYPE_SHIFT) 16528c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NZ_LZ (0x5 << NFIFOENTRY_PTYPE_SHIFT) 16538c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_N (0x6 << NFIFOENTRY_PTYPE_SHIFT) 16548c2ecf20Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NZ_N (0x7 << NFIFOENTRY_PTYPE_SHIFT) 16558c2ecf20Sopenharmony_ci 16568c2ecf20Sopenharmony_ci#define NFIFOENTRY_OC_SHIFT 15 16578c2ecf20Sopenharmony_ci#define NFIFOENTRY_OC_MASK (1 << NFIFOENTRY_OC_SHIFT) 16588c2ecf20Sopenharmony_ci#define NFIFOENTRY_OC (1 << NFIFOENTRY_OC_SHIFT) 16598c2ecf20Sopenharmony_ci 16608c2ecf20Sopenharmony_ci#define NFIFOENTRY_AST_SHIFT 14 16618c2ecf20Sopenharmony_ci#define NFIFOENTRY_AST_MASK (1 << NFIFOENTRY_OC_SHIFT) 16628c2ecf20Sopenharmony_ci#define NFIFOENTRY_AST (1 << NFIFOENTRY_OC_SHIFT) 16638c2ecf20Sopenharmony_ci 16648c2ecf20Sopenharmony_ci#define NFIFOENTRY_BM_SHIFT 11 16658c2ecf20Sopenharmony_ci#define NFIFOENTRY_BM_MASK (1 << NFIFOENTRY_BM_SHIFT) 16668c2ecf20Sopenharmony_ci#define NFIFOENTRY_BM (1 << NFIFOENTRY_BM_SHIFT) 16678c2ecf20Sopenharmony_ci 16688c2ecf20Sopenharmony_ci#define NFIFOENTRY_PS_SHIFT 10 16698c2ecf20Sopenharmony_ci#define NFIFOENTRY_PS_MASK (1 << NFIFOENTRY_PS_SHIFT) 16708c2ecf20Sopenharmony_ci#define NFIFOENTRY_PS (1 << NFIFOENTRY_PS_SHIFT) 16718c2ecf20Sopenharmony_ci 16728c2ecf20Sopenharmony_ci#define NFIFOENTRY_DLEN_SHIFT 0 16738c2ecf20Sopenharmony_ci#define NFIFOENTRY_DLEN_MASK (0xFFF << NFIFOENTRY_DLEN_SHIFT) 16748c2ecf20Sopenharmony_ci 16758c2ecf20Sopenharmony_ci#define NFIFOENTRY_PLEN_SHIFT 0 16768c2ecf20Sopenharmony_ci#define NFIFOENTRY_PLEN_MASK (0xFF << NFIFOENTRY_PLEN_SHIFT) 16778c2ecf20Sopenharmony_ci 16788c2ecf20Sopenharmony_ci/* Append Load Immediate Command */ 16798c2ecf20Sopenharmony_ci#define FD_CMD_APPEND_LOAD_IMMEDIATE 0x80000000 16808c2ecf20Sopenharmony_ci 16818c2ecf20Sopenharmony_ci/* Set SEQ LIODN equal to the Non-SEQ LIODN for the job */ 16828c2ecf20Sopenharmony_ci#define FD_CMD_SET_SEQ_LIODN_EQUAL_NONSEQ_LIODN 0x40000000 16838c2ecf20Sopenharmony_ci 16848c2ecf20Sopenharmony_ci/* Frame Descriptor Command for Replacement Job Descriptor */ 16858c2ecf20Sopenharmony_ci#define FD_CMD_REPLACE_JOB_DESC 0x20000000 16868c2ecf20Sopenharmony_ci 16878c2ecf20Sopenharmony_ci#endif /* DESC_H */ 1688