Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1 | /* |
| 2 | * CAAM descriptor composition header |
| 3 | * Definitions to support CAAM descriptor instruction generation |
| 4 | * |
| 5 | * Copyright 2008-2011 Freescale Semiconductor, Inc. |
| 6 | */ |
| 7 | |
| 8 | #ifndef DESC_H |
| 9 | #define DESC_H |
| 10 | |
Yuan Kang | a299c83 | 2012-06-22 19:48:46 -0500 | [diff] [blame] | 11 | struct sec4_sg_entry { |
Yuan Kang | 4c1ec1f | 2012-06-22 19:48:45 -0500 | [diff] [blame] | 12 | u64 ptr; |
Yuan Kang | a299c83 | 2012-06-22 19:48:46 -0500 | [diff] [blame] | 13 | #define SEC4_SG_LEN_FIN 0x40000000 |
| 14 | #define SEC4_SG_LEN_EXT 0x80000000 |
Yuan Kang | 4c1ec1f | 2012-06-22 19:48:45 -0500 | [diff] [blame] | 15 | u32 len; |
| 16 | u8 reserved; |
| 17 | u8 buf_pool_id; |
| 18 | u16 offset; |
| 19 | }; |
| 20 | |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 21 | /* Max size of any CAAM descriptor in 32-bit words, inclusive of header */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 22 | #define MAX_CAAM_DESCSIZE 64 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 23 | |
| 24 | /* Block size of any entity covered/uncovered with a KEK/TKEK */ |
| 25 | #define KEK_BLOCKSIZE 16 |
| 26 | |
| 27 | /* |
| 28 | * Supported descriptor command types as they show up |
| 29 | * inside a descriptor command word. |
| 30 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 31 | #define CMD_SHIFT 27 |
| 32 | #define CMD_MASK 0xf8000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 33 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 34 | #define CMD_KEY (0x00 << CMD_SHIFT) |
| 35 | #define CMD_SEQ_KEY (0x01 << CMD_SHIFT) |
| 36 | #define CMD_LOAD (0x02 << CMD_SHIFT) |
| 37 | #define CMD_SEQ_LOAD (0x03 << CMD_SHIFT) |
| 38 | #define CMD_FIFO_LOAD (0x04 << CMD_SHIFT) |
| 39 | #define CMD_SEQ_FIFO_LOAD (0x05 << CMD_SHIFT) |
| 40 | #define CMD_STORE (0x0a << CMD_SHIFT) |
| 41 | #define CMD_SEQ_STORE (0x0b << CMD_SHIFT) |
| 42 | #define CMD_FIFO_STORE (0x0c << CMD_SHIFT) |
| 43 | #define CMD_SEQ_FIFO_STORE (0x0d << CMD_SHIFT) |
| 44 | #define CMD_MOVE_LEN (0x0e << CMD_SHIFT) |
| 45 | #define CMD_MOVE (0x0f << CMD_SHIFT) |
| 46 | #define CMD_OPERATION (0x10 << CMD_SHIFT) |
| 47 | #define CMD_SIGNATURE (0x12 << CMD_SHIFT) |
| 48 | #define CMD_JUMP (0x14 << CMD_SHIFT) |
| 49 | #define CMD_MATH (0x15 << CMD_SHIFT) |
| 50 | #define CMD_DESC_HDR (0x16 << CMD_SHIFT) |
| 51 | #define CMD_SHARED_DESC_HDR (0x17 << CMD_SHIFT) |
| 52 | #define CMD_SEQ_IN_PTR (0x1e << CMD_SHIFT) |
| 53 | #define CMD_SEQ_OUT_PTR (0x1f << CMD_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 54 | |
| 55 | /* General-purpose class selector for all commands */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 56 | #define CLASS_SHIFT 25 |
| 57 | #define CLASS_MASK (0x03 << CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 58 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 59 | #define CLASS_NONE (0x00 << CLASS_SHIFT) |
| 60 | #define CLASS_1 (0x01 << CLASS_SHIFT) |
| 61 | #define CLASS_2 (0x02 << CLASS_SHIFT) |
| 62 | #define CLASS_BOTH (0x03 << CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 63 | |
| 64 | /* |
| 65 | * Descriptor header command constructs |
| 66 | * Covers shared, job, and trusted descriptor headers |
| 67 | */ |
| 68 | |
| 69 | /* |
| 70 | * Do Not Run - marks a descriptor inexecutable if there was |
| 71 | * a preceding error somewhere |
| 72 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 73 | #define HDR_DNR 0x01000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 74 | |
| 75 | /* |
| 76 | * ONE - should always be set. Combination of ONE (always |
| 77 | * set) and ZRO (always clear) forms an endianness sanity check |
| 78 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 79 | #define HDR_ONE 0x00800000 |
| 80 | #define HDR_ZRO 0x00008000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 81 | |
| 82 | /* Start Index or SharedDesc Length */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 83 | #define HDR_START_IDX_MASK 0x3f |
| 84 | #define HDR_START_IDX_SHIFT 16 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 85 | |
| 86 | /* If shared descriptor header, 6-bit length */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 87 | #define HDR_DESCLEN_SHR_MASK 0x3f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 88 | |
| 89 | /* If non-shared header, 7-bit length */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 90 | #define HDR_DESCLEN_MASK 0x7f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 91 | |
| 92 | /* This is a TrustedDesc (if not SharedDesc) */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 93 | #define HDR_TRUSTED 0x00004000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 94 | |
| 95 | /* Make into TrustedDesc (if not SharedDesc) */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 96 | #define HDR_MAKE_TRUSTED 0x00002000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 97 | |
| 98 | /* Save context if self-shared (if SharedDesc) */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 99 | #define HDR_SAVECTX 0x00001000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 100 | |
| 101 | /* Next item points to SharedDesc */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 102 | #define HDR_SHARED 0x00001000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 103 | |
| 104 | /* |
| 105 | * Reverse Execution Order - execute JobDesc first, then |
| 106 | * execute SharedDesc (normally SharedDesc goes first). |
| 107 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 108 | #define HDR_REVERSE 0x00000800 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 109 | |
| 110 | /* Propogate DNR property to SharedDesc */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 111 | #define HDR_PROP_DNR 0x00000800 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 112 | |
| 113 | /* JobDesc/SharedDesc share property */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 114 | #define HDR_SD_SHARE_MASK 0x03 |
| 115 | #define HDR_SD_SHARE_SHIFT 8 |
| 116 | #define HDR_JD_SHARE_MASK 0x07 |
| 117 | #define HDR_JD_SHARE_SHIFT 8 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 118 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 119 | #define HDR_SHARE_NEVER (0x00 << HDR_SD_SHARE_SHIFT) |
| 120 | #define HDR_SHARE_WAIT (0x01 << HDR_SD_SHARE_SHIFT) |
| 121 | #define HDR_SHARE_SERIAL (0x02 << HDR_SD_SHARE_SHIFT) |
| 122 | #define HDR_SHARE_ALWAYS (0x03 << HDR_SD_SHARE_SHIFT) |
| 123 | #define HDR_SHARE_DEFER (0x04 << HDR_SD_SHARE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 124 | |
| 125 | /* JobDesc/SharedDesc descriptor length */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 126 | #define HDR_JD_LENGTH_MASK 0x7f |
| 127 | #define HDR_SD_LENGTH_MASK 0x3f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 128 | |
| 129 | /* |
| 130 | * KEY/SEQ_KEY Command Constructs |
| 131 | */ |
| 132 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 133 | /* Key Destination Class: 01 = Class 1, 02 - Class 2 */ |
| 134 | #define KEY_DEST_CLASS_SHIFT 25 /* use CLASS_1 or CLASS_2 */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 135 | #define KEY_DEST_CLASS_MASK (0x03 << KEY_DEST_CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 136 | |
| 137 | /* Scatter-Gather Table/Variable Length Field */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 138 | #define KEY_SGF 0x01000000 |
| 139 | #define KEY_VLF 0x01000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 140 | |
| 141 | /* Immediate - Key follows command in the descriptor */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 142 | #define KEY_IMM 0x00800000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 143 | |
| 144 | /* |
| 145 | * Encrypted - Key is encrypted either with the KEK, or |
| 146 | * with the TDKEK if TK is set |
| 147 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 148 | #define KEY_ENC 0x00400000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 149 | |
| 150 | /* |
| 151 | * No Write Back - Do not allow key to be FIFO STOREd |
| 152 | */ |
| 153 | #define KEY_NWB 0x00200000 |
| 154 | |
| 155 | /* |
| 156 | * Enhanced Encryption of Key |
| 157 | */ |
| 158 | #define KEY_EKT 0x00100000 |
| 159 | |
| 160 | /* |
| 161 | * Encrypted with Trusted Key |
| 162 | */ |
| 163 | #define KEY_TK 0x00008000 |
| 164 | |
| 165 | /* |
| 166 | * KDEST - Key Destination: 0 - class key register, |
| 167 | * 1 - PKHA 'e', 2 - AFHA Sbox, 3 - MDHA split-key |
| 168 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 169 | #define KEY_DEST_SHIFT 16 |
| 170 | #define KEY_DEST_MASK (0x03 << KEY_DEST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 171 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 172 | #define KEY_DEST_CLASS_REG (0x00 << KEY_DEST_SHIFT) |
| 173 | #define KEY_DEST_PKHA_E (0x01 << KEY_DEST_SHIFT) |
| 174 | #define KEY_DEST_AFHA_SBOX (0x02 << KEY_DEST_SHIFT) |
| 175 | #define KEY_DEST_MDHA_SPLIT (0x03 << KEY_DEST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 176 | |
| 177 | /* Length in bytes */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 178 | #define KEY_LENGTH_MASK 0x000003ff |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 179 | |
| 180 | /* |
| 181 | * LOAD/SEQ_LOAD/STORE/SEQ_STORE Command Constructs |
| 182 | */ |
| 183 | |
| 184 | /* |
| 185 | * Load/Store Destination: 0 = class independent CCB, |
| 186 | * 1 = class 1 CCB, 2 = class 2 CCB, 3 = DECO |
| 187 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 188 | #define LDST_CLASS_SHIFT 25 |
| 189 | #define LDST_CLASS_MASK (0x03 << LDST_CLASS_SHIFT) |
| 190 | #define LDST_CLASS_IND_CCB (0x00 << LDST_CLASS_SHIFT) |
| 191 | #define LDST_CLASS_1_CCB (0x01 << LDST_CLASS_SHIFT) |
| 192 | #define LDST_CLASS_2_CCB (0x02 << LDST_CLASS_SHIFT) |
| 193 | #define LDST_CLASS_DECO (0x03 << LDST_CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 194 | |
| 195 | /* Scatter-Gather Table/Variable Length Field */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 196 | #define LDST_SGF 0x01000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 197 | #define LDST_VLF LDST_SGF |
| 198 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 199 | /* Immediate - Key follows this command in descriptor */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 200 | #define LDST_IMM_MASK 1 |
| 201 | #define LDST_IMM_SHIFT 23 |
| 202 | #define LDST_IMM (LDST_IMM_MASK << LDST_IMM_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 203 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 204 | /* SRC/DST - Destination for LOAD, Source for STORE */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 205 | #define LDST_SRCDST_SHIFT 16 |
| 206 | #define LDST_SRCDST_MASK (0x7f << LDST_SRCDST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 207 | |
| 208 | #define LDST_SRCDST_BYTE_CONTEXT (0x20 << LDST_SRCDST_SHIFT) |
| 209 | #define LDST_SRCDST_BYTE_KEY (0x40 << LDST_SRCDST_SHIFT) |
| 210 | #define LDST_SRCDST_BYTE_INFIFO (0x7c << LDST_SRCDST_SHIFT) |
| 211 | #define LDST_SRCDST_BYTE_OUTFIFO (0x7e << LDST_SRCDST_SHIFT) |
| 212 | |
| 213 | #define LDST_SRCDST_WORD_MODE_REG (0x00 << LDST_SRCDST_SHIFT) |
| 214 | #define LDST_SRCDST_WORD_KEYSZ_REG (0x01 << LDST_SRCDST_SHIFT) |
| 215 | #define LDST_SRCDST_WORD_DATASZ_REG (0x02 << LDST_SRCDST_SHIFT) |
| 216 | #define LDST_SRCDST_WORD_ICVSZ_REG (0x03 << LDST_SRCDST_SHIFT) |
| 217 | #define LDST_SRCDST_WORD_CHACTRL (0x06 << LDST_SRCDST_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 218 | #define LDST_SRCDST_WORD_DECOCTRL (0x06 << LDST_SRCDST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 219 | #define LDST_SRCDST_WORD_IRQCTRL (0x07 << LDST_SRCDST_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 220 | #define LDST_SRCDST_WORD_DECO_PCLOVRD (0x07 << LDST_SRCDST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 221 | #define LDST_SRCDST_WORD_CLRW (0x08 << LDST_SRCDST_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 222 | #define LDST_SRCDST_WORD_DECO_MATH0 (0x08 << LDST_SRCDST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 223 | #define LDST_SRCDST_WORD_STAT (0x09 << LDST_SRCDST_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 224 | #define LDST_SRCDST_WORD_DECO_MATH1 (0x09 << LDST_SRCDST_SHIFT) |
| 225 | #define LDST_SRCDST_WORD_DECO_MATH2 (0x0a << LDST_SRCDST_SHIFT) |
| 226 | #define LDST_SRCDST_WORD_DECO_AAD_SZ (0x0b << LDST_SRCDST_SHIFT) |
| 227 | #define LDST_SRCDST_WORD_DECO_MATH3 (0x0b << LDST_SRCDST_SHIFT) |
| 228 | #define LDST_SRCDST_WORD_CLASS1_ICV_SZ (0x0c << LDST_SRCDST_SHIFT) |
| 229 | #define LDST_SRCDST_WORD_ALTDS_CLASS1 (0x0f << LDST_SRCDST_SHIFT) |
| 230 | #define LDST_SRCDST_WORD_PKHA_A_SZ (0x10 << LDST_SRCDST_SHIFT) |
| 231 | #define LDST_SRCDST_WORD_PKHA_B_SZ (0x11 << LDST_SRCDST_SHIFT) |
| 232 | #define LDST_SRCDST_WORD_PKHA_N_SZ (0x12 << LDST_SRCDST_SHIFT) |
| 233 | #define LDST_SRCDST_WORD_PKHA_E_SZ (0x13 << LDST_SRCDST_SHIFT) |
| 234 | #define LDST_SRCDST_WORD_DESCBUF (0x40 << LDST_SRCDST_SHIFT) |
| 235 | #define LDST_SRCDST_WORD_INFO_FIFO (0x7a << LDST_SRCDST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 236 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 237 | /* Offset in source/destination */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 238 | #define LDST_OFFSET_SHIFT 8 |
| 239 | #define LDST_OFFSET_MASK (0xff << LDST_OFFSET_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 240 | |
| 241 | /* LDOFF definitions used when DST = LDST_SRCDST_WORD_DECOCTRL */ |
| 242 | /* These could also be shifted by LDST_OFFSET_SHIFT - this reads better */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 243 | #define LDOFF_CHG_SHARE_SHIFT 0 |
| 244 | #define LDOFF_CHG_SHARE_MASK (0x3 << LDOFF_CHG_SHARE_SHIFT) |
| 245 | #define LDOFF_CHG_SHARE_NEVER (0x1 << LDOFF_CHG_SHARE_SHIFT) |
Kim Phillips | a2ecb15 | 2011-12-12 14:59:15 -0600 | [diff] [blame] | 246 | #define LDOFF_CHG_SHARE_OK_PROP (0x2 << LDOFF_CHG_SHARE_SHIFT) |
| 247 | #define LDOFF_CHG_SHARE_OK_NO_PROP (0x3 << LDOFF_CHG_SHARE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 248 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 249 | #define LDOFF_ENABLE_AUTO_NFIFO (1 << 2) |
| 250 | #define LDOFF_DISABLE_AUTO_NFIFO (1 << 3) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 251 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 252 | #define LDOFF_CHG_NONSEQLIODN_SHIFT 4 |
| 253 | #define LDOFF_CHG_NONSEQLIODN_MASK (0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT) |
| 254 | #define LDOFF_CHG_NONSEQLIODN_SEQ (0x1 << LDOFF_CHG_NONSEQLIODN_SHIFT) |
| 255 | #define LDOFF_CHG_NONSEQLIODN_NON_SEQ (0x2 << LDOFF_CHG_NONSEQLIODN_SHIFT) |
| 256 | #define LDOFF_CHG_NONSEQLIODN_TRUSTED (0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 257 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 258 | #define LDOFF_CHG_SEQLIODN_SHIFT 6 |
| 259 | #define LDOFF_CHG_SEQLIODN_MASK (0x3 << LDOFF_CHG_SEQLIODN_SHIFT) |
| 260 | #define LDOFF_CHG_SEQLIODN_SEQ (0x1 << LDOFF_CHG_SEQLIODN_SHIFT) |
| 261 | #define LDOFF_CHG_SEQLIODN_NON_SEQ (0x2 << LDOFF_CHG_SEQLIODN_SHIFT) |
| 262 | #define LDOFF_CHG_SEQLIODN_TRUSTED (0x3 << LDOFF_CHG_SEQLIODN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 263 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 264 | /* Data length in bytes */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 265 | #define LDST_LEN_SHIFT 0 |
| 266 | #define LDST_LEN_MASK (0xff << LDST_LEN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 267 | |
| 268 | /* Special Length definitions when dst=deco-ctrl */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 269 | #define LDLEN_ENABLE_OSL_COUNT (1 << 7) |
| 270 | #define LDLEN_RST_CHA_OFIFO_PTR (1 << 6) |
| 271 | #define LDLEN_RST_OFIFO (1 << 5) |
| 272 | #define LDLEN_SET_OFIFO_OFF_VALID (1 << 4) |
| 273 | #define LDLEN_SET_OFIFO_OFF_RSVD (1 << 3) |
| 274 | #define LDLEN_SET_OFIFO_OFFSET_SHIFT 0 |
| 275 | #define LDLEN_SET_OFIFO_OFFSET_MASK (3 << LDLEN_SET_OFIFO_OFFSET_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 276 | |
| 277 | /* |
| 278 | * FIFO_LOAD/FIFO_STORE/SEQ_FIFO_LOAD/SEQ_FIFO_STORE |
| 279 | * Command Constructs |
| 280 | */ |
| 281 | |
| 282 | /* |
| 283 | * Load Destination: 0 = skip (SEQ_FIFO_LOAD only), |
| 284 | * 1 = Load for Class1, 2 = Load for Class2, 3 = Load both |
| 285 | * Store Source: 0 = normal, 1 = Class1key, 2 = Class2key |
| 286 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 287 | #define FIFOLD_CLASS_SHIFT 25 |
| 288 | #define FIFOLD_CLASS_MASK (0x03 << FIFOLD_CLASS_SHIFT) |
| 289 | #define FIFOLD_CLASS_SKIP (0x00 << FIFOLD_CLASS_SHIFT) |
| 290 | #define FIFOLD_CLASS_CLASS1 (0x01 << FIFOLD_CLASS_SHIFT) |
| 291 | #define FIFOLD_CLASS_CLASS2 (0x02 << FIFOLD_CLASS_SHIFT) |
| 292 | #define FIFOLD_CLASS_BOTH (0x03 << FIFOLD_CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 293 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 294 | #define FIFOST_CLASS_SHIFT 25 |
| 295 | #define FIFOST_CLASS_MASK (0x03 << FIFOST_CLASS_SHIFT) |
| 296 | #define FIFOST_CLASS_NORMAL (0x00 << FIFOST_CLASS_SHIFT) |
| 297 | #define FIFOST_CLASS_CLASS1KEY (0x01 << FIFOST_CLASS_SHIFT) |
| 298 | #define FIFOST_CLASS_CLASS2KEY (0x02 << FIFOST_CLASS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 299 | |
| 300 | /* |
| 301 | * Scatter-Gather Table/Variable Length Field |
| 302 | * If set for FIFO_LOAD, refers to a SG table. Within |
| 303 | * SEQ_FIFO_LOAD, is variable input sequence |
| 304 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 305 | #define FIFOLDST_SGF_SHIFT 24 |
| 306 | #define FIFOLDST_SGF_MASK (1 << FIFOLDST_SGF_SHIFT) |
| 307 | #define FIFOLDST_VLF_MASK (1 << FIFOLDST_SGF_SHIFT) |
| 308 | #define FIFOLDST_SGF (1 << FIFOLDST_SGF_SHIFT) |
| 309 | #define FIFOLDST_VLF (1 << FIFOLDST_SGF_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 310 | |
| 311 | /* Immediate - Data follows command in descriptor */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 312 | #define FIFOLD_IMM_SHIFT 23 |
| 313 | #define FIFOLD_IMM_MASK (1 << FIFOLD_IMM_SHIFT) |
| 314 | #define FIFOLD_IMM (1 << FIFOLD_IMM_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 315 | |
| 316 | /* Continue - Not the last FIFO store to come */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 317 | #define FIFOST_CONT_SHIFT 23 |
| 318 | #define FIFOST_CONT_MASK (1 << FIFOST_CONT_SHIFT) |
| 319 | #define FIFOST_CONT_MASK (1 << FIFOST_CONT_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 320 | |
| 321 | /* |
| 322 | * Extended Length - use 32-bit extended length that |
| 323 | * follows the pointer field. Illegal with IMM set |
| 324 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 325 | #define FIFOLDST_EXT_SHIFT 22 |
| 326 | #define FIFOLDST_EXT_MASK (1 << FIFOLDST_EXT_SHIFT) |
| 327 | #define FIFOLDST_EXT (1 << FIFOLDST_EXT_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 328 | |
| 329 | /* Input data type.*/ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 330 | #define FIFOLD_TYPE_SHIFT 16 |
| 331 | #define FIFOLD_CONT_TYPE_SHIFT 19 /* shift past last-flush bits */ |
| 332 | #define FIFOLD_TYPE_MASK (0x3f << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 333 | |
| 334 | /* PK types */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 335 | #define FIFOLD_TYPE_PK (0x00 << FIFOLD_TYPE_SHIFT) |
| 336 | #define FIFOLD_TYPE_PK_MASK (0x30 << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 337 | #define FIFOLD_TYPE_PK_TYPEMASK (0x0f << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 338 | #define FIFOLD_TYPE_PK_A0 (0x00 << FIFOLD_TYPE_SHIFT) |
| 339 | #define FIFOLD_TYPE_PK_A1 (0x01 << FIFOLD_TYPE_SHIFT) |
| 340 | #define FIFOLD_TYPE_PK_A2 (0x02 << FIFOLD_TYPE_SHIFT) |
| 341 | #define FIFOLD_TYPE_PK_A3 (0x03 << FIFOLD_TYPE_SHIFT) |
| 342 | #define FIFOLD_TYPE_PK_B0 (0x04 << FIFOLD_TYPE_SHIFT) |
| 343 | #define FIFOLD_TYPE_PK_B1 (0x05 << FIFOLD_TYPE_SHIFT) |
| 344 | #define FIFOLD_TYPE_PK_B2 (0x06 << FIFOLD_TYPE_SHIFT) |
| 345 | #define FIFOLD_TYPE_PK_B3 (0x07 << FIFOLD_TYPE_SHIFT) |
| 346 | #define FIFOLD_TYPE_PK_N (0x08 << FIFOLD_TYPE_SHIFT) |
| 347 | #define FIFOLD_TYPE_PK_A (0x0c << FIFOLD_TYPE_SHIFT) |
| 348 | #define FIFOLD_TYPE_PK_B (0x0d << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 349 | |
| 350 | /* Other types. Need to OR in last/flush bits as desired */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 351 | #define FIFOLD_TYPE_MSG_MASK (0x38 << FIFOLD_TYPE_SHIFT) |
| 352 | #define FIFOLD_TYPE_MSG (0x10 << FIFOLD_TYPE_SHIFT) |
| 353 | #define FIFOLD_TYPE_MSG1OUT2 (0x18 << FIFOLD_TYPE_SHIFT) |
| 354 | #define FIFOLD_TYPE_IV (0x20 << FIFOLD_TYPE_SHIFT) |
| 355 | #define FIFOLD_TYPE_BITDATA (0x28 << FIFOLD_TYPE_SHIFT) |
| 356 | #define FIFOLD_TYPE_AAD (0x30 << FIFOLD_TYPE_SHIFT) |
| 357 | #define FIFOLD_TYPE_ICV (0x38 << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 358 | |
| 359 | /* Last/Flush bits for use with "other" types above */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 360 | #define FIFOLD_TYPE_ACT_MASK (0x07 << FIFOLD_TYPE_SHIFT) |
| 361 | #define FIFOLD_TYPE_NOACTION (0x00 << FIFOLD_TYPE_SHIFT) |
| 362 | #define FIFOLD_TYPE_FLUSH1 (0x01 << FIFOLD_TYPE_SHIFT) |
| 363 | #define FIFOLD_TYPE_LAST1 (0x02 << FIFOLD_TYPE_SHIFT) |
| 364 | #define FIFOLD_TYPE_LAST2FLUSH (0x03 << FIFOLD_TYPE_SHIFT) |
| 365 | #define FIFOLD_TYPE_LAST2 (0x04 << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 366 | #define FIFOLD_TYPE_LAST2FLUSH1 (0x05 << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 367 | #define FIFOLD_TYPE_LASTBOTH (0x06 << FIFOLD_TYPE_SHIFT) |
| 368 | #define FIFOLD_TYPE_LASTBOTHFL (0x07 << FIFOLD_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 369 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 370 | #define FIFOLDST_LEN_MASK 0xffff |
| 371 | #define FIFOLDST_EXT_LEN_MASK 0xffffffff |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 372 | |
| 373 | /* Output data types */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 374 | #define FIFOST_TYPE_SHIFT 16 |
| 375 | #define FIFOST_TYPE_MASK (0x3f << FIFOST_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 376 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 377 | #define FIFOST_TYPE_PKHA_A0 (0x00 << FIFOST_TYPE_SHIFT) |
| 378 | #define FIFOST_TYPE_PKHA_A1 (0x01 << FIFOST_TYPE_SHIFT) |
| 379 | #define FIFOST_TYPE_PKHA_A2 (0x02 << FIFOST_TYPE_SHIFT) |
| 380 | #define FIFOST_TYPE_PKHA_A3 (0x03 << FIFOST_TYPE_SHIFT) |
| 381 | #define FIFOST_TYPE_PKHA_B0 (0x04 << FIFOST_TYPE_SHIFT) |
| 382 | #define FIFOST_TYPE_PKHA_B1 (0x05 << FIFOST_TYPE_SHIFT) |
| 383 | #define FIFOST_TYPE_PKHA_B2 (0x06 << FIFOST_TYPE_SHIFT) |
| 384 | #define FIFOST_TYPE_PKHA_B3 (0x07 << FIFOST_TYPE_SHIFT) |
| 385 | #define FIFOST_TYPE_PKHA_N (0x08 << FIFOST_TYPE_SHIFT) |
| 386 | #define FIFOST_TYPE_PKHA_A (0x0c << FIFOST_TYPE_SHIFT) |
| 387 | #define FIFOST_TYPE_PKHA_B (0x0d << FIFOST_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 388 | #define FIFOST_TYPE_AF_SBOX_JKEK (0x10 << FIFOST_TYPE_SHIFT) |
| 389 | #define FIFOST_TYPE_AF_SBOX_TKEK (0x21 << FIFOST_TYPE_SHIFT) |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 390 | #define FIFOST_TYPE_PKHA_E_JKEK (0x22 << FIFOST_TYPE_SHIFT) |
| 391 | #define FIFOST_TYPE_PKHA_E_TKEK (0x23 << FIFOST_TYPE_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 392 | #define FIFOST_TYPE_KEY_KEK (0x24 << FIFOST_TYPE_SHIFT) |
| 393 | #define FIFOST_TYPE_KEY_TKEK (0x25 << FIFOST_TYPE_SHIFT) |
| 394 | #define FIFOST_TYPE_SPLIT_KEK (0x26 << FIFOST_TYPE_SHIFT) |
| 395 | #define FIFOST_TYPE_SPLIT_TKEK (0x27 << FIFOST_TYPE_SHIFT) |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 396 | #define FIFOST_TYPE_OUTFIFO_KEK (0x28 << FIFOST_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 397 | #define FIFOST_TYPE_OUTFIFO_TKEK (0x29 << FIFOST_TYPE_SHIFT) |
| 398 | #define FIFOST_TYPE_MESSAGE_DATA (0x30 << FIFOST_TYPE_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 399 | #define FIFOST_TYPE_RNGSTORE (0x34 << FIFOST_TYPE_SHIFT) |
| 400 | #define FIFOST_TYPE_RNGFIFO (0x35 << FIFOST_TYPE_SHIFT) |
| 401 | #define FIFOST_TYPE_SKIP (0x3f << FIFOST_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 402 | |
| 403 | /* |
| 404 | * OPERATION Command Constructs |
| 405 | */ |
| 406 | |
| 407 | /* Operation type selectors - OP TYPE */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 408 | #define OP_TYPE_SHIFT 24 |
| 409 | #define OP_TYPE_MASK (0x07 << OP_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 410 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 411 | #define OP_TYPE_UNI_PROTOCOL (0x00 << OP_TYPE_SHIFT) |
| 412 | #define OP_TYPE_PK (0x01 << OP_TYPE_SHIFT) |
| 413 | #define OP_TYPE_CLASS1_ALG (0x02 << OP_TYPE_SHIFT) |
| 414 | #define OP_TYPE_CLASS2_ALG (0x04 << OP_TYPE_SHIFT) |
| 415 | #define OP_TYPE_DECAP_PROTOCOL (0x06 << OP_TYPE_SHIFT) |
| 416 | #define OP_TYPE_ENCAP_PROTOCOL (0x07 << OP_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 417 | |
| 418 | /* ProtocolID selectors - PROTID */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 419 | #define OP_PCLID_SHIFT 16 |
| 420 | #define OP_PCLID_MASK (0xff << 16) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 421 | |
| 422 | /* Assuming OP_TYPE = OP_TYPE_UNI_PROTOCOL */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 423 | #define OP_PCLID_IKEV1_PRF (0x01 << OP_PCLID_SHIFT) |
| 424 | #define OP_PCLID_IKEV2_PRF (0x02 << OP_PCLID_SHIFT) |
| 425 | #define OP_PCLID_SSL30_PRF (0x08 << OP_PCLID_SHIFT) |
| 426 | #define OP_PCLID_TLS10_PRF (0x09 << OP_PCLID_SHIFT) |
| 427 | #define OP_PCLID_TLS11_PRF (0x0a << OP_PCLID_SHIFT) |
| 428 | #define OP_PCLID_DTLS10_PRF (0x0c << OP_PCLID_SHIFT) |
| 429 | #define OP_PCLID_PRF (0x06 << OP_PCLID_SHIFT) |
| 430 | #define OP_PCLID_BLOB (0x0d << OP_PCLID_SHIFT) |
| 431 | #define OP_PCLID_SECRETKEY (0x11 << OP_PCLID_SHIFT) |
| 432 | #define OP_PCLID_PUBLICKEYPAIR (0x14 << OP_PCLID_SHIFT) |
| 433 | #define OP_PCLID_DSASIGN (0x15 << OP_PCLID_SHIFT) |
| 434 | #define OP_PCLID_DSAVERIFY (0x16 << OP_PCLID_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 435 | |
| 436 | /* Assuming OP_TYPE = OP_TYPE_DECAP_PROTOCOL/ENCAP_PROTOCOL */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 437 | #define OP_PCLID_IPSEC (0x01 << OP_PCLID_SHIFT) |
| 438 | #define OP_PCLID_SRTP (0x02 << OP_PCLID_SHIFT) |
| 439 | #define OP_PCLID_MACSEC (0x03 << OP_PCLID_SHIFT) |
| 440 | #define OP_PCLID_WIFI (0x04 << OP_PCLID_SHIFT) |
| 441 | #define OP_PCLID_WIMAX (0x05 << OP_PCLID_SHIFT) |
| 442 | #define OP_PCLID_SSL30 (0x08 << OP_PCLID_SHIFT) |
| 443 | #define OP_PCLID_TLS10 (0x09 << OP_PCLID_SHIFT) |
| 444 | #define OP_PCLID_TLS11 (0x0a << OP_PCLID_SHIFT) |
| 445 | #define OP_PCLID_TLS12 (0x0b << OP_PCLID_SHIFT) |
| 446 | #define OP_PCLID_DTLS (0x0c << OP_PCLID_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 447 | |
| 448 | /* |
| 449 | * ProtocolInfo selectors |
| 450 | */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 451 | #define OP_PCLINFO_MASK 0xffff |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 452 | |
| 453 | /* for OP_PCLID_IPSEC */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 454 | #define OP_PCL_IPSEC_CIPHER_MASK 0xff00 |
| 455 | #define OP_PCL_IPSEC_AUTH_MASK 0x00ff |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 456 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 457 | #define OP_PCL_IPSEC_DES_IV64 0x0100 |
| 458 | #define OP_PCL_IPSEC_DES 0x0200 |
| 459 | #define OP_PCL_IPSEC_3DES 0x0300 |
| 460 | #define OP_PCL_IPSEC_AES_CBC 0x0c00 |
| 461 | #define OP_PCL_IPSEC_AES_CTR 0x0d00 |
| 462 | #define OP_PCL_IPSEC_AES_XTS 0x1600 |
| 463 | #define OP_PCL_IPSEC_AES_CCM8 0x0e00 |
| 464 | #define OP_PCL_IPSEC_AES_CCM12 0x0f00 |
| 465 | #define OP_PCL_IPSEC_AES_CCM16 0x1000 |
| 466 | #define OP_PCL_IPSEC_AES_GCM8 0x1200 |
| 467 | #define OP_PCL_IPSEC_AES_GCM12 0x1300 |
| 468 | #define OP_PCL_IPSEC_AES_GCM16 0x1400 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 469 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 470 | #define OP_PCL_IPSEC_HMAC_NULL 0x0000 |
| 471 | #define OP_PCL_IPSEC_HMAC_MD5_96 0x0001 |
| 472 | #define OP_PCL_IPSEC_HMAC_SHA1_96 0x0002 |
| 473 | #define OP_PCL_IPSEC_AES_XCBC_MAC_96 0x0005 |
| 474 | #define OP_PCL_IPSEC_HMAC_MD5_128 0x0006 |
| 475 | #define OP_PCL_IPSEC_HMAC_SHA1_160 0x0007 |
| 476 | #define OP_PCL_IPSEC_HMAC_SHA2_256_128 0x000c |
| 477 | #define OP_PCL_IPSEC_HMAC_SHA2_384_192 0x000d |
| 478 | #define OP_PCL_IPSEC_HMAC_SHA2_512_256 0x000e |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 479 | |
| 480 | /* For SRTP - OP_PCLID_SRTP */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 481 | #define OP_PCL_SRTP_CIPHER_MASK 0xff00 |
| 482 | #define OP_PCL_SRTP_AUTH_MASK 0x00ff |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 483 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 484 | #define OP_PCL_SRTP_AES_CTR 0x0d00 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 485 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 486 | #define OP_PCL_SRTP_HMAC_SHA1_160 0x0007 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 487 | |
| 488 | /* For SSL 3.0 - OP_PCLID_SSL30 */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 489 | #define OP_PCL_SSL30_AES_128_CBC_SHA 0x002f |
| 490 | #define OP_PCL_SSL30_AES_128_CBC_SHA_2 0x0030 |
| 491 | #define OP_PCL_SSL30_AES_128_CBC_SHA_3 0x0031 |
| 492 | #define OP_PCL_SSL30_AES_128_CBC_SHA_4 0x0032 |
| 493 | #define OP_PCL_SSL30_AES_128_CBC_SHA_5 0x0033 |
| 494 | #define OP_PCL_SSL30_AES_128_CBC_SHA_6 0x0034 |
| 495 | #define OP_PCL_SSL30_AES_128_CBC_SHA_7 0x008c |
| 496 | #define OP_PCL_SSL30_AES_128_CBC_SHA_8 0x0090 |
| 497 | #define OP_PCL_SSL30_AES_128_CBC_SHA_9 0x0094 |
| 498 | #define OP_PCL_SSL30_AES_128_CBC_SHA_10 0xc004 |
| 499 | #define OP_PCL_SSL30_AES_128_CBC_SHA_11 0xc009 |
| 500 | #define OP_PCL_SSL30_AES_128_CBC_SHA_12 0xc00e |
| 501 | #define OP_PCL_SSL30_AES_128_CBC_SHA_13 0xc013 |
| 502 | #define OP_PCL_SSL30_AES_128_CBC_SHA_14 0xc018 |
| 503 | #define OP_PCL_SSL30_AES_128_CBC_SHA_15 0xc01d |
| 504 | #define OP_PCL_SSL30_AES_128_CBC_SHA_16 0xc01e |
| 505 | #define OP_PCL_SSL30_AES_128_CBC_SHA_17 0xc01f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 506 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 507 | #define OP_PCL_SSL30_AES_256_CBC_SHA 0x0035 |
| 508 | #define OP_PCL_SSL30_AES_256_CBC_SHA_2 0x0036 |
| 509 | #define OP_PCL_SSL30_AES_256_CBC_SHA_3 0x0037 |
| 510 | #define OP_PCL_SSL30_AES_256_CBC_SHA_4 0x0038 |
| 511 | #define OP_PCL_SSL30_AES_256_CBC_SHA_5 0x0039 |
| 512 | #define OP_PCL_SSL30_AES_256_CBC_SHA_6 0x003a |
| 513 | #define OP_PCL_SSL30_AES_256_CBC_SHA_7 0x008d |
| 514 | #define OP_PCL_SSL30_AES_256_CBC_SHA_8 0x0091 |
| 515 | #define OP_PCL_SSL30_AES_256_CBC_SHA_9 0x0095 |
| 516 | #define OP_PCL_SSL30_AES_256_CBC_SHA_10 0xc005 |
| 517 | #define OP_PCL_SSL30_AES_256_CBC_SHA_11 0xc00a |
| 518 | #define OP_PCL_SSL30_AES_256_CBC_SHA_12 0xc00f |
| 519 | #define OP_PCL_SSL30_AES_256_CBC_SHA_13 0xc014 |
| 520 | #define OP_PCL_SSL30_AES_256_CBC_SHA_14 0xc019 |
| 521 | #define OP_PCL_SSL30_AES_256_CBC_SHA_15 0xc020 |
| 522 | #define OP_PCL_SSL30_AES_256_CBC_SHA_16 0xc021 |
| 523 | #define OP_PCL_SSL30_AES_256_CBC_SHA_17 0xc022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 524 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 525 | #define OP_PCL_SSL30_3DES_EDE_CBC_MD5 0x0023 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 526 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 527 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA 0x001f |
| 528 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_2 0x008b |
| 529 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_3 0x008f |
| 530 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_4 0x0093 |
| 531 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_5 0x000a |
| 532 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_6 0x000d |
| 533 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_7 0x0010 |
| 534 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_8 0x0013 |
| 535 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_9 0x0016 |
| 536 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_10 0x001b |
| 537 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_11 0xc003 |
| 538 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_12 0xc008 |
| 539 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_13 0xc00d |
| 540 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_14 0xc012 |
| 541 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_15 0xc017 |
| 542 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_16 0xc01a |
| 543 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_17 0xc01b |
| 544 | #define OP_PCL_SSL30_3DES_EDE_CBC_SHA_18 0xc01c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 545 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 546 | #define OP_PCL_SSL30_DES40_CBC_MD5 0x0029 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 547 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 548 | #define OP_PCL_SSL30_DES_CBC_MD5 0x0022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 549 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 550 | #define OP_PCL_SSL30_DES40_CBC_SHA 0x0008 |
| 551 | #define OP_PCL_SSL30_DES40_CBC_SHA_2 0x000b |
| 552 | #define OP_PCL_SSL30_DES40_CBC_SHA_3 0x000e |
| 553 | #define OP_PCL_SSL30_DES40_CBC_SHA_4 0x0011 |
| 554 | #define OP_PCL_SSL30_DES40_CBC_SHA_5 0x0014 |
| 555 | #define OP_PCL_SSL30_DES40_CBC_SHA_6 0x0019 |
| 556 | #define OP_PCL_SSL30_DES40_CBC_SHA_7 0x0026 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 557 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 558 | #define OP_PCL_SSL30_DES_CBC_SHA 0x001e |
| 559 | #define OP_PCL_SSL30_DES_CBC_SHA_2 0x0009 |
| 560 | #define OP_PCL_SSL30_DES_CBC_SHA_3 0x000c |
| 561 | #define OP_PCL_SSL30_DES_CBC_SHA_4 0x000f |
| 562 | #define OP_PCL_SSL30_DES_CBC_SHA_5 0x0012 |
| 563 | #define OP_PCL_SSL30_DES_CBC_SHA_6 0x0015 |
| 564 | #define OP_PCL_SSL30_DES_CBC_SHA_7 0x001a |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 565 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 566 | #define OP_PCL_SSL30_RC4_128_MD5 0x0024 |
| 567 | #define OP_PCL_SSL30_RC4_128_MD5_2 0x0004 |
| 568 | #define OP_PCL_SSL30_RC4_128_MD5_3 0x0018 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 569 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 570 | #define OP_PCL_SSL30_RC4_40_MD5 0x002b |
| 571 | #define OP_PCL_SSL30_RC4_40_MD5_2 0x0003 |
| 572 | #define OP_PCL_SSL30_RC4_40_MD5_3 0x0017 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 573 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 574 | #define OP_PCL_SSL30_RC4_128_SHA 0x0020 |
| 575 | #define OP_PCL_SSL30_RC4_128_SHA_2 0x008a |
| 576 | #define OP_PCL_SSL30_RC4_128_SHA_3 0x008e |
| 577 | #define OP_PCL_SSL30_RC4_128_SHA_4 0x0092 |
| 578 | #define OP_PCL_SSL30_RC4_128_SHA_5 0x0005 |
| 579 | #define OP_PCL_SSL30_RC4_128_SHA_6 0xc002 |
| 580 | #define OP_PCL_SSL30_RC4_128_SHA_7 0xc007 |
| 581 | #define OP_PCL_SSL30_RC4_128_SHA_8 0xc00c |
| 582 | #define OP_PCL_SSL30_RC4_128_SHA_9 0xc011 |
| 583 | #define OP_PCL_SSL30_RC4_128_SHA_10 0xc016 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 584 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 585 | #define OP_PCL_SSL30_RC4_40_SHA 0x0028 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 586 | |
| 587 | |
| 588 | /* For TLS 1.0 - OP_PCLID_TLS10 */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 589 | #define OP_PCL_TLS10_AES_128_CBC_SHA 0x002f |
| 590 | #define OP_PCL_TLS10_AES_128_CBC_SHA_2 0x0030 |
| 591 | #define OP_PCL_TLS10_AES_128_CBC_SHA_3 0x0031 |
| 592 | #define OP_PCL_TLS10_AES_128_CBC_SHA_4 0x0032 |
| 593 | #define OP_PCL_TLS10_AES_128_CBC_SHA_5 0x0033 |
| 594 | #define OP_PCL_TLS10_AES_128_CBC_SHA_6 0x0034 |
| 595 | #define OP_PCL_TLS10_AES_128_CBC_SHA_7 0x008c |
| 596 | #define OP_PCL_TLS10_AES_128_CBC_SHA_8 0x0090 |
| 597 | #define OP_PCL_TLS10_AES_128_CBC_SHA_9 0x0094 |
| 598 | #define OP_PCL_TLS10_AES_128_CBC_SHA_10 0xc004 |
| 599 | #define OP_PCL_TLS10_AES_128_CBC_SHA_11 0xc009 |
| 600 | #define OP_PCL_TLS10_AES_128_CBC_SHA_12 0xc00e |
| 601 | #define OP_PCL_TLS10_AES_128_CBC_SHA_13 0xc013 |
| 602 | #define OP_PCL_TLS10_AES_128_CBC_SHA_14 0xc018 |
| 603 | #define OP_PCL_TLS10_AES_128_CBC_SHA_15 0xc01d |
| 604 | #define OP_PCL_TLS10_AES_128_CBC_SHA_16 0xc01e |
| 605 | #define OP_PCL_TLS10_AES_128_CBC_SHA_17 0xc01f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 606 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 607 | #define OP_PCL_TLS10_AES_256_CBC_SHA 0x0035 |
| 608 | #define OP_PCL_TLS10_AES_256_CBC_SHA_2 0x0036 |
| 609 | #define OP_PCL_TLS10_AES_256_CBC_SHA_3 0x0037 |
| 610 | #define OP_PCL_TLS10_AES_256_CBC_SHA_4 0x0038 |
| 611 | #define OP_PCL_TLS10_AES_256_CBC_SHA_5 0x0039 |
| 612 | #define OP_PCL_TLS10_AES_256_CBC_SHA_6 0x003a |
| 613 | #define OP_PCL_TLS10_AES_256_CBC_SHA_7 0x008d |
| 614 | #define OP_PCL_TLS10_AES_256_CBC_SHA_8 0x0091 |
| 615 | #define OP_PCL_TLS10_AES_256_CBC_SHA_9 0x0095 |
| 616 | #define OP_PCL_TLS10_AES_256_CBC_SHA_10 0xc005 |
| 617 | #define OP_PCL_TLS10_AES_256_CBC_SHA_11 0xc00a |
| 618 | #define OP_PCL_TLS10_AES_256_CBC_SHA_12 0xc00f |
| 619 | #define OP_PCL_TLS10_AES_256_CBC_SHA_13 0xc014 |
| 620 | #define OP_PCL_TLS10_AES_256_CBC_SHA_14 0xc019 |
| 621 | #define OP_PCL_TLS10_AES_256_CBC_SHA_15 0xc020 |
| 622 | #define OP_PCL_TLS10_AES_256_CBC_SHA_16 0xc021 |
| 623 | #define OP_PCL_TLS10_AES_256_CBC_SHA_17 0xc022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 624 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 625 | /* #define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0x0023 */ |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 626 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 627 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA 0x001f |
| 628 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_2 0x008b |
| 629 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_3 0x008f |
| 630 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_4 0x0093 |
| 631 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_5 0x000a |
| 632 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_6 0x000d |
| 633 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_7 0x0010 |
| 634 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_8 0x0013 |
| 635 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_9 0x0016 |
| 636 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_10 0x001b |
| 637 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_11 0xc003 |
| 638 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_12 0xc008 |
| 639 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_13 0xc00d |
| 640 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_14 0xc012 |
| 641 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_15 0xc017 |
| 642 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_16 0xc01a |
| 643 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_17 0xc01b |
| 644 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA_18 0xc01c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 645 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 646 | #define OP_PCL_TLS10_DES40_CBC_MD5 0x0029 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 647 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 648 | #define OP_PCL_TLS10_DES_CBC_MD5 0x0022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 649 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 650 | #define OP_PCL_TLS10_DES40_CBC_SHA 0x0008 |
| 651 | #define OP_PCL_TLS10_DES40_CBC_SHA_2 0x000b |
| 652 | #define OP_PCL_TLS10_DES40_CBC_SHA_3 0x000e |
| 653 | #define OP_PCL_TLS10_DES40_CBC_SHA_4 0x0011 |
| 654 | #define OP_PCL_TLS10_DES40_CBC_SHA_5 0x0014 |
| 655 | #define OP_PCL_TLS10_DES40_CBC_SHA_6 0x0019 |
| 656 | #define OP_PCL_TLS10_DES40_CBC_SHA_7 0x0026 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 657 | |
| 658 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 659 | #define OP_PCL_TLS10_DES_CBC_SHA 0x001e |
| 660 | #define OP_PCL_TLS10_DES_CBC_SHA_2 0x0009 |
| 661 | #define OP_PCL_TLS10_DES_CBC_SHA_3 0x000c |
| 662 | #define OP_PCL_TLS10_DES_CBC_SHA_4 0x000f |
| 663 | #define OP_PCL_TLS10_DES_CBC_SHA_5 0x0012 |
| 664 | #define OP_PCL_TLS10_DES_CBC_SHA_6 0x0015 |
| 665 | #define OP_PCL_TLS10_DES_CBC_SHA_7 0x001a |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 666 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 667 | #define OP_PCL_TLS10_RC4_128_MD5 0x0024 |
| 668 | #define OP_PCL_TLS10_RC4_128_MD5_2 0x0004 |
| 669 | #define OP_PCL_TLS10_RC4_128_MD5_3 0x0018 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 670 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 671 | #define OP_PCL_TLS10_RC4_40_MD5 0x002b |
| 672 | #define OP_PCL_TLS10_RC4_40_MD5_2 0x0003 |
| 673 | #define OP_PCL_TLS10_RC4_40_MD5_3 0x0017 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 674 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 675 | #define OP_PCL_TLS10_RC4_128_SHA 0x0020 |
| 676 | #define OP_PCL_TLS10_RC4_128_SHA_2 0x008a |
| 677 | #define OP_PCL_TLS10_RC4_128_SHA_3 0x008e |
| 678 | #define OP_PCL_TLS10_RC4_128_SHA_4 0x0092 |
| 679 | #define OP_PCL_TLS10_RC4_128_SHA_5 0x0005 |
| 680 | #define OP_PCL_TLS10_RC4_128_SHA_6 0xc002 |
| 681 | #define OP_PCL_TLS10_RC4_128_SHA_7 0xc007 |
| 682 | #define OP_PCL_TLS10_RC4_128_SHA_8 0xc00c |
| 683 | #define OP_PCL_TLS10_RC4_128_SHA_9 0xc011 |
| 684 | #define OP_PCL_TLS10_RC4_128_SHA_10 0xc016 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 685 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 686 | #define OP_PCL_TLS10_RC4_40_SHA 0x0028 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 687 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 688 | #define OP_PCL_TLS10_3DES_EDE_CBC_MD5 0xff23 |
| 689 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA160 0xff30 |
| 690 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA224 0xff34 |
| 691 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA256 0xff36 |
| 692 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA384 0xff33 |
| 693 | #define OP_PCL_TLS10_3DES_EDE_CBC_SHA512 0xff35 |
| 694 | #define OP_PCL_TLS10_AES_128_CBC_SHA160 0xff80 |
| 695 | #define OP_PCL_TLS10_AES_128_CBC_SHA224 0xff84 |
| 696 | #define OP_PCL_TLS10_AES_128_CBC_SHA256 0xff86 |
| 697 | #define OP_PCL_TLS10_AES_128_CBC_SHA384 0xff83 |
| 698 | #define OP_PCL_TLS10_AES_128_CBC_SHA512 0xff85 |
| 699 | #define OP_PCL_TLS10_AES_192_CBC_SHA160 0xff20 |
| 700 | #define OP_PCL_TLS10_AES_192_CBC_SHA224 0xff24 |
| 701 | #define OP_PCL_TLS10_AES_192_CBC_SHA256 0xff26 |
| 702 | #define OP_PCL_TLS10_AES_192_CBC_SHA384 0xff23 |
| 703 | #define OP_PCL_TLS10_AES_192_CBC_SHA512 0xff25 |
| 704 | #define OP_PCL_TLS10_AES_256_CBC_SHA160 0xff60 |
| 705 | #define OP_PCL_TLS10_AES_256_CBC_SHA224 0xff64 |
| 706 | #define OP_PCL_TLS10_AES_256_CBC_SHA256 0xff66 |
| 707 | #define OP_PCL_TLS10_AES_256_CBC_SHA384 0xff63 |
| 708 | #define OP_PCL_TLS10_AES_256_CBC_SHA512 0xff65 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 709 | |
| 710 | |
| 711 | |
| 712 | /* For TLS 1.1 - OP_PCLID_TLS11 */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 713 | #define OP_PCL_TLS11_AES_128_CBC_SHA 0x002f |
| 714 | #define OP_PCL_TLS11_AES_128_CBC_SHA_2 0x0030 |
| 715 | #define OP_PCL_TLS11_AES_128_CBC_SHA_3 0x0031 |
| 716 | #define OP_PCL_TLS11_AES_128_CBC_SHA_4 0x0032 |
| 717 | #define OP_PCL_TLS11_AES_128_CBC_SHA_5 0x0033 |
| 718 | #define OP_PCL_TLS11_AES_128_CBC_SHA_6 0x0034 |
| 719 | #define OP_PCL_TLS11_AES_128_CBC_SHA_7 0x008c |
| 720 | #define OP_PCL_TLS11_AES_128_CBC_SHA_8 0x0090 |
| 721 | #define OP_PCL_TLS11_AES_128_CBC_SHA_9 0x0094 |
| 722 | #define OP_PCL_TLS11_AES_128_CBC_SHA_10 0xc004 |
| 723 | #define OP_PCL_TLS11_AES_128_CBC_SHA_11 0xc009 |
| 724 | #define OP_PCL_TLS11_AES_128_CBC_SHA_12 0xc00e |
| 725 | #define OP_PCL_TLS11_AES_128_CBC_SHA_13 0xc013 |
| 726 | #define OP_PCL_TLS11_AES_128_CBC_SHA_14 0xc018 |
| 727 | #define OP_PCL_TLS11_AES_128_CBC_SHA_15 0xc01d |
| 728 | #define OP_PCL_TLS11_AES_128_CBC_SHA_16 0xc01e |
| 729 | #define OP_PCL_TLS11_AES_128_CBC_SHA_17 0xc01f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 730 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 731 | #define OP_PCL_TLS11_AES_256_CBC_SHA 0x0035 |
| 732 | #define OP_PCL_TLS11_AES_256_CBC_SHA_2 0x0036 |
| 733 | #define OP_PCL_TLS11_AES_256_CBC_SHA_3 0x0037 |
| 734 | #define OP_PCL_TLS11_AES_256_CBC_SHA_4 0x0038 |
| 735 | #define OP_PCL_TLS11_AES_256_CBC_SHA_5 0x0039 |
| 736 | #define OP_PCL_TLS11_AES_256_CBC_SHA_6 0x003a |
| 737 | #define OP_PCL_TLS11_AES_256_CBC_SHA_7 0x008d |
| 738 | #define OP_PCL_TLS11_AES_256_CBC_SHA_8 0x0091 |
| 739 | #define OP_PCL_TLS11_AES_256_CBC_SHA_9 0x0095 |
| 740 | #define OP_PCL_TLS11_AES_256_CBC_SHA_10 0xc005 |
| 741 | #define OP_PCL_TLS11_AES_256_CBC_SHA_11 0xc00a |
| 742 | #define OP_PCL_TLS11_AES_256_CBC_SHA_12 0xc00f |
| 743 | #define OP_PCL_TLS11_AES_256_CBC_SHA_13 0xc014 |
| 744 | #define OP_PCL_TLS11_AES_256_CBC_SHA_14 0xc019 |
| 745 | #define OP_PCL_TLS11_AES_256_CBC_SHA_15 0xc020 |
| 746 | #define OP_PCL_TLS11_AES_256_CBC_SHA_16 0xc021 |
| 747 | #define OP_PCL_TLS11_AES_256_CBC_SHA_17 0xc022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 748 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 749 | /* #define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0x0023 */ |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 750 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 751 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA 0x001f |
| 752 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_2 0x008b |
| 753 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_3 0x008f |
| 754 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_4 0x0093 |
| 755 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_5 0x000a |
| 756 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_6 0x000d |
| 757 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_7 0x0010 |
| 758 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_8 0x0013 |
| 759 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_9 0x0016 |
| 760 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_10 0x001b |
| 761 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_11 0xc003 |
| 762 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_12 0xc008 |
| 763 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_13 0xc00d |
| 764 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_14 0xc012 |
| 765 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_15 0xc017 |
| 766 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_16 0xc01a |
| 767 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_17 0xc01b |
| 768 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA_18 0xc01c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 769 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 770 | #define OP_PCL_TLS11_DES40_CBC_MD5 0x0029 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 771 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 772 | #define OP_PCL_TLS11_DES_CBC_MD5 0x0022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 773 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 774 | #define OP_PCL_TLS11_DES40_CBC_SHA 0x0008 |
| 775 | #define OP_PCL_TLS11_DES40_CBC_SHA_2 0x000b |
| 776 | #define OP_PCL_TLS11_DES40_CBC_SHA_3 0x000e |
| 777 | #define OP_PCL_TLS11_DES40_CBC_SHA_4 0x0011 |
| 778 | #define OP_PCL_TLS11_DES40_CBC_SHA_5 0x0014 |
| 779 | #define OP_PCL_TLS11_DES40_CBC_SHA_6 0x0019 |
| 780 | #define OP_PCL_TLS11_DES40_CBC_SHA_7 0x0026 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 781 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 782 | #define OP_PCL_TLS11_DES_CBC_SHA 0x001e |
| 783 | #define OP_PCL_TLS11_DES_CBC_SHA_2 0x0009 |
| 784 | #define OP_PCL_TLS11_DES_CBC_SHA_3 0x000c |
| 785 | #define OP_PCL_TLS11_DES_CBC_SHA_4 0x000f |
| 786 | #define OP_PCL_TLS11_DES_CBC_SHA_5 0x0012 |
| 787 | #define OP_PCL_TLS11_DES_CBC_SHA_6 0x0015 |
| 788 | #define OP_PCL_TLS11_DES_CBC_SHA_7 0x001a |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 789 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 790 | #define OP_PCL_TLS11_RC4_128_MD5 0x0024 |
| 791 | #define OP_PCL_TLS11_RC4_128_MD5_2 0x0004 |
| 792 | #define OP_PCL_TLS11_RC4_128_MD5_3 0x0018 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 793 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 794 | #define OP_PCL_TLS11_RC4_40_MD5 0x002b |
| 795 | #define OP_PCL_TLS11_RC4_40_MD5_2 0x0003 |
| 796 | #define OP_PCL_TLS11_RC4_40_MD5_3 0x0017 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 797 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 798 | #define OP_PCL_TLS11_RC4_128_SHA 0x0020 |
| 799 | #define OP_PCL_TLS11_RC4_128_SHA_2 0x008a |
| 800 | #define OP_PCL_TLS11_RC4_128_SHA_3 0x008e |
| 801 | #define OP_PCL_TLS11_RC4_128_SHA_4 0x0092 |
| 802 | #define OP_PCL_TLS11_RC4_128_SHA_5 0x0005 |
| 803 | #define OP_PCL_TLS11_RC4_128_SHA_6 0xc002 |
| 804 | #define OP_PCL_TLS11_RC4_128_SHA_7 0xc007 |
| 805 | #define OP_PCL_TLS11_RC4_128_SHA_8 0xc00c |
| 806 | #define OP_PCL_TLS11_RC4_128_SHA_9 0xc011 |
| 807 | #define OP_PCL_TLS11_RC4_128_SHA_10 0xc016 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 808 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 809 | #define OP_PCL_TLS11_RC4_40_SHA 0x0028 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 810 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 811 | #define OP_PCL_TLS11_3DES_EDE_CBC_MD5 0xff23 |
| 812 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA160 0xff30 |
| 813 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA224 0xff34 |
| 814 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA256 0xff36 |
| 815 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA384 0xff33 |
| 816 | #define OP_PCL_TLS11_3DES_EDE_CBC_SHA512 0xff35 |
| 817 | #define OP_PCL_TLS11_AES_128_CBC_SHA160 0xff80 |
| 818 | #define OP_PCL_TLS11_AES_128_CBC_SHA224 0xff84 |
| 819 | #define OP_PCL_TLS11_AES_128_CBC_SHA256 0xff86 |
| 820 | #define OP_PCL_TLS11_AES_128_CBC_SHA384 0xff83 |
| 821 | #define OP_PCL_TLS11_AES_128_CBC_SHA512 0xff85 |
| 822 | #define OP_PCL_TLS11_AES_192_CBC_SHA160 0xff20 |
| 823 | #define OP_PCL_TLS11_AES_192_CBC_SHA224 0xff24 |
| 824 | #define OP_PCL_TLS11_AES_192_CBC_SHA256 0xff26 |
| 825 | #define OP_PCL_TLS11_AES_192_CBC_SHA384 0xff23 |
| 826 | #define OP_PCL_TLS11_AES_192_CBC_SHA512 0xff25 |
| 827 | #define OP_PCL_TLS11_AES_256_CBC_SHA160 0xff60 |
| 828 | #define OP_PCL_TLS11_AES_256_CBC_SHA224 0xff64 |
| 829 | #define OP_PCL_TLS11_AES_256_CBC_SHA256 0xff66 |
| 830 | #define OP_PCL_TLS11_AES_256_CBC_SHA384 0xff63 |
| 831 | #define OP_PCL_TLS11_AES_256_CBC_SHA512 0xff65 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 832 | |
| 833 | |
| 834 | /* For TLS 1.2 - OP_PCLID_TLS12 */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 835 | #define OP_PCL_TLS12_AES_128_CBC_SHA 0x002f |
| 836 | #define OP_PCL_TLS12_AES_128_CBC_SHA_2 0x0030 |
| 837 | #define OP_PCL_TLS12_AES_128_CBC_SHA_3 0x0031 |
| 838 | #define OP_PCL_TLS12_AES_128_CBC_SHA_4 0x0032 |
| 839 | #define OP_PCL_TLS12_AES_128_CBC_SHA_5 0x0033 |
| 840 | #define OP_PCL_TLS12_AES_128_CBC_SHA_6 0x0034 |
| 841 | #define OP_PCL_TLS12_AES_128_CBC_SHA_7 0x008c |
| 842 | #define OP_PCL_TLS12_AES_128_CBC_SHA_8 0x0090 |
| 843 | #define OP_PCL_TLS12_AES_128_CBC_SHA_9 0x0094 |
| 844 | #define OP_PCL_TLS12_AES_128_CBC_SHA_10 0xc004 |
| 845 | #define OP_PCL_TLS12_AES_128_CBC_SHA_11 0xc009 |
| 846 | #define OP_PCL_TLS12_AES_128_CBC_SHA_12 0xc00e |
| 847 | #define OP_PCL_TLS12_AES_128_CBC_SHA_13 0xc013 |
| 848 | #define OP_PCL_TLS12_AES_128_CBC_SHA_14 0xc018 |
| 849 | #define OP_PCL_TLS12_AES_128_CBC_SHA_15 0xc01d |
| 850 | #define OP_PCL_TLS12_AES_128_CBC_SHA_16 0xc01e |
| 851 | #define OP_PCL_TLS12_AES_128_CBC_SHA_17 0xc01f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 852 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 853 | #define OP_PCL_TLS12_AES_256_CBC_SHA 0x0035 |
| 854 | #define OP_PCL_TLS12_AES_256_CBC_SHA_2 0x0036 |
| 855 | #define OP_PCL_TLS12_AES_256_CBC_SHA_3 0x0037 |
| 856 | #define OP_PCL_TLS12_AES_256_CBC_SHA_4 0x0038 |
| 857 | #define OP_PCL_TLS12_AES_256_CBC_SHA_5 0x0039 |
| 858 | #define OP_PCL_TLS12_AES_256_CBC_SHA_6 0x003a |
| 859 | #define OP_PCL_TLS12_AES_256_CBC_SHA_7 0x008d |
| 860 | #define OP_PCL_TLS12_AES_256_CBC_SHA_8 0x0091 |
| 861 | #define OP_PCL_TLS12_AES_256_CBC_SHA_9 0x0095 |
| 862 | #define OP_PCL_TLS12_AES_256_CBC_SHA_10 0xc005 |
| 863 | #define OP_PCL_TLS12_AES_256_CBC_SHA_11 0xc00a |
| 864 | #define OP_PCL_TLS12_AES_256_CBC_SHA_12 0xc00f |
| 865 | #define OP_PCL_TLS12_AES_256_CBC_SHA_13 0xc014 |
| 866 | #define OP_PCL_TLS12_AES_256_CBC_SHA_14 0xc019 |
| 867 | #define OP_PCL_TLS12_AES_256_CBC_SHA_15 0xc020 |
| 868 | #define OP_PCL_TLS12_AES_256_CBC_SHA_16 0xc021 |
| 869 | #define OP_PCL_TLS12_AES_256_CBC_SHA_17 0xc022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 870 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 871 | /* #define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0x0023 */ |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 872 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 873 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA 0x001f |
| 874 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_2 0x008b |
| 875 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_3 0x008f |
| 876 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_4 0x0093 |
| 877 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_5 0x000a |
| 878 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_6 0x000d |
| 879 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_7 0x0010 |
| 880 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_8 0x0013 |
| 881 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_9 0x0016 |
| 882 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_10 0x001b |
| 883 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_11 0xc003 |
| 884 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_12 0xc008 |
| 885 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_13 0xc00d |
| 886 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_14 0xc012 |
| 887 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_15 0xc017 |
| 888 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_16 0xc01a |
| 889 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_17 0xc01b |
| 890 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA_18 0xc01c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 891 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 892 | #define OP_PCL_TLS12_DES40_CBC_MD5 0x0029 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 893 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 894 | #define OP_PCL_TLS12_DES_CBC_MD5 0x0022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 895 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 896 | #define OP_PCL_TLS12_DES40_CBC_SHA 0x0008 |
| 897 | #define OP_PCL_TLS12_DES40_CBC_SHA_2 0x000b |
| 898 | #define OP_PCL_TLS12_DES40_CBC_SHA_3 0x000e |
| 899 | #define OP_PCL_TLS12_DES40_CBC_SHA_4 0x0011 |
| 900 | #define OP_PCL_TLS12_DES40_CBC_SHA_5 0x0014 |
| 901 | #define OP_PCL_TLS12_DES40_CBC_SHA_6 0x0019 |
| 902 | #define OP_PCL_TLS12_DES40_CBC_SHA_7 0x0026 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 903 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 904 | #define OP_PCL_TLS12_DES_CBC_SHA 0x001e |
| 905 | #define OP_PCL_TLS12_DES_CBC_SHA_2 0x0009 |
| 906 | #define OP_PCL_TLS12_DES_CBC_SHA_3 0x000c |
| 907 | #define OP_PCL_TLS12_DES_CBC_SHA_4 0x000f |
| 908 | #define OP_PCL_TLS12_DES_CBC_SHA_5 0x0012 |
| 909 | #define OP_PCL_TLS12_DES_CBC_SHA_6 0x0015 |
| 910 | #define OP_PCL_TLS12_DES_CBC_SHA_7 0x001a |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 911 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 912 | #define OP_PCL_TLS12_RC4_128_MD5 0x0024 |
| 913 | #define OP_PCL_TLS12_RC4_128_MD5_2 0x0004 |
| 914 | #define OP_PCL_TLS12_RC4_128_MD5_3 0x0018 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 915 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 916 | #define OP_PCL_TLS12_RC4_40_MD5 0x002b |
| 917 | #define OP_PCL_TLS12_RC4_40_MD5_2 0x0003 |
| 918 | #define OP_PCL_TLS12_RC4_40_MD5_3 0x0017 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 919 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 920 | #define OP_PCL_TLS12_RC4_128_SHA 0x0020 |
| 921 | #define OP_PCL_TLS12_RC4_128_SHA_2 0x008a |
| 922 | #define OP_PCL_TLS12_RC4_128_SHA_3 0x008e |
| 923 | #define OP_PCL_TLS12_RC4_128_SHA_4 0x0092 |
| 924 | #define OP_PCL_TLS12_RC4_128_SHA_5 0x0005 |
| 925 | #define OP_PCL_TLS12_RC4_128_SHA_6 0xc002 |
| 926 | #define OP_PCL_TLS12_RC4_128_SHA_7 0xc007 |
| 927 | #define OP_PCL_TLS12_RC4_128_SHA_8 0xc00c |
| 928 | #define OP_PCL_TLS12_RC4_128_SHA_9 0xc011 |
| 929 | #define OP_PCL_TLS12_RC4_128_SHA_10 0xc016 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 930 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 931 | #define OP_PCL_TLS12_RC4_40_SHA 0x0028 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 932 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 933 | /* #define OP_PCL_TLS12_AES_128_CBC_SHA256 0x003c */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 934 | #define OP_PCL_TLS12_AES_128_CBC_SHA256_2 0x003e |
| 935 | #define OP_PCL_TLS12_AES_128_CBC_SHA256_3 0x003f |
| 936 | #define OP_PCL_TLS12_AES_128_CBC_SHA256_4 0x0040 |
| 937 | #define OP_PCL_TLS12_AES_128_CBC_SHA256_5 0x0067 |
| 938 | #define OP_PCL_TLS12_AES_128_CBC_SHA256_6 0x006c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 939 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 940 | /* #define OP_PCL_TLS12_AES_256_CBC_SHA256 0x003d */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 941 | #define OP_PCL_TLS12_AES_256_CBC_SHA256_2 0x0068 |
| 942 | #define OP_PCL_TLS12_AES_256_CBC_SHA256_3 0x0069 |
| 943 | #define OP_PCL_TLS12_AES_256_CBC_SHA256_4 0x006a |
| 944 | #define OP_PCL_TLS12_AES_256_CBC_SHA256_5 0x006b |
| 945 | #define OP_PCL_TLS12_AES_256_CBC_SHA256_6 0x006d |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 946 | |
| 947 | /* AEAD_AES_xxx_CCM/GCM remain to be defined... */ |
| 948 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 949 | #define OP_PCL_TLS12_3DES_EDE_CBC_MD5 0xff23 |
| 950 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA160 0xff30 |
| 951 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA224 0xff34 |
| 952 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA256 0xff36 |
| 953 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA384 0xff33 |
| 954 | #define OP_PCL_TLS12_3DES_EDE_CBC_SHA512 0xff35 |
| 955 | #define OP_PCL_TLS12_AES_128_CBC_SHA160 0xff80 |
| 956 | #define OP_PCL_TLS12_AES_128_CBC_SHA224 0xff84 |
| 957 | #define OP_PCL_TLS12_AES_128_CBC_SHA256 0xff86 |
| 958 | #define OP_PCL_TLS12_AES_128_CBC_SHA384 0xff83 |
| 959 | #define OP_PCL_TLS12_AES_128_CBC_SHA512 0xff85 |
| 960 | #define OP_PCL_TLS12_AES_192_CBC_SHA160 0xff20 |
| 961 | #define OP_PCL_TLS12_AES_192_CBC_SHA224 0xff24 |
| 962 | #define OP_PCL_TLS12_AES_192_CBC_SHA256 0xff26 |
| 963 | #define OP_PCL_TLS12_AES_192_CBC_SHA384 0xff23 |
| 964 | #define OP_PCL_TLS12_AES_192_CBC_SHA512 0xff25 |
| 965 | #define OP_PCL_TLS12_AES_256_CBC_SHA160 0xff60 |
| 966 | #define OP_PCL_TLS12_AES_256_CBC_SHA224 0xff64 |
| 967 | #define OP_PCL_TLS12_AES_256_CBC_SHA256 0xff66 |
| 968 | #define OP_PCL_TLS12_AES_256_CBC_SHA384 0xff63 |
| 969 | #define OP_PCL_TLS12_AES_256_CBC_SHA512 0xff65 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 970 | |
| 971 | /* For DTLS - OP_PCLID_DTLS */ |
| 972 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 973 | #define OP_PCL_DTLS_AES_128_CBC_SHA 0x002f |
| 974 | #define OP_PCL_DTLS_AES_128_CBC_SHA_2 0x0030 |
| 975 | #define OP_PCL_DTLS_AES_128_CBC_SHA_3 0x0031 |
| 976 | #define OP_PCL_DTLS_AES_128_CBC_SHA_4 0x0032 |
| 977 | #define OP_PCL_DTLS_AES_128_CBC_SHA_5 0x0033 |
| 978 | #define OP_PCL_DTLS_AES_128_CBC_SHA_6 0x0034 |
| 979 | #define OP_PCL_DTLS_AES_128_CBC_SHA_7 0x008c |
| 980 | #define OP_PCL_DTLS_AES_128_CBC_SHA_8 0x0090 |
| 981 | #define OP_PCL_DTLS_AES_128_CBC_SHA_9 0x0094 |
| 982 | #define OP_PCL_DTLS_AES_128_CBC_SHA_10 0xc004 |
| 983 | #define OP_PCL_DTLS_AES_128_CBC_SHA_11 0xc009 |
| 984 | #define OP_PCL_DTLS_AES_128_CBC_SHA_12 0xc00e |
| 985 | #define OP_PCL_DTLS_AES_128_CBC_SHA_13 0xc013 |
| 986 | #define OP_PCL_DTLS_AES_128_CBC_SHA_14 0xc018 |
| 987 | #define OP_PCL_DTLS_AES_128_CBC_SHA_15 0xc01d |
| 988 | #define OP_PCL_DTLS_AES_128_CBC_SHA_16 0xc01e |
| 989 | #define OP_PCL_DTLS_AES_128_CBC_SHA_17 0xc01f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 990 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 991 | #define OP_PCL_DTLS_AES_256_CBC_SHA 0x0035 |
| 992 | #define OP_PCL_DTLS_AES_256_CBC_SHA_2 0x0036 |
| 993 | #define OP_PCL_DTLS_AES_256_CBC_SHA_3 0x0037 |
| 994 | #define OP_PCL_DTLS_AES_256_CBC_SHA_4 0x0038 |
| 995 | #define OP_PCL_DTLS_AES_256_CBC_SHA_5 0x0039 |
| 996 | #define OP_PCL_DTLS_AES_256_CBC_SHA_6 0x003a |
| 997 | #define OP_PCL_DTLS_AES_256_CBC_SHA_7 0x008d |
| 998 | #define OP_PCL_DTLS_AES_256_CBC_SHA_8 0x0091 |
| 999 | #define OP_PCL_DTLS_AES_256_CBC_SHA_9 0x0095 |
| 1000 | #define OP_PCL_DTLS_AES_256_CBC_SHA_10 0xc005 |
| 1001 | #define OP_PCL_DTLS_AES_256_CBC_SHA_11 0xc00a |
| 1002 | #define OP_PCL_DTLS_AES_256_CBC_SHA_12 0xc00f |
| 1003 | #define OP_PCL_DTLS_AES_256_CBC_SHA_13 0xc014 |
| 1004 | #define OP_PCL_DTLS_AES_256_CBC_SHA_14 0xc019 |
| 1005 | #define OP_PCL_DTLS_AES_256_CBC_SHA_15 0xc020 |
| 1006 | #define OP_PCL_DTLS_AES_256_CBC_SHA_16 0xc021 |
| 1007 | #define OP_PCL_DTLS_AES_256_CBC_SHA_17 0xc022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1008 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1009 | /* #define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0x0023 */ |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1010 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1011 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA 0x001f |
| 1012 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_2 0x008b |
| 1013 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_3 0x008f |
| 1014 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_4 0x0093 |
| 1015 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_5 0x000a |
| 1016 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_6 0x000d |
| 1017 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_7 0x0010 |
| 1018 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_8 0x0013 |
| 1019 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_9 0x0016 |
| 1020 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_10 0x001b |
| 1021 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_11 0xc003 |
| 1022 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_12 0xc008 |
| 1023 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_13 0xc00d |
| 1024 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_14 0xc012 |
| 1025 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_15 0xc017 |
| 1026 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_16 0xc01a |
| 1027 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_17 0xc01b |
| 1028 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA_18 0xc01c |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1029 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1030 | #define OP_PCL_DTLS_DES40_CBC_MD5 0x0029 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1031 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1032 | #define OP_PCL_DTLS_DES_CBC_MD5 0x0022 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1033 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1034 | #define OP_PCL_DTLS_DES40_CBC_SHA 0x0008 |
| 1035 | #define OP_PCL_DTLS_DES40_CBC_SHA_2 0x000b |
| 1036 | #define OP_PCL_DTLS_DES40_CBC_SHA_3 0x000e |
| 1037 | #define OP_PCL_DTLS_DES40_CBC_SHA_4 0x0011 |
| 1038 | #define OP_PCL_DTLS_DES40_CBC_SHA_5 0x0014 |
| 1039 | #define OP_PCL_DTLS_DES40_CBC_SHA_6 0x0019 |
| 1040 | #define OP_PCL_DTLS_DES40_CBC_SHA_7 0x0026 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1041 | |
| 1042 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1043 | #define OP_PCL_DTLS_DES_CBC_SHA 0x001e |
| 1044 | #define OP_PCL_DTLS_DES_CBC_SHA_2 0x0009 |
| 1045 | #define OP_PCL_DTLS_DES_CBC_SHA_3 0x000c |
| 1046 | #define OP_PCL_DTLS_DES_CBC_SHA_4 0x000f |
| 1047 | #define OP_PCL_DTLS_DES_CBC_SHA_5 0x0012 |
| 1048 | #define OP_PCL_DTLS_DES_CBC_SHA_6 0x0015 |
| 1049 | #define OP_PCL_DTLS_DES_CBC_SHA_7 0x001a |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1050 | |
| 1051 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1052 | #define OP_PCL_DTLS_3DES_EDE_CBC_MD5 0xff23 |
| 1053 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA160 0xff30 |
| 1054 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA224 0xff34 |
| 1055 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA256 0xff36 |
| 1056 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA384 0xff33 |
| 1057 | #define OP_PCL_DTLS_3DES_EDE_CBC_SHA512 0xff35 |
| 1058 | #define OP_PCL_DTLS_AES_128_CBC_SHA160 0xff80 |
| 1059 | #define OP_PCL_DTLS_AES_128_CBC_SHA224 0xff84 |
| 1060 | #define OP_PCL_DTLS_AES_128_CBC_SHA256 0xff86 |
| 1061 | #define OP_PCL_DTLS_AES_128_CBC_SHA384 0xff83 |
| 1062 | #define OP_PCL_DTLS_AES_128_CBC_SHA512 0xff85 |
| 1063 | #define OP_PCL_DTLS_AES_192_CBC_SHA160 0xff20 |
| 1064 | #define OP_PCL_DTLS_AES_192_CBC_SHA224 0xff24 |
| 1065 | #define OP_PCL_DTLS_AES_192_CBC_SHA256 0xff26 |
| 1066 | #define OP_PCL_DTLS_AES_192_CBC_SHA384 0xff23 |
| 1067 | #define OP_PCL_DTLS_AES_192_CBC_SHA512 0xff25 |
| 1068 | #define OP_PCL_DTLS_AES_256_CBC_SHA160 0xff60 |
| 1069 | #define OP_PCL_DTLS_AES_256_CBC_SHA224 0xff64 |
| 1070 | #define OP_PCL_DTLS_AES_256_CBC_SHA256 0xff66 |
| 1071 | #define OP_PCL_DTLS_AES_256_CBC_SHA384 0xff63 |
| 1072 | #define OP_PCL_DTLS_AES_256_CBC_SHA512 0xff65 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1073 | |
| 1074 | /* 802.16 WiMAX protinfos */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1075 | #define OP_PCL_WIMAX_OFDM 0x0201 |
| 1076 | #define OP_PCL_WIMAX_OFDMA 0x0231 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1077 | |
| 1078 | /* 802.11 WiFi protinfos */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1079 | #define OP_PCL_WIFI 0xac04 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1080 | |
| 1081 | /* MacSec protinfos */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1082 | #define OP_PCL_MACSEC 0x0001 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1083 | |
| 1084 | /* PKI unidirectional protocol protinfo bits */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1085 | #define OP_PCL_PKPROT_TEST 0x0008 |
| 1086 | #define OP_PCL_PKPROT_DECRYPT 0x0004 |
| 1087 | #define OP_PCL_PKPROT_ECC 0x0002 |
| 1088 | #define OP_PCL_PKPROT_F2M 0x0001 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1089 | |
| 1090 | /* For non-protocol/alg-only op commands */ |
| 1091 | #define OP_ALG_TYPE_SHIFT 24 |
| 1092 | #define OP_ALG_TYPE_MASK (0x7 << OP_ALG_TYPE_SHIFT) |
| 1093 | #define OP_ALG_TYPE_CLASS1 2 |
| 1094 | #define OP_ALG_TYPE_CLASS2 4 |
| 1095 | |
| 1096 | #define OP_ALG_ALGSEL_SHIFT 16 |
| 1097 | #define OP_ALG_ALGSEL_MASK (0xff << OP_ALG_ALGSEL_SHIFT) |
| 1098 | #define OP_ALG_ALGSEL_SUBMASK (0x0f << OP_ALG_ALGSEL_SHIFT) |
| 1099 | #define OP_ALG_ALGSEL_AES (0x10 << OP_ALG_ALGSEL_SHIFT) |
| 1100 | #define OP_ALG_ALGSEL_DES (0x20 << OP_ALG_ALGSEL_SHIFT) |
| 1101 | #define OP_ALG_ALGSEL_3DES (0x21 << OP_ALG_ALGSEL_SHIFT) |
| 1102 | #define OP_ALG_ALGSEL_ARC4 (0x30 << OP_ALG_ALGSEL_SHIFT) |
| 1103 | #define OP_ALG_ALGSEL_MD5 (0x40 << OP_ALG_ALGSEL_SHIFT) |
| 1104 | #define OP_ALG_ALGSEL_SHA1 (0x41 << OP_ALG_ALGSEL_SHIFT) |
| 1105 | #define OP_ALG_ALGSEL_SHA224 (0x42 << OP_ALG_ALGSEL_SHIFT) |
| 1106 | #define OP_ALG_ALGSEL_SHA256 (0x43 << OP_ALG_ALGSEL_SHIFT) |
| 1107 | #define OP_ALG_ALGSEL_SHA384 (0x44 << OP_ALG_ALGSEL_SHIFT) |
| 1108 | #define OP_ALG_ALGSEL_SHA512 (0x45 << OP_ALG_ALGSEL_SHIFT) |
| 1109 | #define OP_ALG_ALGSEL_RNG (0x50 << OP_ALG_ALGSEL_SHIFT) |
| 1110 | #define OP_ALG_ALGSEL_SNOW (0x60 << OP_ALG_ALGSEL_SHIFT) |
| 1111 | #define OP_ALG_ALGSEL_SNOW_F8 (0x60 << OP_ALG_ALGSEL_SHIFT) |
| 1112 | #define OP_ALG_ALGSEL_KASUMI (0x70 << OP_ALG_ALGSEL_SHIFT) |
| 1113 | #define OP_ALG_ALGSEL_CRC (0x90 << OP_ALG_ALGSEL_SHIFT) |
| 1114 | #define OP_ALG_ALGSEL_SNOW_F9 (0xA0 << OP_ALG_ALGSEL_SHIFT) |
| 1115 | |
| 1116 | #define OP_ALG_AAI_SHIFT 4 |
| 1117 | #define OP_ALG_AAI_MASK (0x1ff << OP_ALG_AAI_SHIFT) |
| 1118 | |
| 1119 | /* blockcipher AAI set */ |
| 1120 | #define OP_ALG_AAI_CTR_MOD128 (0x00 << OP_ALG_AAI_SHIFT) |
| 1121 | #define OP_ALG_AAI_CTR_MOD8 (0x01 << OP_ALG_AAI_SHIFT) |
| 1122 | #define OP_ALG_AAI_CTR_MOD16 (0x02 << OP_ALG_AAI_SHIFT) |
| 1123 | #define OP_ALG_AAI_CTR_MOD24 (0x03 << OP_ALG_AAI_SHIFT) |
| 1124 | #define OP_ALG_AAI_CTR_MOD32 (0x04 << OP_ALG_AAI_SHIFT) |
| 1125 | #define OP_ALG_AAI_CTR_MOD40 (0x05 << OP_ALG_AAI_SHIFT) |
| 1126 | #define OP_ALG_AAI_CTR_MOD48 (0x06 << OP_ALG_AAI_SHIFT) |
| 1127 | #define OP_ALG_AAI_CTR_MOD56 (0x07 << OP_ALG_AAI_SHIFT) |
| 1128 | #define OP_ALG_AAI_CTR_MOD64 (0x08 << OP_ALG_AAI_SHIFT) |
| 1129 | #define OP_ALG_AAI_CTR_MOD72 (0x09 << OP_ALG_AAI_SHIFT) |
| 1130 | #define OP_ALG_AAI_CTR_MOD80 (0x0a << OP_ALG_AAI_SHIFT) |
| 1131 | #define OP_ALG_AAI_CTR_MOD88 (0x0b << OP_ALG_AAI_SHIFT) |
| 1132 | #define OP_ALG_AAI_CTR_MOD96 (0x0c << OP_ALG_AAI_SHIFT) |
| 1133 | #define OP_ALG_AAI_CTR_MOD104 (0x0d << OP_ALG_AAI_SHIFT) |
| 1134 | #define OP_ALG_AAI_CTR_MOD112 (0x0e << OP_ALG_AAI_SHIFT) |
| 1135 | #define OP_ALG_AAI_CTR_MOD120 (0x0f << OP_ALG_AAI_SHIFT) |
| 1136 | #define OP_ALG_AAI_CBC (0x10 << OP_ALG_AAI_SHIFT) |
| 1137 | #define OP_ALG_AAI_ECB (0x20 << OP_ALG_AAI_SHIFT) |
| 1138 | #define OP_ALG_AAI_CFB (0x30 << OP_ALG_AAI_SHIFT) |
| 1139 | #define OP_ALG_AAI_OFB (0x40 << OP_ALG_AAI_SHIFT) |
| 1140 | #define OP_ALG_AAI_XTS (0x50 << OP_ALG_AAI_SHIFT) |
| 1141 | #define OP_ALG_AAI_CMAC (0x60 << OP_ALG_AAI_SHIFT) |
| 1142 | #define OP_ALG_AAI_XCBC_MAC (0x70 << OP_ALG_AAI_SHIFT) |
| 1143 | #define OP_ALG_AAI_CCM (0x80 << OP_ALG_AAI_SHIFT) |
| 1144 | #define OP_ALG_AAI_GCM (0x90 << OP_ALG_AAI_SHIFT) |
| 1145 | #define OP_ALG_AAI_CBC_XCBCMAC (0xa0 << OP_ALG_AAI_SHIFT) |
| 1146 | #define OP_ALG_AAI_CTR_XCBCMAC (0xb0 << OP_ALG_AAI_SHIFT) |
| 1147 | #define OP_ALG_AAI_CHECKODD (0x80 << OP_ALG_AAI_SHIFT) |
| 1148 | #define OP_ALG_AAI_DK (0x100 << OP_ALG_AAI_SHIFT) |
| 1149 | |
| 1150 | /* randomizer AAI set */ |
| 1151 | #define OP_ALG_AAI_RNG (0x00 << OP_ALG_AAI_SHIFT) |
| 1152 | #define OP_ALG_AAI_RNG_NOZERO (0x10 << OP_ALG_AAI_SHIFT) |
| 1153 | #define OP_ALG_AAI_RNG_ODD (0x20 << OP_ALG_AAI_SHIFT) |
| 1154 | |
| 1155 | /* hmac/smac AAI set */ |
| 1156 | #define OP_ALG_AAI_HASH (0x00 << OP_ALG_AAI_SHIFT) |
| 1157 | #define OP_ALG_AAI_HMAC (0x01 << OP_ALG_AAI_SHIFT) |
| 1158 | #define OP_ALG_AAI_SMAC (0x02 << OP_ALG_AAI_SHIFT) |
| 1159 | #define OP_ALG_AAI_HMAC_PRECOMP (0x04 << OP_ALG_AAI_SHIFT) |
| 1160 | |
| 1161 | /* CRC AAI set*/ |
| 1162 | #define OP_ALG_AAI_802 (0x01 << OP_ALG_AAI_SHIFT) |
| 1163 | #define OP_ALG_AAI_3385 (0x02 << OP_ALG_AAI_SHIFT) |
| 1164 | #define OP_ALG_AAI_CUST_POLY (0x04 << OP_ALG_AAI_SHIFT) |
| 1165 | #define OP_ALG_AAI_DIS (0x10 << OP_ALG_AAI_SHIFT) |
| 1166 | #define OP_ALG_AAI_DOS (0x20 << OP_ALG_AAI_SHIFT) |
| 1167 | #define OP_ALG_AAI_DOC (0x40 << OP_ALG_AAI_SHIFT) |
| 1168 | |
| 1169 | /* Kasumi/SNOW AAI set */ |
| 1170 | #define OP_ALG_AAI_F8 (0xc0 << OP_ALG_AAI_SHIFT) |
| 1171 | #define OP_ALG_AAI_F9 (0xc8 << OP_ALG_AAI_SHIFT) |
| 1172 | #define OP_ALG_AAI_GSM (0x10 << OP_ALG_AAI_SHIFT) |
| 1173 | #define OP_ALG_AAI_EDGE (0x20 << OP_ALG_AAI_SHIFT) |
| 1174 | |
Kim Phillips | 281922a | 2012-06-22 19:48:52 -0500 | [diff] [blame] | 1175 | /* RNG4 set */ |
| 1176 | #define OP_ALG_RNG4_SHIFT 4 |
| 1177 | #define OP_ALG_RNG4_MASK (0x1f3 << OP_ALG_RNG4_SHIFT) |
| 1178 | |
| 1179 | #define OP_ALG_RNG4_SK (0x100 << OP_ALG_RNG4_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1180 | |
| 1181 | #define OP_ALG_AS_SHIFT 2 |
| 1182 | #define OP_ALG_AS_MASK (0x3 << OP_ALG_AS_SHIFT) |
| 1183 | #define OP_ALG_AS_UPDATE (0 << OP_ALG_AS_SHIFT) |
| 1184 | #define OP_ALG_AS_INIT (1 << OP_ALG_AS_SHIFT) |
| 1185 | #define OP_ALG_AS_FINALIZE (2 << OP_ALG_AS_SHIFT) |
| 1186 | #define OP_ALG_AS_INITFINAL (3 << OP_ALG_AS_SHIFT) |
| 1187 | |
| 1188 | #define OP_ALG_ICV_SHIFT 1 |
| 1189 | #define OP_ALG_ICV_MASK (1 << OP_ALG_ICV_SHIFT) |
| 1190 | #define OP_ALG_ICV_OFF (0 << OP_ALG_ICV_SHIFT) |
| 1191 | #define OP_ALG_ICV_ON (1 << OP_ALG_ICV_SHIFT) |
| 1192 | |
| 1193 | #define OP_ALG_DIR_SHIFT 0 |
| 1194 | #define OP_ALG_DIR_MASK 1 |
| 1195 | #define OP_ALG_DECRYPT 0 |
| 1196 | #define OP_ALG_ENCRYPT 1 |
| 1197 | |
| 1198 | /* PKHA algorithm type set */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1199 | #define OP_ALG_PK 0x00800000 |
| 1200 | #define OP_ALG_PK_FUN_MASK 0x3f /* clrmem, modmath, or cpymem */ |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1201 | |
| 1202 | /* PKHA mode clear memory functions */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1203 | #define OP_ALG_PKMODE_A_RAM 0x80000 |
| 1204 | #define OP_ALG_PKMODE_B_RAM 0x40000 |
| 1205 | #define OP_ALG_PKMODE_E_RAM 0x20000 |
| 1206 | #define OP_ALG_PKMODE_N_RAM 0x10000 |
| 1207 | #define OP_ALG_PKMODE_CLEARMEM 0x00001 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1208 | |
| 1209 | /* PKHA mode modular-arithmetic functions */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1210 | #define OP_ALG_PKMODE_MOD_IN_MONTY 0x80000 |
| 1211 | #define OP_ALG_PKMODE_MOD_OUT_MONTY 0x40000 |
| 1212 | #define OP_ALG_PKMODE_MOD_F2M 0x20000 |
| 1213 | #define OP_ALG_PKMODE_MOD_R2_IN 0x10000 |
| 1214 | #define OP_ALG_PKMODE_PRJECTV 0x00800 |
| 1215 | #define OP_ALG_PKMODE_TIME_EQ 0x400 |
| 1216 | #define OP_ALG_PKMODE_OUT_B 0x000 |
| 1217 | #define OP_ALG_PKMODE_OUT_A 0x100 |
| 1218 | #define OP_ALG_PKMODE_MOD_ADD 0x002 |
| 1219 | #define OP_ALG_PKMODE_MOD_SUB_AB 0x003 |
| 1220 | #define OP_ALG_PKMODE_MOD_SUB_BA 0x004 |
| 1221 | #define OP_ALG_PKMODE_MOD_MULT 0x005 |
| 1222 | #define OP_ALG_PKMODE_MOD_EXPO 0x006 |
| 1223 | #define OP_ALG_PKMODE_MOD_REDUCT 0x007 |
| 1224 | #define OP_ALG_PKMODE_MOD_INV 0x008 |
| 1225 | #define OP_ALG_PKMODE_MOD_ECC_ADD 0x009 |
| 1226 | #define OP_ALG_PKMODE_MOD_ECC_DBL 0x00a |
| 1227 | #define OP_ALG_PKMODE_MOD_ECC_MULT 0x00b |
| 1228 | #define OP_ALG_PKMODE_MOD_MONT_CNST 0x00c |
| 1229 | #define OP_ALG_PKMODE_MOD_CRT_CNST 0x00d |
| 1230 | #define OP_ALG_PKMODE_MOD_GCD 0x00e |
| 1231 | #define OP_ALG_PKMODE_MOD_PRIMALITY 0x00f |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1232 | |
| 1233 | /* PKHA mode copy-memory functions */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1234 | #define OP_ALG_PKMODE_SRC_REG_SHIFT 13 |
| 1235 | #define OP_ALG_PKMODE_SRC_REG_MASK (7 << OP_ALG_PKMODE_SRC_REG_SHIFT) |
| 1236 | #define OP_ALG_PKMODE_DST_REG_SHIFT 10 |
| 1237 | #define OP_ALG_PKMODE_DST_REG_MASK (7 << OP_ALG_PKMODE_DST_REG_SHIFT) |
| 1238 | #define OP_ALG_PKMODE_SRC_SEG_SHIFT 8 |
| 1239 | #define OP_ALG_PKMODE_SRC_SEG_MASK (3 << OP_ALG_PKMODE_SRC_SEG_SHIFT) |
| 1240 | #define OP_ALG_PKMODE_DST_SEG_SHIFT 6 |
| 1241 | #define OP_ALG_PKMODE_DST_SEG_MASK (3 << OP_ALG_PKMODE_DST_SEG_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1242 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1243 | #define OP_ALG_PKMODE_SRC_REG_A (0 << OP_ALG_PKMODE_SRC_REG_SHIFT) |
| 1244 | #define OP_ALG_PKMODE_SRC_REG_B (1 << OP_ALG_PKMODE_SRC_REG_SHIFT) |
| 1245 | #define OP_ALG_PKMODE_SRC_REG_N (3 << OP_ALG_PKMODE_SRC_REG_SHIFT) |
| 1246 | #define OP_ALG_PKMODE_DST_REG_A (0 << OP_ALG_PKMODE_DST_REG_SHIFT) |
| 1247 | #define OP_ALG_PKMODE_DST_REG_B (1 << OP_ALG_PKMODE_DST_REG_SHIFT) |
| 1248 | #define OP_ALG_PKMODE_DST_REG_E (2 << OP_ALG_PKMODE_DST_REG_SHIFT) |
| 1249 | #define OP_ALG_PKMODE_DST_REG_N (3 << OP_ALG_PKMODE_DST_REG_SHIFT) |
| 1250 | #define OP_ALG_PKMODE_SRC_SEG_0 (0 << OP_ALG_PKMODE_SRC_SEG_SHIFT) |
| 1251 | #define OP_ALG_PKMODE_SRC_SEG_1 (1 << OP_ALG_PKMODE_SRC_SEG_SHIFT) |
| 1252 | #define OP_ALG_PKMODE_SRC_SEG_2 (2 << OP_ALG_PKMODE_SRC_SEG_SHIFT) |
| 1253 | #define OP_ALG_PKMODE_SRC_SEG_3 (3 << OP_ALG_PKMODE_SRC_SEG_SHIFT) |
| 1254 | #define OP_ALG_PKMODE_DST_SEG_0 (0 << OP_ALG_PKMODE_DST_SEG_SHIFT) |
| 1255 | #define OP_ALG_PKMODE_DST_SEG_1 (1 << OP_ALG_PKMODE_DST_SEG_SHIFT) |
| 1256 | #define OP_ALG_PKMODE_DST_SEG_2 (2 << OP_ALG_PKMODE_DST_SEG_SHIFT) |
| 1257 | #define OP_ALG_PKMODE_DST_SEG_3 (3 << OP_ALG_PKMODE_DST_SEG_SHIFT) |
| 1258 | #define OP_ALG_PKMODE_CPYMEM_N_SZ 0x80 |
| 1259 | #define OP_ALG_PKMODE_CPYMEM_SRC_SZ 0x81 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1260 | |
| 1261 | /* |
| 1262 | * SEQ_IN_PTR Command Constructs |
| 1263 | */ |
| 1264 | |
| 1265 | /* Release Buffers */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1266 | #define SQIN_RBS 0x04000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1267 | |
| 1268 | /* Sequence pointer is really a descriptor */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1269 | #define SQIN_INL 0x02000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1270 | |
| 1271 | /* Sequence pointer is a scatter-gather table */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1272 | #define SQIN_SGF 0x01000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1273 | |
| 1274 | /* Appends to a previous pointer */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1275 | #define SQIN_PRE 0x00800000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1276 | |
| 1277 | /* Use extended length following pointer */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1278 | #define SQIN_EXT 0x00400000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1279 | |
| 1280 | /* Restore sequence with pointer/length */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1281 | #define SQIN_RTO 0x00200000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1282 | |
| 1283 | /* Replace job descriptor */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1284 | #define SQIN_RJD 0x00100000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1285 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1286 | #define SQIN_LEN_SHIFT 0 |
| 1287 | #define SQIN_LEN_MASK (0xffff << SQIN_LEN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1288 | |
| 1289 | /* |
| 1290 | * SEQ_OUT_PTR Command Constructs |
| 1291 | */ |
| 1292 | |
| 1293 | /* Sequence pointer is a scatter-gather table */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1294 | #define SQOUT_SGF 0x01000000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1295 | |
| 1296 | /* Appends to a previous pointer */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1297 | #define SQOUT_PRE 0x00800000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1298 | |
| 1299 | /* Restore sequence with pointer/length */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1300 | #define SQOUT_RTO 0x00200000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1301 | |
| 1302 | /* Use extended length following pointer */ |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1303 | #define SQOUT_EXT 0x00400000 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1304 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1305 | #define SQOUT_LEN_SHIFT 0 |
| 1306 | #define SQOUT_LEN_MASK (0xffff << SQOUT_LEN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1307 | |
| 1308 | |
| 1309 | /* |
| 1310 | * SIGNATURE Command Constructs |
| 1311 | */ |
| 1312 | |
| 1313 | /* TYPE field is all that's relevant */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1314 | #define SIGN_TYPE_SHIFT 16 |
| 1315 | #define SIGN_TYPE_MASK (0x0f << SIGN_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1316 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1317 | #define SIGN_TYPE_FINAL (0x00 << SIGN_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1318 | #define SIGN_TYPE_FINAL_RESTORE (0x01 << SIGN_TYPE_SHIFT) |
| 1319 | #define SIGN_TYPE_FINAL_NONZERO (0x02 << SIGN_TYPE_SHIFT) |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1320 | #define SIGN_TYPE_IMM_2 (0x0a << SIGN_TYPE_SHIFT) |
| 1321 | #define SIGN_TYPE_IMM_3 (0x0b << SIGN_TYPE_SHIFT) |
| 1322 | #define SIGN_TYPE_IMM_4 (0x0c << SIGN_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1323 | |
| 1324 | /* |
| 1325 | * MOVE Command Constructs |
| 1326 | */ |
| 1327 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1328 | #define MOVE_AUX_SHIFT 25 |
| 1329 | #define MOVE_AUX_MASK (3 << MOVE_AUX_SHIFT) |
| 1330 | #define MOVE_AUX_MS (2 << MOVE_AUX_SHIFT) |
| 1331 | #define MOVE_AUX_LS (1 << MOVE_AUX_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1332 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1333 | #define MOVE_WAITCOMP_SHIFT 24 |
| 1334 | #define MOVE_WAITCOMP_MASK (1 << MOVE_WAITCOMP_SHIFT) |
| 1335 | #define MOVE_WAITCOMP (1 << MOVE_WAITCOMP_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1336 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1337 | #define MOVE_SRC_SHIFT 20 |
| 1338 | #define MOVE_SRC_MASK (0x0f << MOVE_SRC_SHIFT) |
| 1339 | #define MOVE_SRC_CLASS1CTX (0x00 << MOVE_SRC_SHIFT) |
| 1340 | #define MOVE_SRC_CLASS2CTX (0x01 << MOVE_SRC_SHIFT) |
| 1341 | #define MOVE_SRC_OUTFIFO (0x02 << MOVE_SRC_SHIFT) |
| 1342 | #define MOVE_SRC_DESCBUF (0x03 << MOVE_SRC_SHIFT) |
| 1343 | #define MOVE_SRC_MATH0 (0x04 << MOVE_SRC_SHIFT) |
| 1344 | #define MOVE_SRC_MATH1 (0x05 << MOVE_SRC_SHIFT) |
| 1345 | #define MOVE_SRC_MATH2 (0x06 << MOVE_SRC_SHIFT) |
| 1346 | #define MOVE_SRC_MATH3 (0x07 << MOVE_SRC_SHIFT) |
| 1347 | #define MOVE_SRC_INFIFO (0x08 << MOVE_SRC_SHIFT) |
| 1348 | #define MOVE_SRC_INFIFO_CL (0x09 << MOVE_SRC_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1349 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1350 | #define MOVE_DEST_SHIFT 16 |
| 1351 | #define MOVE_DEST_MASK (0x0f << MOVE_DEST_SHIFT) |
| 1352 | #define MOVE_DEST_CLASS1CTX (0x00 << MOVE_DEST_SHIFT) |
| 1353 | #define MOVE_DEST_CLASS2CTX (0x01 << MOVE_DEST_SHIFT) |
| 1354 | #define MOVE_DEST_OUTFIFO (0x02 << MOVE_DEST_SHIFT) |
| 1355 | #define MOVE_DEST_DESCBUF (0x03 << MOVE_DEST_SHIFT) |
| 1356 | #define MOVE_DEST_MATH0 (0x04 << MOVE_DEST_SHIFT) |
| 1357 | #define MOVE_DEST_MATH1 (0x05 << MOVE_DEST_SHIFT) |
| 1358 | #define MOVE_DEST_MATH2 (0x06 << MOVE_DEST_SHIFT) |
| 1359 | #define MOVE_DEST_MATH3 (0x07 << MOVE_DEST_SHIFT) |
| 1360 | #define MOVE_DEST_CLASS1INFIFO (0x08 << MOVE_DEST_SHIFT) |
| 1361 | #define MOVE_DEST_CLASS2INFIFO (0x09 << MOVE_DEST_SHIFT) |
| 1362 | #define MOVE_DEST_PK_A (0x0c << MOVE_DEST_SHIFT) |
| 1363 | #define MOVE_DEST_CLASS1KEY (0x0d << MOVE_DEST_SHIFT) |
| 1364 | #define MOVE_DEST_CLASS2KEY (0x0e << MOVE_DEST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1365 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1366 | #define MOVE_OFFSET_SHIFT 8 |
| 1367 | #define MOVE_OFFSET_MASK (0xff << MOVE_OFFSET_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1368 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1369 | #define MOVE_LEN_SHIFT 0 |
| 1370 | #define MOVE_LEN_MASK (0xff << MOVE_LEN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1371 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1372 | #define MOVELEN_MRSEL_SHIFT 0 |
| 1373 | #define MOVELEN_MRSEL_MASK (0x3 << MOVE_LEN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1374 | |
| 1375 | /* |
| 1376 | * MATH Command Constructs |
| 1377 | */ |
| 1378 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1379 | #define MATH_IFB_SHIFT 26 |
| 1380 | #define MATH_IFB_MASK (1 << MATH_IFB_SHIFT) |
| 1381 | #define MATH_IFB (1 << MATH_IFB_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1382 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1383 | #define MATH_NFU_SHIFT 25 |
| 1384 | #define MATH_NFU_MASK (1 << MATH_NFU_SHIFT) |
| 1385 | #define MATH_NFU (1 << MATH_NFU_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1386 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1387 | #define MATH_STL_SHIFT 24 |
| 1388 | #define MATH_STL_MASK (1 << MATH_STL_SHIFT) |
| 1389 | #define MATH_STL (1 << MATH_STL_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1390 | |
| 1391 | /* Function selectors */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1392 | #define MATH_FUN_SHIFT 20 |
| 1393 | #define MATH_FUN_MASK (0x0f << MATH_FUN_SHIFT) |
| 1394 | #define MATH_FUN_ADD (0x00 << MATH_FUN_SHIFT) |
| 1395 | #define MATH_FUN_ADDC (0x01 << MATH_FUN_SHIFT) |
| 1396 | #define MATH_FUN_SUB (0x02 << MATH_FUN_SHIFT) |
| 1397 | #define MATH_FUN_SUBB (0x03 << MATH_FUN_SHIFT) |
| 1398 | #define MATH_FUN_OR (0x04 << MATH_FUN_SHIFT) |
| 1399 | #define MATH_FUN_AND (0x05 << MATH_FUN_SHIFT) |
| 1400 | #define MATH_FUN_XOR (0x06 << MATH_FUN_SHIFT) |
| 1401 | #define MATH_FUN_LSHIFT (0x07 << MATH_FUN_SHIFT) |
| 1402 | #define MATH_FUN_RSHIFT (0x08 << MATH_FUN_SHIFT) |
| 1403 | #define MATH_FUN_SHLD (0x09 << MATH_FUN_SHIFT) |
| 1404 | #define MATH_FUN_ZBYT (0x0a << MATH_FUN_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1405 | |
| 1406 | /* Source 0 selectors */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1407 | #define MATH_SRC0_SHIFT 16 |
| 1408 | #define MATH_SRC0_MASK (0x0f << MATH_SRC0_SHIFT) |
| 1409 | #define MATH_SRC0_REG0 (0x00 << MATH_SRC0_SHIFT) |
| 1410 | #define MATH_SRC0_REG1 (0x01 << MATH_SRC0_SHIFT) |
| 1411 | #define MATH_SRC0_REG2 (0x02 << MATH_SRC0_SHIFT) |
| 1412 | #define MATH_SRC0_REG3 (0x03 << MATH_SRC0_SHIFT) |
| 1413 | #define MATH_SRC0_IMM (0x04 << MATH_SRC0_SHIFT) |
| 1414 | #define MATH_SRC0_SEQINLEN (0x08 << MATH_SRC0_SHIFT) |
| 1415 | #define MATH_SRC0_SEQOUTLEN (0x09 << MATH_SRC0_SHIFT) |
| 1416 | #define MATH_SRC0_VARSEQINLEN (0x0a << MATH_SRC0_SHIFT) |
| 1417 | #define MATH_SRC0_VARSEQOUTLEN (0x0b << MATH_SRC0_SHIFT) |
| 1418 | #define MATH_SRC0_ZERO (0x0c << MATH_SRC0_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1419 | |
| 1420 | /* Source 1 selectors */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1421 | #define MATH_SRC1_SHIFT 12 |
| 1422 | #define MATH_SRC1_MASK (0x0f << MATH_SRC1_SHIFT) |
| 1423 | #define MATH_SRC1_REG0 (0x00 << MATH_SRC1_SHIFT) |
| 1424 | #define MATH_SRC1_REG1 (0x01 << MATH_SRC1_SHIFT) |
| 1425 | #define MATH_SRC1_REG2 (0x02 << MATH_SRC1_SHIFT) |
| 1426 | #define MATH_SRC1_REG3 (0x03 << MATH_SRC1_SHIFT) |
| 1427 | #define MATH_SRC1_IMM (0x04 << MATH_SRC1_SHIFT) |
| 1428 | #define MATH_SRC1_INFIFO (0x0a << MATH_SRC1_SHIFT) |
| 1429 | #define MATH_SRC1_OUTFIFO (0x0b << MATH_SRC1_SHIFT) |
| 1430 | #define MATH_SRC1_ONE (0x0c << MATH_SRC1_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1431 | |
| 1432 | /* Destination selectors */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1433 | #define MATH_DEST_SHIFT 8 |
| 1434 | #define MATH_DEST_MASK (0x0f << MATH_DEST_SHIFT) |
| 1435 | #define MATH_DEST_REG0 (0x00 << MATH_DEST_SHIFT) |
| 1436 | #define MATH_DEST_REG1 (0x01 << MATH_DEST_SHIFT) |
| 1437 | #define MATH_DEST_REG2 (0x02 << MATH_DEST_SHIFT) |
| 1438 | #define MATH_DEST_REG3 (0x03 << MATH_DEST_SHIFT) |
| 1439 | #define MATH_DEST_SEQINLEN (0x08 << MATH_DEST_SHIFT) |
| 1440 | #define MATH_DEST_SEQOUTLEN (0x09 << MATH_DEST_SHIFT) |
| 1441 | #define MATH_DEST_VARSEQINLEN (0x0a << MATH_DEST_SHIFT) |
| 1442 | #define MATH_DEST_VARSEQOUTLEN (0x0b << MATH_DEST_SHIFT) |
| 1443 | #define MATH_DEST_NONE (0x0f << MATH_DEST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1444 | |
| 1445 | /* Length selectors */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1446 | #define MATH_LEN_SHIFT 0 |
| 1447 | #define MATH_LEN_MASK (0x0f << MATH_LEN_SHIFT) |
| 1448 | #define MATH_LEN_1BYTE 0x01 |
| 1449 | #define MATH_LEN_2BYTE 0x02 |
| 1450 | #define MATH_LEN_4BYTE 0x04 |
| 1451 | #define MATH_LEN_8BYTE 0x08 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1452 | |
| 1453 | /* |
| 1454 | * JUMP Command Constructs |
| 1455 | */ |
| 1456 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1457 | #define JUMP_CLASS_SHIFT 25 |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1458 | #define JUMP_CLASS_MASK (3 << JUMP_CLASS_SHIFT) |
| 1459 | #define JUMP_CLASS_NONE 0 |
| 1460 | #define JUMP_CLASS_CLASS1 (1 << JUMP_CLASS_SHIFT) |
| 1461 | #define JUMP_CLASS_CLASS2 (2 << JUMP_CLASS_SHIFT) |
| 1462 | #define JUMP_CLASS_BOTH (3 << JUMP_CLASS_SHIFT) |
| 1463 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1464 | #define JUMP_JSL_SHIFT 24 |
| 1465 | #define JUMP_JSL_MASK (1 << JUMP_JSL_SHIFT) |
| 1466 | #define JUMP_JSL (1 << JUMP_JSL_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1467 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1468 | #define JUMP_TYPE_SHIFT 22 |
| 1469 | #define JUMP_TYPE_MASK (0x03 << JUMP_TYPE_SHIFT) |
| 1470 | #define JUMP_TYPE_LOCAL (0x00 << JUMP_TYPE_SHIFT) |
| 1471 | #define JUMP_TYPE_NONLOCAL (0x01 << JUMP_TYPE_SHIFT) |
| 1472 | #define JUMP_TYPE_HALT (0x02 << JUMP_TYPE_SHIFT) |
| 1473 | #define JUMP_TYPE_HALT_USER (0x03 << JUMP_TYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1474 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1475 | #define JUMP_TEST_SHIFT 16 |
| 1476 | #define JUMP_TEST_MASK (0x03 << JUMP_TEST_SHIFT) |
| 1477 | #define JUMP_TEST_ALL (0x00 << JUMP_TEST_SHIFT) |
| 1478 | #define JUMP_TEST_INVALL (0x01 << JUMP_TEST_SHIFT) |
| 1479 | #define JUMP_TEST_ANY (0x02 << JUMP_TEST_SHIFT) |
| 1480 | #define JUMP_TEST_INVANY (0x03 << JUMP_TEST_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1481 | |
| 1482 | /* Condition codes. JSL bit is factored in */ |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1483 | #define JUMP_COND_SHIFT 8 |
| 1484 | #define JUMP_COND_MASK (0x100ff << JUMP_COND_SHIFT) |
| 1485 | #define JUMP_COND_PK_0 (0x80 << JUMP_COND_SHIFT) |
| 1486 | #define JUMP_COND_PK_GCD_1 (0x40 << JUMP_COND_SHIFT) |
| 1487 | #define JUMP_COND_PK_PRIME (0x20 << JUMP_COND_SHIFT) |
| 1488 | #define JUMP_COND_MATH_N (0x08 << JUMP_COND_SHIFT) |
| 1489 | #define JUMP_COND_MATH_Z (0x04 << JUMP_COND_SHIFT) |
| 1490 | #define JUMP_COND_MATH_C (0x02 << JUMP_COND_SHIFT) |
| 1491 | #define JUMP_COND_MATH_NV (0x01 << JUMP_COND_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1492 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1493 | #define JUMP_COND_JRP ((0x80 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1494 | #define JUMP_COND_SHRD ((0x40 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1495 | #define JUMP_COND_SELF ((0x20 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1496 | #define JUMP_COND_CALM ((0x10 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1497 | #define JUMP_COND_NIP ((0x08 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1498 | #define JUMP_COND_NIFP ((0x04 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1499 | #define JUMP_COND_NOP ((0x02 << JUMP_COND_SHIFT) | JUMP_JSL) |
| 1500 | #define JUMP_COND_NCP ((0x01 << JUMP_COND_SHIFT) | JUMP_JSL) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1501 | |
Kim Phillips | 1582fa8 | 2011-12-12 14:59:13 -0600 | [diff] [blame] | 1502 | #define JUMP_OFFSET_SHIFT 0 |
| 1503 | #define JUMP_OFFSET_MASK (0xff << JUMP_OFFSET_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1504 | |
| 1505 | /* |
| 1506 | * NFIFO ENTRY |
| 1507 | * Data Constructs |
| 1508 | * |
| 1509 | */ |
| 1510 | #define NFIFOENTRY_DEST_SHIFT 30 |
| 1511 | #define NFIFOENTRY_DEST_MASK (3 << NFIFOENTRY_DEST_SHIFT) |
| 1512 | #define NFIFOENTRY_DEST_DECO (0 << NFIFOENTRY_DEST_SHIFT) |
| 1513 | #define NFIFOENTRY_DEST_CLASS1 (1 << NFIFOENTRY_DEST_SHIFT) |
| 1514 | #define NFIFOENTRY_DEST_CLASS2 (2 << NFIFOENTRY_DEST_SHIFT) |
| 1515 | #define NFIFOENTRY_DEST_BOTH (3 << NFIFOENTRY_DEST_SHIFT) |
| 1516 | |
| 1517 | #define NFIFOENTRY_LC2_SHIFT 29 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1518 | #define NFIFOENTRY_LC2_MASK (1 << NFIFOENTRY_LC2_SHIFT) |
| 1519 | #define NFIFOENTRY_LC2 (1 << NFIFOENTRY_LC2_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1520 | |
| 1521 | #define NFIFOENTRY_LC1_SHIFT 28 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1522 | #define NFIFOENTRY_LC1_MASK (1 << NFIFOENTRY_LC1_SHIFT) |
| 1523 | #define NFIFOENTRY_LC1 (1 << NFIFOENTRY_LC1_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1524 | |
| 1525 | #define NFIFOENTRY_FC2_SHIFT 27 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1526 | #define NFIFOENTRY_FC2_MASK (1 << NFIFOENTRY_FC2_SHIFT) |
| 1527 | #define NFIFOENTRY_FC2 (1 << NFIFOENTRY_FC2_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1528 | |
| 1529 | #define NFIFOENTRY_FC1_SHIFT 26 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1530 | #define NFIFOENTRY_FC1_MASK (1 << NFIFOENTRY_FC1_SHIFT) |
| 1531 | #define NFIFOENTRY_FC1 (1 << NFIFOENTRY_FC1_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1532 | |
| 1533 | #define NFIFOENTRY_STYPE_SHIFT 24 |
| 1534 | #define NFIFOENTRY_STYPE_MASK (3 << NFIFOENTRY_STYPE_SHIFT) |
| 1535 | #define NFIFOENTRY_STYPE_DFIFO (0 << NFIFOENTRY_STYPE_SHIFT) |
| 1536 | #define NFIFOENTRY_STYPE_OFIFO (1 << NFIFOENTRY_STYPE_SHIFT) |
| 1537 | #define NFIFOENTRY_STYPE_PAD (2 << NFIFOENTRY_STYPE_SHIFT) |
| 1538 | #define NFIFOENTRY_STYPE_SNOOP (3 << NFIFOENTRY_STYPE_SHIFT) |
| 1539 | |
| 1540 | #define NFIFOENTRY_DTYPE_SHIFT 20 |
| 1541 | #define NFIFOENTRY_DTYPE_MASK (0xF << NFIFOENTRY_DTYPE_SHIFT) |
| 1542 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1543 | #define NFIFOENTRY_DTYPE_SBOX (0x0 << NFIFOENTRY_DTYPE_SHIFT) |
| 1544 | #define NFIFOENTRY_DTYPE_AAD (0x1 << NFIFOENTRY_DTYPE_SHIFT) |
| 1545 | #define NFIFOENTRY_DTYPE_IV (0x2 << NFIFOENTRY_DTYPE_SHIFT) |
| 1546 | #define NFIFOENTRY_DTYPE_SAD (0x3 << NFIFOENTRY_DTYPE_SHIFT) |
| 1547 | #define NFIFOENTRY_DTYPE_ICV (0xA << NFIFOENTRY_DTYPE_SHIFT) |
| 1548 | #define NFIFOENTRY_DTYPE_SKIP (0xE << NFIFOENTRY_DTYPE_SHIFT) |
| 1549 | #define NFIFOENTRY_DTYPE_MSG (0xF << NFIFOENTRY_DTYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1550 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1551 | #define NFIFOENTRY_DTYPE_PK_A0 (0x0 << NFIFOENTRY_DTYPE_SHIFT) |
| 1552 | #define NFIFOENTRY_DTYPE_PK_A1 (0x1 << NFIFOENTRY_DTYPE_SHIFT) |
| 1553 | #define NFIFOENTRY_DTYPE_PK_A2 (0x2 << NFIFOENTRY_DTYPE_SHIFT) |
| 1554 | #define NFIFOENTRY_DTYPE_PK_A3 (0x3 << NFIFOENTRY_DTYPE_SHIFT) |
| 1555 | #define NFIFOENTRY_DTYPE_PK_B0 (0x4 << NFIFOENTRY_DTYPE_SHIFT) |
| 1556 | #define NFIFOENTRY_DTYPE_PK_B1 (0x5 << NFIFOENTRY_DTYPE_SHIFT) |
| 1557 | #define NFIFOENTRY_DTYPE_PK_B2 (0x6 << NFIFOENTRY_DTYPE_SHIFT) |
| 1558 | #define NFIFOENTRY_DTYPE_PK_B3 (0x7 << NFIFOENTRY_DTYPE_SHIFT) |
| 1559 | #define NFIFOENTRY_DTYPE_PK_N (0x8 << NFIFOENTRY_DTYPE_SHIFT) |
| 1560 | #define NFIFOENTRY_DTYPE_PK_E (0x9 << NFIFOENTRY_DTYPE_SHIFT) |
| 1561 | #define NFIFOENTRY_DTYPE_PK_A (0xC << NFIFOENTRY_DTYPE_SHIFT) |
| 1562 | #define NFIFOENTRY_DTYPE_PK_B (0xD << NFIFOENTRY_DTYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1563 | |
| 1564 | |
| 1565 | #define NFIFOENTRY_BND_SHIFT 19 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1566 | #define NFIFOENTRY_BND_MASK (1 << NFIFOENTRY_BND_SHIFT) |
| 1567 | #define NFIFOENTRY_BND (1 << NFIFOENTRY_BND_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1568 | |
| 1569 | #define NFIFOENTRY_PTYPE_SHIFT 16 |
| 1570 | #define NFIFOENTRY_PTYPE_MASK (0x7 << NFIFOENTRY_PTYPE_SHIFT) |
| 1571 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1572 | #define NFIFOENTRY_PTYPE_ZEROS (0x0 << NFIFOENTRY_PTYPE_SHIFT) |
| 1573 | #define NFIFOENTRY_PTYPE_RND_NOZEROS (0x1 << NFIFOENTRY_PTYPE_SHIFT) |
| 1574 | #define NFIFOENTRY_PTYPE_INCREMENT (0x2 << NFIFOENTRY_PTYPE_SHIFT) |
| 1575 | #define NFIFOENTRY_PTYPE_RND (0x3 << NFIFOENTRY_PTYPE_SHIFT) |
| 1576 | #define NFIFOENTRY_PTYPE_ZEROS_NZ (0x4 << NFIFOENTRY_PTYPE_SHIFT) |
| 1577 | #define NFIFOENTRY_PTYPE_RND_NZ_LZ (0x5 << NFIFOENTRY_PTYPE_SHIFT) |
| 1578 | #define NFIFOENTRY_PTYPE_N (0x6 << NFIFOENTRY_PTYPE_SHIFT) |
| 1579 | #define NFIFOENTRY_PTYPE_RND_NZ_N (0x7 << NFIFOENTRY_PTYPE_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1580 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1581 | #define NFIFOENTRY_OC_SHIFT 15 |
| 1582 | #define NFIFOENTRY_OC_MASK (1 << NFIFOENTRY_OC_SHIFT) |
| 1583 | #define NFIFOENTRY_OC (1 << NFIFOENTRY_OC_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1584 | |
| 1585 | #define NFIFOENTRY_AST_SHIFT 14 |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1586 | #define NFIFOENTRY_AST_MASK (1 << NFIFOENTRY_OC_SHIFT) |
| 1587 | #define NFIFOENTRY_AST (1 << NFIFOENTRY_OC_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1588 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1589 | #define NFIFOENTRY_BM_SHIFT 11 |
| 1590 | #define NFIFOENTRY_BM_MASK (1 << NFIFOENTRY_BM_SHIFT) |
| 1591 | #define NFIFOENTRY_BM (1 << NFIFOENTRY_BM_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1592 | |
Kim Phillips | b028b54 | 2011-12-12 14:59:14 -0600 | [diff] [blame] | 1593 | #define NFIFOENTRY_PS_SHIFT 10 |
| 1594 | #define NFIFOENTRY_PS_MASK (1 << NFIFOENTRY_PS_SHIFT) |
| 1595 | #define NFIFOENTRY_PS (1 << NFIFOENTRY_PS_SHIFT) |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1596 | |
| 1597 | #define NFIFOENTRY_DLEN_SHIFT 0 |
| 1598 | #define NFIFOENTRY_DLEN_MASK (0xFFF << NFIFOENTRY_DLEN_SHIFT) |
| 1599 | |
| 1600 | #define NFIFOENTRY_PLEN_SHIFT 0 |
| 1601 | #define NFIFOENTRY_PLEN_MASK (0xFF << NFIFOENTRY_PLEN_SHIFT) |
| 1602 | |
Kim Phillips | 8e8ec59 | 2011-03-13 16:54:26 +0800 | [diff] [blame] | 1603 | #endif /* DESC_H */ |