162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * CAAM descriptor composition header
462306a36Sopenharmony_ci * Definitions to support CAAM descriptor instruction generation
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Copyright 2008-2011 Freescale Semiconductor, Inc.
762306a36Sopenharmony_ci * Copyright 2018 NXP
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef DESC_H
1162306a36Sopenharmony_ci#define DESC_H
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/*
1462306a36Sopenharmony_ci * 16-byte hardware scatter/gather table
1562306a36Sopenharmony_ci * An 8-byte table exists in the hardware spec, but has never been
1662306a36Sopenharmony_ci * implemented to date. The 8/16 option is selected at RTL-compile-time.
1762306a36Sopenharmony_ci * and this selection is visible in the Compile Time Parameters Register
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#define SEC4_SG_LEN_EXT		0x80000000	/* Entry points to table */
2162306a36Sopenharmony_ci#define SEC4_SG_LEN_FIN		0x40000000	/* Last entry in table */
2262306a36Sopenharmony_ci#define SEC4_SG_BPID_MASK	0x000000ff
2362306a36Sopenharmony_ci#define SEC4_SG_BPID_SHIFT	16
2462306a36Sopenharmony_ci#define SEC4_SG_LEN_MASK	0x3fffffff	/* Excludes EXT and FINAL */
2562306a36Sopenharmony_ci#define SEC4_SG_OFFSET_MASK	0x00001fff
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci/* Max size of any CAAM descriptor in 32-bit words, inclusive of header */
2862306a36Sopenharmony_ci#define MAX_CAAM_DESCSIZE	64
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci/* Block size of any entity covered/uncovered with a KEK/TKEK */
3162306a36Sopenharmony_ci#define KEK_BLOCKSIZE		16
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/*
3462306a36Sopenharmony_ci * Supported descriptor command types as they show up
3562306a36Sopenharmony_ci * inside a descriptor command word.
3662306a36Sopenharmony_ci */
3762306a36Sopenharmony_ci#define CMD_SHIFT		27
3862306a36Sopenharmony_ci#define CMD_MASK		0xf8000000
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#define CMD_KEY			(0x00 << CMD_SHIFT)
4162306a36Sopenharmony_ci#define CMD_SEQ_KEY		(0x01 << CMD_SHIFT)
4262306a36Sopenharmony_ci#define CMD_LOAD		(0x02 << CMD_SHIFT)
4362306a36Sopenharmony_ci#define CMD_SEQ_LOAD		(0x03 << CMD_SHIFT)
4462306a36Sopenharmony_ci#define CMD_FIFO_LOAD		(0x04 << CMD_SHIFT)
4562306a36Sopenharmony_ci#define CMD_SEQ_FIFO_LOAD	(0x05 << CMD_SHIFT)
4662306a36Sopenharmony_ci#define CMD_STORE		(0x0a << CMD_SHIFT)
4762306a36Sopenharmony_ci#define CMD_SEQ_STORE		(0x0b << CMD_SHIFT)
4862306a36Sopenharmony_ci#define CMD_FIFO_STORE		(0x0c << CMD_SHIFT)
4962306a36Sopenharmony_ci#define CMD_SEQ_FIFO_STORE	(0x0d << CMD_SHIFT)
5062306a36Sopenharmony_ci#define CMD_MOVE_LEN		(0x0e << CMD_SHIFT)
5162306a36Sopenharmony_ci#define CMD_MOVE		(0x0f << CMD_SHIFT)
5262306a36Sopenharmony_ci#define CMD_OPERATION		(0x10 << CMD_SHIFT)
5362306a36Sopenharmony_ci#define CMD_SIGNATURE		(0x12 << CMD_SHIFT)
5462306a36Sopenharmony_ci#define CMD_JUMP		(0x14 << CMD_SHIFT)
5562306a36Sopenharmony_ci#define CMD_MATH		(0x15 << CMD_SHIFT)
5662306a36Sopenharmony_ci#define CMD_DESC_HDR		(0x16 << CMD_SHIFT)
5762306a36Sopenharmony_ci#define CMD_SHARED_DESC_HDR	(0x17 << CMD_SHIFT)
5862306a36Sopenharmony_ci#define CMD_SEQ_IN_PTR		(0x1e << CMD_SHIFT)
5962306a36Sopenharmony_ci#define CMD_SEQ_OUT_PTR		(0x1f << CMD_SHIFT)
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci/* General-purpose class selector for all commands */
6262306a36Sopenharmony_ci#define CLASS_SHIFT		25
6362306a36Sopenharmony_ci#define CLASS_MASK		(0x03 << CLASS_SHIFT)
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci#define CLASS_NONE		(0x00 << CLASS_SHIFT)
6662306a36Sopenharmony_ci#define CLASS_1			(0x01 << CLASS_SHIFT)
6762306a36Sopenharmony_ci#define CLASS_2			(0x02 << CLASS_SHIFT)
6862306a36Sopenharmony_ci#define CLASS_BOTH		(0x03 << CLASS_SHIFT)
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci/*
7162306a36Sopenharmony_ci * Descriptor header command constructs
7262306a36Sopenharmony_ci * Covers shared, job, and trusted descriptor headers
7362306a36Sopenharmony_ci */
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci/*
7662306a36Sopenharmony_ci * Do Not Run - marks a descriptor inexecutable if there was
7762306a36Sopenharmony_ci * a preceding error somewhere
7862306a36Sopenharmony_ci */
7962306a36Sopenharmony_ci#define HDR_DNR			0x01000000
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci/*
8262306a36Sopenharmony_ci * ONE - should always be set. Combination of ONE (always
8362306a36Sopenharmony_ci * set) and ZRO (always clear) forms an endianness sanity check
8462306a36Sopenharmony_ci */
8562306a36Sopenharmony_ci#define HDR_ONE			0x00800000
8662306a36Sopenharmony_ci#define HDR_ZRO			0x00008000
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci/* Start Index or SharedDesc Length */
8962306a36Sopenharmony_ci#define HDR_START_IDX_SHIFT	16
9062306a36Sopenharmony_ci#define HDR_START_IDX_MASK	(0x3f << HDR_START_IDX_SHIFT)
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ci/* If shared descriptor header, 6-bit length */
9362306a36Sopenharmony_ci#define HDR_DESCLEN_SHR_MASK	0x3f
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ci/* If non-shared header, 7-bit length */
9662306a36Sopenharmony_ci#define HDR_DESCLEN_MASK	0x7f
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci/* This is a TrustedDesc (if not SharedDesc) */
9962306a36Sopenharmony_ci#define HDR_TRUSTED		0x00004000
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci/* Make into TrustedDesc (if not SharedDesc) */
10262306a36Sopenharmony_ci#define HDR_MAKE_TRUSTED	0x00002000
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci/* Save context if self-shared (if SharedDesc) */
10562306a36Sopenharmony_ci#define HDR_SAVECTX		0x00001000
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ci/* Next item points to SharedDesc */
10862306a36Sopenharmony_ci#define HDR_SHARED		0x00001000
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci/*
11162306a36Sopenharmony_ci * Reverse Execution Order - execute JobDesc first, then
11262306a36Sopenharmony_ci * execute SharedDesc (normally SharedDesc goes first).
11362306a36Sopenharmony_ci */
11462306a36Sopenharmony_ci#define HDR_REVERSE		0x00000800
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci/* Propagate DNR property to SharedDesc */
11762306a36Sopenharmony_ci#define HDR_PROP_DNR		0x00000800
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci/* JobDesc/SharedDesc share property */
12062306a36Sopenharmony_ci#define HDR_SD_SHARE_SHIFT	8
12162306a36Sopenharmony_ci#define HDR_SD_SHARE_MASK	(0x03 << HDR_SD_SHARE_SHIFT)
12262306a36Sopenharmony_ci#define HDR_JD_SHARE_SHIFT	8
12362306a36Sopenharmony_ci#define HDR_JD_SHARE_MASK	(0x07 << HDR_JD_SHARE_SHIFT)
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci#define HDR_SHARE_NEVER		(0x00 << HDR_SD_SHARE_SHIFT)
12662306a36Sopenharmony_ci#define HDR_SHARE_WAIT		(0x01 << HDR_SD_SHARE_SHIFT)
12762306a36Sopenharmony_ci#define HDR_SHARE_SERIAL	(0x02 << HDR_SD_SHARE_SHIFT)
12862306a36Sopenharmony_ci#define HDR_SHARE_ALWAYS	(0x03 << HDR_SD_SHARE_SHIFT)
12962306a36Sopenharmony_ci#define HDR_SHARE_DEFER		(0x04 << HDR_SD_SHARE_SHIFT)
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ci/* JobDesc/SharedDesc descriptor length */
13262306a36Sopenharmony_ci#define HDR_JD_LENGTH_MASK	0x7f
13362306a36Sopenharmony_ci#define HDR_SD_LENGTH_MASK	0x3f
13462306a36Sopenharmony_ci
13562306a36Sopenharmony_ci/*
13662306a36Sopenharmony_ci * KEY/SEQ_KEY Command Constructs
13762306a36Sopenharmony_ci */
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci/* Key Destination Class: 01 = Class 1, 02 - Class 2 */
14062306a36Sopenharmony_ci#define KEY_DEST_CLASS_SHIFT	25	/* use CLASS_1 or CLASS_2 */
14162306a36Sopenharmony_ci#define KEY_DEST_CLASS_MASK	(0x03 << KEY_DEST_CLASS_SHIFT)
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci/* Scatter-Gather Table/Variable Length Field */
14462306a36Sopenharmony_ci#define KEY_SGF			0x01000000
14562306a36Sopenharmony_ci#define KEY_VLF			0x01000000
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci/* Immediate - Key follows command in the descriptor */
14862306a36Sopenharmony_ci#define KEY_IMM			0x00800000
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci/*
15162306a36Sopenharmony_ci * Encrypted - Key is encrypted either with the KEK, or
15262306a36Sopenharmony_ci * with the TDKEK if TK is set
15362306a36Sopenharmony_ci */
15462306a36Sopenharmony_ci#define KEY_ENC			0x00400000
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci/*
15762306a36Sopenharmony_ci * No Write Back - Do not allow key to be FIFO STOREd
15862306a36Sopenharmony_ci */
15962306a36Sopenharmony_ci#define KEY_NWB			0x00200000
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci/*
16262306a36Sopenharmony_ci * Enhanced Encryption of Key
16362306a36Sopenharmony_ci */
16462306a36Sopenharmony_ci#define KEY_EKT			0x00100000
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci/*
16762306a36Sopenharmony_ci * Encrypted with Trusted Key
16862306a36Sopenharmony_ci */
16962306a36Sopenharmony_ci#define KEY_TK			0x00008000
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci/*
17262306a36Sopenharmony_ci * KDEST - Key Destination: 0 - class key register,
17362306a36Sopenharmony_ci * 1 - PKHA 'e', 2 - AFHA Sbox, 3 - MDHA split-key
17462306a36Sopenharmony_ci */
17562306a36Sopenharmony_ci#define KEY_DEST_SHIFT		16
17662306a36Sopenharmony_ci#define KEY_DEST_MASK		(0x03 << KEY_DEST_SHIFT)
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci#define KEY_DEST_CLASS_REG	(0x00 << KEY_DEST_SHIFT)
17962306a36Sopenharmony_ci#define KEY_DEST_PKHA_E		(0x01 << KEY_DEST_SHIFT)
18062306a36Sopenharmony_ci#define KEY_DEST_AFHA_SBOX	(0x02 << KEY_DEST_SHIFT)
18162306a36Sopenharmony_ci#define KEY_DEST_MDHA_SPLIT	(0x03 << KEY_DEST_SHIFT)
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_ci/* Length in bytes */
18462306a36Sopenharmony_ci#define KEY_LENGTH_MASK		0x000003ff
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci/*
18762306a36Sopenharmony_ci * LOAD/SEQ_LOAD/STORE/SEQ_STORE Command Constructs
18862306a36Sopenharmony_ci */
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci/*
19162306a36Sopenharmony_ci * Load/Store Destination: 0 = class independent CCB,
19262306a36Sopenharmony_ci * 1 = class 1 CCB, 2 = class 2 CCB, 3 = DECO
19362306a36Sopenharmony_ci */
19462306a36Sopenharmony_ci#define LDST_CLASS_SHIFT	25
19562306a36Sopenharmony_ci#define LDST_CLASS_MASK		(0x03 << LDST_CLASS_SHIFT)
19662306a36Sopenharmony_ci#define LDST_CLASS_IND_CCB	(0x00 << LDST_CLASS_SHIFT)
19762306a36Sopenharmony_ci#define LDST_CLASS_1_CCB	(0x01 << LDST_CLASS_SHIFT)
19862306a36Sopenharmony_ci#define LDST_CLASS_2_CCB	(0x02 << LDST_CLASS_SHIFT)
19962306a36Sopenharmony_ci#define LDST_CLASS_DECO		(0x03 << LDST_CLASS_SHIFT)
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci/* Scatter-Gather Table/Variable Length Field */
20262306a36Sopenharmony_ci#define LDST_SGF		0x01000000
20362306a36Sopenharmony_ci#define LDST_VLF		LDST_SGF
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* Immediate - Key follows this command in descriptor */
20662306a36Sopenharmony_ci#define LDST_IMM_MASK		1
20762306a36Sopenharmony_ci#define LDST_IMM_SHIFT		23
20862306a36Sopenharmony_ci#define LDST_IMM		(LDST_IMM_MASK << LDST_IMM_SHIFT)
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci/* SRC/DST - Destination for LOAD, Source for STORE */
21162306a36Sopenharmony_ci#define LDST_SRCDST_SHIFT	16
21262306a36Sopenharmony_ci#define LDST_SRCDST_MASK	(0x7f << LDST_SRCDST_SHIFT)
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci#define LDST_SRCDST_BYTE_CONTEXT	(0x20 << LDST_SRCDST_SHIFT)
21562306a36Sopenharmony_ci#define LDST_SRCDST_BYTE_KEY		(0x40 << LDST_SRCDST_SHIFT)
21662306a36Sopenharmony_ci#define LDST_SRCDST_BYTE_INFIFO		(0x7c << LDST_SRCDST_SHIFT)
21762306a36Sopenharmony_ci#define LDST_SRCDST_BYTE_OUTFIFO	(0x7e << LDST_SRCDST_SHIFT)
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ci#define LDST_SRCDST_WORD_MODE_REG	(0x00 << LDST_SRCDST_SHIFT)
22062306a36Sopenharmony_ci#define LDST_SRCDST_WORD_KEYSZ_REG	(0x01 << LDST_SRCDST_SHIFT)
22162306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DATASZ_REG	(0x02 << LDST_SRCDST_SHIFT)
22262306a36Sopenharmony_ci#define LDST_SRCDST_WORD_ICVSZ_REG	(0x03 << LDST_SRCDST_SHIFT)
22362306a36Sopenharmony_ci#define LDST_SRCDST_WORD_CHACTRL	(0x06 << LDST_SRCDST_SHIFT)
22462306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECOCTRL	(0x06 << LDST_SRCDST_SHIFT)
22562306a36Sopenharmony_ci#define LDST_SRCDST_WORD_IRQCTRL	(0x07 << LDST_SRCDST_SHIFT)
22662306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_PCLOVRD	(0x07 << LDST_SRCDST_SHIFT)
22762306a36Sopenharmony_ci#define LDST_SRCDST_WORD_CLRW		(0x08 << LDST_SRCDST_SHIFT)
22862306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH0	(0x08 << LDST_SRCDST_SHIFT)
22962306a36Sopenharmony_ci#define LDST_SRCDST_WORD_STAT		(0x09 << LDST_SRCDST_SHIFT)
23062306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH1	(0x09 << LDST_SRCDST_SHIFT)
23162306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH2	(0x0a << LDST_SRCDST_SHIFT)
23262306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_AAD_SZ	(0x0b << LDST_SRCDST_SHIFT)
23362306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DECO_MATH3	(0x0b << LDST_SRCDST_SHIFT)
23462306a36Sopenharmony_ci#define LDST_SRCDST_WORD_CLASS1_IV_SZ	(0x0c << LDST_SRCDST_SHIFT)
23562306a36Sopenharmony_ci#define LDST_SRCDST_WORD_ALTDS_CLASS1	(0x0f << LDST_SRCDST_SHIFT)
23662306a36Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_A_SZ	(0x10 << LDST_SRCDST_SHIFT)
23762306a36Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_B_SZ	(0x11 << LDST_SRCDST_SHIFT)
23862306a36Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_N_SZ	(0x12 << LDST_SRCDST_SHIFT)
23962306a36Sopenharmony_ci#define LDST_SRCDST_WORD_PKHA_E_SZ	(0x13 << LDST_SRCDST_SHIFT)
24062306a36Sopenharmony_ci#define LDST_SRCDST_WORD_CLASS_CTX	(0x20 << LDST_SRCDST_SHIFT)
24162306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF	(0x40 << LDST_SRCDST_SHIFT)
24262306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_JOB	(0x41 << LDST_SRCDST_SHIFT)
24362306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_SHARED	(0x42 << LDST_SRCDST_SHIFT)
24462306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_JOB_WE	(0x45 << LDST_SRCDST_SHIFT)
24562306a36Sopenharmony_ci#define LDST_SRCDST_WORD_DESCBUF_SHARED_WE (0x46 << LDST_SRCDST_SHIFT)
24662306a36Sopenharmony_ci#define LDST_SRCDST_WORD_INFO_FIFO_SM	(0x71 << LDST_SRCDST_SHIFT)
24762306a36Sopenharmony_ci#define LDST_SRCDST_WORD_INFO_FIFO	(0x7a << LDST_SRCDST_SHIFT)
24862306a36Sopenharmony_ci
24962306a36Sopenharmony_ci/* Offset in source/destination */
25062306a36Sopenharmony_ci#define LDST_OFFSET_SHIFT	8
25162306a36Sopenharmony_ci#define LDST_OFFSET_MASK	(0xff << LDST_OFFSET_SHIFT)
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ci/* LDOFF definitions used when DST = LDST_SRCDST_WORD_DECOCTRL */
25462306a36Sopenharmony_ci/* These could also be shifted by LDST_OFFSET_SHIFT - this reads better */
25562306a36Sopenharmony_ci#define LDOFF_CHG_SHARE_SHIFT		0
25662306a36Sopenharmony_ci#define LDOFF_CHG_SHARE_MASK		(0x3 << LDOFF_CHG_SHARE_SHIFT)
25762306a36Sopenharmony_ci#define LDOFF_CHG_SHARE_NEVER		(0x1 << LDOFF_CHG_SHARE_SHIFT)
25862306a36Sopenharmony_ci#define LDOFF_CHG_SHARE_OK_PROP		(0x2 << LDOFF_CHG_SHARE_SHIFT)
25962306a36Sopenharmony_ci#define LDOFF_CHG_SHARE_OK_NO_PROP	(0x3 << LDOFF_CHG_SHARE_SHIFT)
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci#define LDOFF_ENABLE_AUTO_NFIFO		(1 << 2)
26262306a36Sopenharmony_ci#define LDOFF_DISABLE_AUTO_NFIFO	(1 << 3)
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_SHIFT	4
26562306a36Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_MASK	(0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT)
26662306a36Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_SEQ	(0x1 << LDOFF_CHG_NONSEQLIODN_SHIFT)
26762306a36Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_NON_SEQ	(0x2 << LDOFF_CHG_NONSEQLIODN_SHIFT)
26862306a36Sopenharmony_ci#define LDOFF_CHG_NONSEQLIODN_TRUSTED	(0x3 << LDOFF_CHG_NONSEQLIODN_SHIFT)
26962306a36Sopenharmony_ci
27062306a36Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_SHIFT	6
27162306a36Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_MASK		(0x3 << LDOFF_CHG_SEQLIODN_SHIFT)
27262306a36Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_SEQ		(0x1 << LDOFF_CHG_SEQLIODN_SHIFT)
27362306a36Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_NON_SEQ	(0x2 << LDOFF_CHG_SEQLIODN_SHIFT)
27462306a36Sopenharmony_ci#define LDOFF_CHG_SEQLIODN_TRUSTED	(0x3 << LDOFF_CHG_SEQLIODN_SHIFT)
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ci/* Data length in bytes	*/
27762306a36Sopenharmony_ci#define LDST_LEN_SHIFT		0
27862306a36Sopenharmony_ci#define LDST_LEN_MASK		(0xff << LDST_LEN_SHIFT)
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci/* Special Length definitions when dst=deco-ctrl */
28162306a36Sopenharmony_ci#define LDLEN_ENABLE_OSL_COUNT		(1 << 7)
28262306a36Sopenharmony_ci#define LDLEN_RST_CHA_OFIFO_PTR		(1 << 6)
28362306a36Sopenharmony_ci#define LDLEN_RST_OFIFO			(1 << 5)
28462306a36Sopenharmony_ci#define LDLEN_SET_OFIFO_OFF_VALID	(1 << 4)
28562306a36Sopenharmony_ci#define LDLEN_SET_OFIFO_OFF_RSVD	(1 << 3)
28662306a36Sopenharmony_ci#define LDLEN_SET_OFIFO_OFFSET_SHIFT	0
28762306a36Sopenharmony_ci#define LDLEN_SET_OFIFO_OFFSET_MASK	(3 << LDLEN_SET_OFIFO_OFFSET_SHIFT)
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci/* Special Length definitions when dst=sm, nfifo-{sm,m} */
29062306a36Sopenharmony_ci#define LDLEN_MATH0			0
29162306a36Sopenharmony_ci#define LDLEN_MATH1			1
29262306a36Sopenharmony_ci#define LDLEN_MATH2			2
29362306a36Sopenharmony_ci#define LDLEN_MATH3			3
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ci/*
29662306a36Sopenharmony_ci * FIFO_LOAD/FIFO_STORE/SEQ_FIFO_LOAD/SEQ_FIFO_STORE
29762306a36Sopenharmony_ci * Command Constructs
29862306a36Sopenharmony_ci */
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci/*
30162306a36Sopenharmony_ci * Load Destination: 0 = skip (SEQ_FIFO_LOAD only),
30262306a36Sopenharmony_ci * 1 = Load for Class1, 2 = Load for Class2, 3 = Load both
30362306a36Sopenharmony_ci * Store Source: 0 = normal, 1 = Class1key, 2 = Class2key
30462306a36Sopenharmony_ci */
30562306a36Sopenharmony_ci#define FIFOLD_CLASS_SHIFT	25
30662306a36Sopenharmony_ci#define FIFOLD_CLASS_MASK	(0x03 << FIFOLD_CLASS_SHIFT)
30762306a36Sopenharmony_ci#define FIFOLD_CLASS_SKIP	(0x00 << FIFOLD_CLASS_SHIFT)
30862306a36Sopenharmony_ci#define FIFOLD_CLASS_CLASS1	(0x01 << FIFOLD_CLASS_SHIFT)
30962306a36Sopenharmony_ci#define FIFOLD_CLASS_CLASS2	(0x02 << FIFOLD_CLASS_SHIFT)
31062306a36Sopenharmony_ci#define FIFOLD_CLASS_BOTH	(0x03 << FIFOLD_CLASS_SHIFT)
31162306a36Sopenharmony_ci
31262306a36Sopenharmony_ci#define FIFOST_CLASS_SHIFT	25
31362306a36Sopenharmony_ci#define FIFOST_CLASS_MASK	(0x03 << FIFOST_CLASS_SHIFT)
31462306a36Sopenharmony_ci#define FIFOST_CLASS_NORMAL	(0x00 << FIFOST_CLASS_SHIFT)
31562306a36Sopenharmony_ci#define FIFOST_CLASS_CLASS1KEY	(0x01 << FIFOST_CLASS_SHIFT)
31662306a36Sopenharmony_ci#define FIFOST_CLASS_CLASS2KEY	(0x02 << FIFOST_CLASS_SHIFT)
31762306a36Sopenharmony_ci
31862306a36Sopenharmony_ci/*
31962306a36Sopenharmony_ci * Scatter-Gather Table/Variable Length Field
32062306a36Sopenharmony_ci * If set for FIFO_LOAD, refers to a SG table. Within
32162306a36Sopenharmony_ci * SEQ_FIFO_LOAD, is variable input sequence
32262306a36Sopenharmony_ci */
32362306a36Sopenharmony_ci#define FIFOLDST_SGF_SHIFT	24
32462306a36Sopenharmony_ci#define FIFOLDST_SGF_MASK	(1 << FIFOLDST_SGF_SHIFT)
32562306a36Sopenharmony_ci#define FIFOLDST_VLF_MASK	(1 << FIFOLDST_SGF_SHIFT)
32662306a36Sopenharmony_ci#define FIFOLDST_SGF		(1 << FIFOLDST_SGF_SHIFT)
32762306a36Sopenharmony_ci#define FIFOLDST_VLF		(1 << FIFOLDST_SGF_SHIFT)
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_ci/* Immediate - Data follows command in descriptor */
33062306a36Sopenharmony_ci#define FIFOLD_IMM_SHIFT	23
33162306a36Sopenharmony_ci#define FIFOLD_IMM_MASK		(1 << FIFOLD_IMM_SHIFT)
33262306a36Sopenharmony_ci#define FIFOLD_IMM		(1 << FIFOLD_IMM_SHIFT)
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ci/* Continue - Not the last FIFO store to come */
33562306a36Sopenharmony_ci#define FIFOST_CONT_SHIFT	23
33662306a36Sopenharmony_ci#define FIFOST_CONT_MASK	(1 << FIFOST_CONT_SHIFT)
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ci/*
33962306a36Sopenharmony_ci * Extended Length - use 32-bit extended length that
34062306a36Sopenharmony_ci * follows the pointer field. Illegal with IMM set
34162306a36Sopenharmony_ci */
34262306a36Sopenharmony_ci#define FIFOLDST_EXT_SHIFT	22
34362306a36Sopenharmony_ci#define FIFOLDST_EXT_MASK	(1 << FIFOLDST_EXT_SHIFT)
34462306a36Sopenharmony_ci#define FIFOLDST_EXT		(1 << FIFOLDST_EXT_SHIFT)
34562306a36Sopenharmony_ci
34662306a36Sopenharmony_ci/* Input data type.*/
34762306a36Sopenharmony_ci#define FIFOLD_TYPE_SHIFT	16
34862306a36Sopenharmony_ci#define FIFOLD_CONT_TYPE_SHIFT	19 /* shift past last-flush bits */
34962306a36Sopenharmony_ci#define FIFOLD_TYPE_MASK	(0x3f << FIFOLD_TYPE_SHIFT)
35062306a36Sopenharmony_ci
35162306a36Sopenharmony_ci/* PK types */
35262306a36Sopenharmony_ci#define FIFOLD_TYPE_PK		(0x00 << FIFOLD_TYPE_SHIFT)
35362306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_MASK	(0x30 << FIFOLD_TYPE_SHIFT)
35462306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_TYPEMASK (0x0f << FIFOLD_TYPE_SHIFT)
35562306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_A0	(0x00 << FIFOLD_TYPE_SHIFT)
35662306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_A1	(0x01 << FIFOLD_TYPE_SHIFT)
35762306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_A2	(0x02 << FIFOLD_TYPE_SHIFT)
35862306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_A3	(0x03 << FIFOLD_TYPE_SHIFT)
35962306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_B0	(0x04 << FIFOLD_TYPE_SHIFT)
36062306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_B1	(0x05 << FIFOLD_TYPE_SHIFT)
36162306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_B2	(0x06 << FIFOLD_TYPE_SHIFT)
36262306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_B3	(0x07 << FIFOLD_TYPE_SHIFT)
36362306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_N	(0x08 << FIFOLD_TYPE_SHIFT)
36462306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_A	(0x0c << FIFOLD_TYPE_SHIFT)
36562306a36Sopenharmony_ci#define FIFOLD_TYPE_PK_B	(0x0d << FIFOLD_TYPE_SHIFT)
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_ci/* Other types. Need to OR in last/flush bits as desired */
36862306a36Sopenharmony_ci#define FIFOLD_TYPE_MSG_MASK	(0x38 << FIFOLD_TYPE_SHIFT)
36962306a36Sopenharmony_ci#define FIFOLD_TYPE_MSG		(0x10 << FIFOLD_TYPE_SHIFT)
37062306a36Sopenharmony_ci#define FIFOLD_TYPE_MSG1OUT2	(0x18 << FIFOLD_TYPE_SHIFT)
37162306a36Sopenharmony_ci#define FIFOLD_TYPE_IV		(0x20 << FIFOLD_TYPE_SHIFT)
37262306a36Sopenharmony_ci#define FIFOLD_TYPE_BITDATA	(0x28 << FIFOLD_TYPE_SHIFT)
37362306a36Sopenharmony_ci#define FIFOLD_TYPE_AAD		(0x30 << FIFOLD_TYPE_SHIFT)
37462306a36Sopenharmony_ci#define FIFOLD_TYPE_ICV		(0x38 << FIFOLD_TYPE_SHIFT)
37562306a36Sopenharmony_ci
37662306a36Sopenharmony_ci/* Last/Flush bits for use with "other" types above */
37762306a36Sopenharmony_ci#define FIFOLD_TYPE_ACT_MASK	(0x07 << FIFOLD_TYPE_SHIFT)
37862306a36Sopenharmony_ci#define FIFOLD_TYPE_NOACTION	(0x00 << FIFOLD_TYPE_SHIFT)
37962306a36Sopenharmony_ci#define FIFOLD_TYPE_FLUSH1	(0x01 << FIFOLD_TYPE_SHIFT)
38062306a36Sopenharmony_ci#define FIFOLD_TYPE_LAST1	(0x02 << FIFOLD_TYPE_SHIFT)
38162306a36Sopenharmony_ci#define FIFOLD_TYPE_LAST2FLUSH	(0x03 << FIFOLD_TYPE_SHIFT)
38262306a36Sopenharmony_ci#define FIFOLD_TYPE_LAST2	(0x04 << FIFOLD_TYPE_SHIFT)
38362306a36Sopenharmony_ci#define FIFOLD_TYPE_LAST2FLUSH1 (0x05 << FIFOLD_TYPE_SHIFT)
38462306a36Sopenharmony_ci#define FIFOLD_TYPE_LASTBOTH	(0x06 << FIFOLD_TYPE_SHIFT)
38562306a36Sopenharmony_ci#define FIFOLD_TYPE_LASTBOTHFL	(0x07 << FIFOLD_TYPE_SHIFT)
38662306a36Sopenharmony_ci#define FIFOLD_TYPE_NOINFOFIFO	(0x0F << FIFOLD_TYPE_SHIFT)
38762306a36Sopenharmony_ci
38862306a36Sopenharmony_ci#define FIFOLDST_LEN_MASK	0xffff
38962306a36Sopenharmony_ci#define FIFOLDST_EXT_LEN_MASK	0xffffffff
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ci/* Output data types */
39262306a36Sopenharmony_ci#define FIFOST_TYPE_SHIFT	16
39362306a36Sopenharmony_ci#define FIFOST_TYPE_MASK	(0x3f << FIFOST_TYPE_SHIFT)
39462306a36Sopenharmony_ci
39562306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_A0	 (0x00 << FIFOST_TYPE_SHIFT)
39662306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_A1	 (0x01 << FIFOST_TYPE_SHIFT)
39762306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_A2	 (0x02 << FIFOST_TYPE_SHIFT)
39862306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_A3	 (0x03 << FIFOST_TYPE_SHIFT)
39962306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_B0	 (0x04 << FIFOST_TYPE_SHIFT)
40062306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_B1	 (0x05 << FIFOST_TYPE_SHIFT)
40162306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_B2	 (0x06 << FIFOST_TYPE_SHIFT)
40262306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_B3	 (0x07 << FIFOST_TYPE_SHIFT)
40362306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_N	 (0x08 << FIFOST_TYPE_SHIFT)
40462306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_A	 (0x0c << FIFOST_TYPE_SHIFT)
40562306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_B	 (0x0d << FIFOST_TYPE_SHIFT)
40662306a36Sopenharmony_ci#define FIFOST_TYPE_AF_SBOX_JKEK (0x20 << FIFOST_TYPE_SHIFT)
40762306a36Sopenharmony_ci#define FIFOST_TYPE_AF_SBOX_TKEK (0x21 << FIFOST_TYPE_SHIFT)
40862306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_E_JKEK	 (0x22 << FIFOST_TYPE_SHIFT)
40962306a36Sopenharmony_ci#define FIFOST_TYPE_PKHA_E_TKEK	 (0x23 << FIFOST_TYPE_SHIFT)
41062306a36Sopenharmony_ci#define FIFOST_TYPE_KEY_KEK	 (0x24 << FIFOST_TYPE_SHIFT)
41162306a36Sopenharmony_ci#define FIFOST_TYPE_KEY_TKEK	 (0x25 << FIFOST_TYPE_SHIFT)
41262306a36Sopenharmony_ci#define FIFOST_TYPE_SPLIT_KEK	 (0x26 << FIFOST_TYPE_SHIFT)
41362306a36Sopenharmony_ci#define FIFOST_TYPE_SPLIT_TKEK	 (0x27 << FIFOST_TYPE_SHIFT)
41462306a36Sopenharmony_ci#define FIFOST_TYPE_OUTFIFO_KEK	 (0x28 << FIFOST_TYPE_SHIFT)
41562306a36Sopenharmony_ci#define FIFOST_TYPE_OUTFIFO_TKEK (0x29 << FIFOST_TYPE_SHIFT)
41662306a36Sopenharmony_ci#define FIFOST_TYPE_MESSAGE_DATA (0x30 << FIFOST_TYPE_SHIFT)
41762306a36Sopenharmony_ci#define FIFOST_TYPE_RNGSTORE	 (0x34 << FIFOST_TYPE_SHIFT)
41862306a36Sopenharmony_ci#define FIFOST_TYPE_RNGFIFO	 (0x35 << FIFOST_TYPE_SHIFT)
41962306a36Sopenharmony_ci#define FIFOST_TYPE_METADATA	 (0x3e << FIFOST_TYPE_SHIFT)
42062306a36Sopenharmony_ci#define FIFOST_TYPE_SKIP	 (0x3f << FIFOST_TYPE_SHIFT)
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ci/*
42362306a36Sopenharmony_ci * OPERATION Command Constructs
42462306a36Sopenharmony_ci */
42562306a36Sopenharmony_ci
42662306a36Sopenharmony_ci/* Operation type selectors - OP TYPE */
42762306a36Sopenharmony_ci#define OP_TYPE_SHIFT		24
42862306a36Sopenharmony_ci#define OP_TYPE_MASK		(0x07 << OP_TYPE_SHIFT)
42962306a36Sopenharmony_ci
43062306a36Sopenharmony_ci#define OP_TYPE_UNI_PROTOCOL	(0x00 << OP_TYPE_SHIFT)
43162306a36Sopenharmony_ci#define OP_TYPE_PK		(0x01 << OP_TYPE_SHIFT)
43262306a36Sopenharmony_ci#define OP_TYPE_CLASS1_ALG	(0x02 << OP_TYPE_SHIFT)
43362306a36Sopenharmony_ci#define OP_TYPE_CLASS2_ALG	(0x04 << OP_TYPE_SHIFT)
43462306a36Sopenharmony_ci#define OP_TYPE_DECAP_PROTOCOL	(0x06 << OP_TYPE_SHIFT)
43562306a36Sopenharmony_ci#define OP_TYPE_ENCAP_PROTOCOL	(0x07 << OP_TYPE_SHIFT)
43662306a36Sopenharmony_ci
43762306a36Sopenharmony_ci/* ProtocolID selectors - PROTID */
43862306a36Sopenharmony_ci#define OP_PCLID_SHIFT		16
43962306a36Sopenharmony_ci#define OP_PCLID_MASK		(0xff << 16)
44062306a36Sopenharmony_ci
44162306a36Sopenharmony_ci/* Assuming OP_TYPE = OP_TYPE_UNI_PROTOCOL */
44262306a36Sopenharmony_ci#define OP_PCLID_IKEV1_PRF	(0x01 << OP_PCLID_SHIFT)
44362306a36Sopenharmony_ci#define OP_PCLID_IKEV2_PRF	(0x02 << OP_PCLID_SHIFT)
44462306a36Sopenharmony_ci#define OP_PCLID_SSL30_PRF	(0x08 << OP_PCLID_SHIFT)
44562306a36Sopenharmony_ci#define OP_PCLID_TLS10_PRF	(0x09 << OP_PCLID_SHIFT)
44662306a36Sopenharmony_ci#define OP_PCLID_TLS11_PRF	(0x0a << OP_PCLID_SHIFT)
44762306a36Sopenharmony_ci#define OP_PCLID_DTLS10_PRF	(0x0c << OP_PCLID_SHIFT)
44862306a36Sopenharmony_ci#define OP_PCLID_PRF		(0x06 << OP_PCLID_SHIFT)
44962306a36Sopenharmony_ci#define OP_PCLID_BLOB		(0x0d << OP_PCLID_SHIFT)
45062306a36Sopenharmony_ci#define OP_PCLID_SECRETKEY	(0x11 << OP_PCLID_SHIFT)
45162306a36Sopenharmony_ci#define OP_PCLID_PUBLICKEYPAIR	(0x14 << OP_PCLID_SHIFT)
45262306a36Sopenharmony_ci#define OP_PCLID_DSASIGN	(0x15 << OP_PCLID_SHIFT)
45362306a36Sopenharmony_ci#define OP_PCLID_DSAVERIFY	(0x16 << OP_PCLID_SHIFT)
45462306a36Sopenharmony_ci#define OP_PCLID_RSAENC_PUBKEY  (0x18 << OP_PCLID_SHIFT)
45562306a36Sopenharmony_ci#define OP_PCLID_RSADEC_PRVKEY  (0x19 << OP_PCLID_SHIFT)
45662306a36Sopenharmony_ci#define OP_PCLID_DKP_MD5	(0x20 << OP_PCLID_SHIFT)
45762306a36Sopenharmony_ci#define OP_PCLID_DKP_SHA1	(0x21 << OP_PCLID_SHIFT)
45862306a36Sopenharmony_ci#define OP_PCLID_DKP_SHA224	(0x22 << OP_PCLID_SHIFT)
45962306a36Sopenharmony_ci#define OP_PCLID_DKP_SHA256	(0x23 << OP_PCLID_SHIFT)
46062306a36Sopenharmony_ci#define OP_PCLID_DKP_SHA384	(0x24 << OP_PCLID_SHIFT)
46162306a36Sopenharmony_ci#define OP_PCLID_DKP_SHA512	(0x25 << OP_PCLID_SHIFT)
46262306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_MD5	(0x60 << OP_PCLID_SHIFT)
46362306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA1	(0x61 << OP_PCLID_SHIFT)
46462306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA224	(0x62 << OP_PCLID_SHIFT)
46562306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA256	(0x63 << OP_PCLID_SHIFT)
46662306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA384	(0x64 << OP_PCLID_SHIFT)
46762306a36Sopenharmony_ci#define OP_PCLID_DKP_RIF_SHA512	(0x65 << OP_PCLID_SHIFT)
46862306a36Sopenharmony_ci
46962306a36Sopenharmony_ci/* Assuming OP_TYPE = OP_TYPE_DECAP_PROTOCOL/ENCAP_PROTOCOL */
47062306a36Sopenharmony_ci#define OP_PCLID_IPSEC		(0x01 << OP_PCLID_SHIFT)
47162306a36Sopenharmony_ci#define OP_PCLID_SRTP		(0x02 << OP_PCLID_SHIFT)
47262306a36Sopenharmony_ci#define OP_PCLID_MACSEC		(0x03 << OP_PCLID_SHIFT)
47362306a36Sopenharmony_ci#define OP_PCLID_WIFI		(0x04 << OP_PCLID_SHIFT)
47462306a36Sopenharmony_ci#define OP_PCLID_WIMAX		(0x05 << OP_PCLID_SHIFT)
47562306a36Sopenharmony_ci#define OP_PCLID_SSL30		(0x08 << OP_PCLID_SHIFT)
47662306a36Sopenharmony_ci#define OP_PCLID_TLS10		(0x09 << OP_PCLID_SHIFT)
47762306a36Sopenharmony_ci#define OP_PCLID_TLS11		(0x0a << OP_PCLID_SHIFT)
47862306a36Sopenharmony_ci#define OP_PCLID_TLS12		(0x0b << OP_PCLID_SHIFT)
47962306a36Sopenharmony_ci#define OP_PCLID_DTLS		(0x0c << OP_PCLID_SHIFT)
48062306a36Sopenharmony_ci
48162306a36Sopenharmony_ci/*
48262306a36Sopenharmony_ci * ProtocolInfo selectors
48362306a36Sopenharmony_ci */
48462306a36Sopenharmony_ci#define OP_PCLINFO_MASK				 0xffff
48562306a36Sopenharmony_ci
48662306a36Sopenharmony_ci/* for OP_PCLID_IPSEC */
48762306a36Sopenharmony_ci#define OP_PCL_IPSEC_CIPHER_MASK		 0xff00
48862306a36Sopenharmony_ci#define OP_PCL_IPSEC_AUTH_MASK			 0x00ff
48962306a36Sopenharmony_ci
49062306a36Sopenharmony_ci#define OP_PCL_IPSEC_DES_IV64			 0x0100
49162306a36Sopenharmony_ci#define OP_PCL_IPSEC_DES			 0x0200
49262306a36Sopenharmony_ci#define OP_PCL_IPSEC_3DES			 0x0300
49362306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_CBC			 0x0c00
49462306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_CTR			 0x0d00
49562306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_XTS			 0x1600
49662306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM8			 0x0e00
49762306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM12			 0x0f00
49862306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_CCM16			 0x1000
49962306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM8			 0x1200
50062306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM12			 0x1300
50162306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_GCM16			 0x1400
50262306a36Sopenharmony_ci
50362306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_NULL			 0x0000
50462306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_MD5_96		 0x0001
50562306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA1_96		 0x0002
50662306a36Sopenharmony_ci#define OP_PCL_IPSEC_AES_XCBC_MAC_96		 0x0005
50762306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_MD5_128		 0x0006
50862306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA1_160		 0x0007
50962306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_256_128		 0x000c
51062306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_384_192		 0x000d
51162306a36Sopenharmony_ci#define OP_PCL_IPSEC_HMAC_SHA2_512_256		 0x000e
51262306a36Sopenharmony_ci
51362306a36Sopenharmony_ci/* For SRTP - OP_PCLID_SRTP */
51462306a36Sopenharmony_ci#define OP_PCL_SRTP_CIPHER_MASK			 0xff00
51562306a36Sopenharmony_ci#define OP_PCL_SRTP_AUTH_MASK			 0x00ff
51662306a36Sopenharmony_ci
51762306a36Sopenharmony_ci#define OP_PCL_SRTP_AES_CTR			 0x0d00
51862306a36Sopenharmony_ci
51962306a36Sopenharmony_ci#define OP_PCL_SRTP_HMAC_SHA1_160		 0x0007
52062306a36Sopenharmony_ci
52162306a36Sopenharmony_ci/* For SSL 3.0 - OP_PCLID_SSL30 */
52262306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA		 0x002f
52362306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_2		 0x0030
52462306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_3		 0x0031
52562306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_4		 0x0032
52662306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_5		 0x0033
52762306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_6		 0x0034
52862306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_7		 0x008c
52962306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_8		 0x0090
53062306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_9		 0x0094
53162306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_10		 0xc004
53262306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_11		 0xc009
53362306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_12		 0xc00e
53462306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_13		 0xc013
53562306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_14		 0xc018
53662306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_15		 0xc01d
53762306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_16		 0xc01e
53862306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_128_CBC_SHA_17		 0xc01f
53962306a36Sopenharmony_ci
54062306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA		 0x0035
54162306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_2		 0x0036
54262306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_3		 0x0037
54362306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_4		 0x0038
54462306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_5		 0x0039
54562306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_6		 0x003a
54662306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_7		 0x008d
54762306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_8		 0x0091
54862306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_9		 0x0095
54962306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_10		 0xc005
55062306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_11		 0xc00a
55162306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_12		 0xc00f
55262306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_13		 0xc014
55362306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_14		 0xc019
55462306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_15		 0xc020
55562306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_16		 0xc021
55662306a36Sopenharmony_ci#define OP_PCL_SSL30_AES_256_CBC_SHA_17		 0xc022
55762306a36Sopenharmony_ci
55862306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_MD5		 0x0023
55962306a36Sopenharmony_ci
56062306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA		 0x001f
56162306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_2		 0x008b
56262306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_3		 0x008f
56362306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_4		 0x0093
56462306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_5		 0x000a
56562306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_6		 0x000d
56662306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_7		 0x0010
56762306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_8		 0x0013
56862306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_9		 0x0016
56962306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_10	 0x001b
57062306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_11	 0xc003
57162306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_12	 0xc008
57262306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_13	 0xc00d
57362306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_14	 0xc012
57462306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_15	 0xc017
57562306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_16	 0xc01a
57662306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_17	 0xc01b
57762306a36Sopenharmony_ci#define OP_PCL_SSL30_3DES_EDE_CBC_SHA_18	 0xc01c
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_MD5		 0x0029
58062306a36Sopenharmony_ci
58162306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_MD5		 0x0022
58262306a36Sopenharmony_ci
58362306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA		 0x0008
58462306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_2		 0x000b
58562306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_3		 0x000e
58662306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_4		 0x0011
58762306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_5		 0x0014
58862306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_6		 0x0019
58962306a36Sopenharmony_ci#define OP_PCL_SSL30_DES40_CBC_SHA_7		 0x0026
59062306a36Sopenharmony_ci
59162306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA		 0x001e
59262306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_2		 0x0009
59362306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_3		 0x000c
59462306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_4		 0x000f
59562306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_5		 0x0012
59662306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_6		 0x0015
59762306a36Sopenharmony_ci#define OP_PCL_SSL30_DES_CBC_SHA_7		 0x001a
59862306a36Sopenharmony_ci
59962306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5		 0x0024
60062306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5_2		 0x0004
60162306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_MD5_3		 0x0018
60262306a36Sopenharmony_ci
60362306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5			 0x002b
60462306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5_2		 0x0003
60562306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_MD5_3		 0x0017
60662306a36Sopenharmony_ci
60762306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA		 0x0020
60862306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_2		 0x008a
60962306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_3		 0x008e
61062306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_4		 0x0092
61162306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_5		 0x0005
61262306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_6		 0xc002
61362306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_7		 0xc007
61462306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_8		 0xc00c
61562306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_9		 0xc011
61662306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_128_SHA_10		 0xc016
61762306a36Sopenharmony_ci
61862306a36Sopenharmony_ci#define OP_PCL_SSL30_RC4_40_SHA			 0x0028
61962306a36Sopenharmony_ci
62062306a36Sopenharmony_ci
62162306a36Sopenharmony_ci/* For TLS 1.0 - OP_PCLID_TLS10 */
62262306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA		 0x002f
62362306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_2		 0x0030
62462306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_3		 0x0031
62562306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_4		 0x0032
62662306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_5		 0x0033
62762306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_6		 0x0034
62862306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_7		 0x008c
62962306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_8		 0x0090
63062306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_9		 0x0094
63162306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_10		 0xc004
63262306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_11		 0xc009
63362306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_12		 0xc00e
63462306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_13		 0xc013
63562306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_14		 0xc018
63662306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_15		 0xc01d
63762306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_16		 0xc01e
63862306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA_17		 0xc01f
63962306a36Sopenharmony_ci
64062306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA		 0x0035
64162306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_2		 0x0036
64262306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_3		 0x0037
64362306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_4		 0x0038
64462306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_5		 0x0039
64562306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_6		 0x003a
64662306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_7		 0x008d
64762306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_8		 0x0091
64862306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_9		 0x0095
64962306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_10		 0xc005
65062306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_11		 0xc00a
65162306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_12		 0xc00f
65262306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_13		 0xc014
65362306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_14		 0xc019
65462306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_15		 0xc020
65562306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_16		 0xc021
65662306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA_17		 0xc022
65762306a36Sopenharmony_ci
65862306a36Sopenharmony_ci/* #define OP_PCL_TLS10_3DES_EDE_CBC_MD5	0x0023 */
65962306a36Sopenharmony_ci
66062306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA		 0x001f
66162306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_2		 0x008b
66262306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_3		 0x008f
66362306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_4		 0x0093
66462306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_5		 0x000a
66562306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_6		 0x000d
66662306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_7		 0x0010
66762306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_8		 0x0013
66862306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_9		 0x0016
66962306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_10	 0x001b
67062306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_11	 0xc003
67162306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_12	 0xc008
67262306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_13	 0xc00d
67362306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_14	 0xc012
67462306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_15	 0xc017
67562306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_16	 0xc01a
67662306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_17	 0xc01b
67762306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA_18	 0xc01c
67862306a36Sopenharmony_ci
67962306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_MD5		 0x0029
68062306a36Sopenharmony_ci
68162306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_MD5		 0x0022
68262306a36Sopenharmony_ci
68362306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA		 0x0008
68462306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_2		 0x000b
68562306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_3		 0x000e
68662306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_4		 0x0011
68762306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_5		 0x0014
68862306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_6		 0x0019
68962306a36Sopenharmony_ci#define OP_PCL_TLS10_DES40_CBC_SHA_7		 0x0026
69062306a36Sopenharmony_ci
69162306a36Sopenharmony_ci
69262306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA		 0x001e
69362306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_2		 0x0009
69462306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_3		 0x000c
69562306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_4		 0x000f
69662306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_5		 0x0012
69762306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_6		 0x0015
69862306a36Sopenharmony_ci#define OP_PCL_TLS10_DES_CBC_SHA_7		 0x001a
69962306a36Sopenharmony_ci
70062306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5		 0x0024
70162306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5_2		 0x0004
70262306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_MD5_3		 0x0018
70362306a36Sopenharmony_ci
70462306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5			 0x002b
70562306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5_2		 0x0003
70662306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_MD5_3		 0x0017
70762306a36Sopenharmony_ci
70862306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA		 0x0020
70962306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_2		 0x008a
71062306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_3		 0x008e
71162306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_4		 0x0092
71262306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_5		 0x0005
71362306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_6		 0xc002
71462306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_7		 0xc007
71562306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_8		 0xc00c
71662306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_9		 0xc011
71762306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_128_SHA_10		 0xc016
71862306a36Sopenharmony_ci
71962306a36Sopenharmony_ci#define OP_PCL_TLS10_RC4_40_SHA			 0x0028
72062306a36Sopenharmony_ci
72162306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_MD5		 0xff23
72262306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA160	 0xff30
72362306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA224	 0xff34
72462306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA256	 0xff36
72562306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA384	 0xff33
72662306a36Sopenharmony_ci#define OP_PCL_TLS10_3DES_EDE_CBC_SHA512	 0xff35
72762306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA160		 0xff80
72862306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA224		 0xff84
72962306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA256		 0xff86
73062306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA384		 0xff83
73162306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_128_CBC_SHA512		 0xff85
73262306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA160		 0xff20
73362306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA224		 0xff24
73462306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA256		 0xff26
73562306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA384		 0xff23
73662306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_192_CBC_SHA512		 0xff25
73762306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA160		 0xff60
73862306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA224		 0xff64
73962306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA256		 0xff66
74062306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA384		 0xff63
74162306a36Sopenharmony_ci#define OP_PCL_TLS10_AES_256_CBC_SHA512		 0xff65
74262306a36Sopenharmony_ci
74362306a36Sopenharmony_ci
74462306a36Sopenharmony_ci
74562306a36Sopenharmony_ci/* For TLS 1.1 - OP_PCLID_TLS11 */
74662306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA		 0x002f
74762306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_2		 0x0030
74862306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_3		 0x0031
74962306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_4		 0x0032
75062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_5		 0x0033
75162306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_6		 0x0034
75262306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_7		 0x008c
75362306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_8		 0x0090
75462306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_9		 0x0094
75562306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_10		 0xc004
75662306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_11		 0xc009
75762306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_12		 0xc00e
75862306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_13		 0xc013
75962306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_14		 0xc018
76062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_15		 0xc01d
76162306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_16		 0xc01e
76262306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA_17		 0xc01f
76362306a36Sopenharmony_ci
76462306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA		 0x0035
76562306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_2		 0x0036
76662306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_3		 0x0037
76762306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_4		 0x0038
76862306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_5		 0x0039
76962306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_6		 0x003a
77062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_7		 0x008d
77162306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_8		 0x0091
77262306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_9		 0x0095
77362306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_10		 0xc005
77462306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_11		 0xc00a
77562306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_12		 0xc00f
77662306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_13		 0xc014
77762306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_14		 0xc019
77862306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_15		 0xc020
77962306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_16		 0xc021
78062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA_17		 0xc022
78162306a36Sopenharmony_ci
78262306a36Sopenharmony_ci/* #define OP_PCL_TLS11_3DES_EDE_CBC_MD5	0x0023 */
78362306a36Sopenharmony_ci
78462306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA		 0x001f
78562306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_2		 0x008b
78662306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_3		 0x008f
78762306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_4		 0x0093
78862306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_5		 0x000a
78962306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_6		 0x000d
79062306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_7		 0x0010
79162306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_8		 0x0013
79262306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_9		 0x0016
79362306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_10	 0x001b
79462306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_11	 0xc003
79562306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_12	 0xc008
79662306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_13	 0xc00d
79762306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_14	 0xc012
79862306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_15	 0xc017
79962306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_16	 0xc01a
80062306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_17	 0xc01b
80162306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA_18	 0xc01c
80262306a36Sopenharmony_ci
80362306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_MD5		 0x0029
80462306a36Sopenharmony_ci
80562306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_MD5		 0x0022
80662306a36Sopenharmony_ci
80762306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA		 0x0008
80862306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_2		 0x000b
80962306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_3		 0x000e
81062306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_4		 0x0011
81162306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_5		 0x0014
81262306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_6		 0x0019
81362306a36Sopenharmony_ci#define OP_PCL_TLS11_DES40_CBC_SHA_7		 0x0026
81462306a36Sopenharmony_ci
81562306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA		 0x001e
81662306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_2		 0x0009
81762306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_3		 0x000c
81862306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_4		 0x000f
81962306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_5		 0x0012
82062306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_6		 0x0015
82162306a36Sopenharmony_ci#define OP_PCL_TLS11_DES_CBC_SHA_7		 0x001a
82262306a36Sopenharmony_ci
82362306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5		 0x0024
82462306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5_2		 0x0004
82562306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_MD5_3		 0x0018
82662306a36Sopenharmony_ci
82762306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5			 0x002b
82862306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5_2		 0x0003
82962306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_MD5_3		 0x0017
83062306a36Sopenharmony_ci
83162306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA		 0x0020
83262306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_2		 0x008a
83362306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_3		 0x008e
83462306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_4		 0x0092
83562306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_5		 0x0005
83662306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_6		 0xc002
83762306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_7		 0xc007
83862306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_8		 0xc00c
83962306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_9		 0xc011
84062306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_128_SHA_10		 0xc016
84162306a36Sopenharmony_ci
84262306a36Sopenharmony_ci#define OP_PCL_TLS11_RC4_40_SHA			 0x0028
84362306a36Sopenharmony_ci
84462306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_MD5		 0xff23
84562306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA160	 0xff30
84662306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA224	 0xff34
84762306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA256	 0xff36
84862306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA384	 0xff33
84962306a36Sopenharmony_ci#define OP_PCL_TLS11_3DES_EDE_CBC_SHA512	 0xff35
85062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA160		 0xff80
85162306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA224		 0xff84
85262306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA256		 0xff86
85362306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA384		 0xff83
85462306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_128_CBC_SHA512		 0xff85
85562306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA160		 0xff20
85662306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA224		 0xff24
85762306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA256		 0xff26
85862306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA384		 0xff23
85962306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_192_CBC_SHA512		 0xff25
86062306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA160		 0xff60
86162306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA224		 0xff64
86262306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA256		 0xff66
86362306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA384		 0xff63
86462306a36Sopenharmony_ci#define OP_PCL_TLS11_AES_256_CBC_SHA512		 0xff65
86562306a36Sopenharmony_ci
86662306a36Sopenharmony_ci
86762306a36Sopenharmony_ci/* For TLS 1.2 - OP_PCLID_TLS12 */
86862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA		 0x002f
86962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_2		 0x0030
87062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_3		 0x0031
87162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_4		 0x0032
87262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_5		 0x0033
87362306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_6		 0x0034
87462306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_7		 0x008c
87562306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_8		 0x0090
87662306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_9		 0x0094
87762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_10		 0xc004
87862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_11		 0xc009
87962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_12		 0xc00e
88062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_13		 0xc013
88162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_14		 0xc018
88262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_15		 0xc01d
88362306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_16		 0xc01e
88462306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA_17		 0xc01f
88562306a36Sopenharmony_ci
88662306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA		 0x0035
88762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_2		 0x0036
88862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_3		 0x0037
88962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_4		 0x0038
89062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_5		 0x0039
89162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_6		 0x003a
89262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_7		 0x008d
89362306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_8		 0x0091
89462306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_9		 0x0095
89562306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_10		 0xc005
89662306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_11		 0xc00a
89762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_12		 0xc00f
89862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_13		 0xc014
89962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_14		 0xc019
90062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_15		 0xc020
90162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_16		 0xc021
90262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA_17		 0xc022
90362306a36Sopenharmony_ci
90462306a36Sopenharmony_ci/* #define OP_PCL_TLS12_3DES_EDE_CBC_MD5	0x0023 */
90562306a36Sopenharmony_ci
90662306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA		 0x001f
90762306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_2		 0x008b
90862306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_3		 0x008f
90962306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_4		 0x0093
91062306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_5		 0x000a
91162306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_6		 0x000d
91262306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_7		 0x0010
91362306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_8		 0x0013
91462306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_9		 0x0016
91562306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_10	 0x001b
91662306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_11	 0xc003
91762306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_12	 0xc008
91862306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_13	 0xc00d
91962306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_14	 0xc012
92062306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_15	 0xc017
92162306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_16	 0xc01a
92262306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_17	 0xc01b
92362306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA_18	 0xc01c
92462306a36Sopenharmony_ci
92562306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_MD5		 0x0029
92662306a36Sopenharmony_ci
92762306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_MD5		 0x0022
92862306a36Sopenharmony_ci
92962306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA		 0x0008
93062306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_2		 0x000b
93162306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_3		 0x000e
93262306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_4		 0x0011
93362306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_5		 0x0014
93462306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_6		 0x0019
93562306a36Sopenharmony_ci#define OP_PCL_TLS12_DES40_CBC_SHA_7		 0x0026
93662306a36Sopenharmony_ci
93762306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA		 0x001e
93862306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_2		 0x0009
93962306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_3		 0x000c
94062306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_4		 0x000f
94162306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_5		 0x0012
94262306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_6		 0x0015
94362306a36Sopenharmony_ci#define OP_PCL_TLS12_DES_CBC_SHA_7		 0x001a
94462306a36Sopenharmony_ci
94562306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5		 0x0024
94662306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5_2		 0x0004
94762306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_MD5_3		 0x0018
94862306a36Sopenharmony_ci
94962306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5			 0x002b
95062306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5_2		 0x0003
95162306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_MD5_3		 0x0017
95262306a36Sopenharmony_ci
95362306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA		 0x0020
95462306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_2		 0x008a
95562306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_3		 0x008e
95662306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_4		 0x0092
95762306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_5		 0x0005
95862306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_6		 0xc002
95962306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_7		 0xc007
96062306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_8		 0xc00c
96162306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_9		 0xc011
96262306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_128_SHA_10		 0xc016
96362306a36Sopenharmony_ci
96462306a36Sopenharmony_ci#define OP_PCL_TLS12_RC4_40_SHA			 0x0028
96562306a36Sopenharmony_ci
96662306a36Sopenharmony_ci/* #define OP_PCL_TLS12_AES_128_CBC_SHA256	0x003c */
96762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_2	 0x003e
96862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_3	 0x003f
96962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_4	 0x0040
97062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_5	 0x0067
97162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256_6	 0x006c
97262306a36Sopenharmony_ci
97362306a36Sopenharmony_ci/* #define OP_PCL_TLS12_AES_256_CBC_SHA256	0x003d */
97462306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_2	 0x0068
97562306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_3	 0x0069
97662306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_4	 0x006a
97762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_5	 0x006b
97862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256_6	 0x006d
97962306a36Sopenharmony_ci
98062306a36Sopenharmony_ci/* AEAD_AES_xxx_CCM/GCM remain to be defined... */
98162306a36Sopenharmony_ci
98262306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_MD5		 0xff23
98362306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA160	 0xff30
98462306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA224	 0xff34
98562306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA256	 0xff36
98662306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA384	 0xff33
98762306a36Sopenharmony_ci#define OP_PCL_TLS12_3DES_EDE_CBC_SHA512	 0xff35
98862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA160		 0xff80
98962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA224		 0xff84
99062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA256		 0xff86
99162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA384		 0xff83
99262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_128_CBC_SHA512		 0xff85
99362306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA160		 0xff20
99462306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA224		 0xff24
99562306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA256		 0xff26
99662306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA384		 0xff23
99762306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_192_CBC_SHA512		 0xff25
99862306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA160		 0xff60
99962306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA224		 0xff64
100062306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA256		 0xff66
100162306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA384		 0xff63
100262306a36Sopenharmony_ci#define OP_PCL_TLS12_AES_256_CBC_SHA512		 0xff65
100362306a36Sopenharmony_ci
100462306a36Sopenharmony_ci/* For DTLS - OP_PCLID_DTLS */
100562306a36Sopenharmony_ci
100662306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA		 0x002f
100762306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_2		 0x0030
100862306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_3		 0x0031
100962306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_4		 0x0032
101062306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_5		 0x0033
101162306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_6		 0x0034
101262306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_7		 0x008c
101362306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_8		 0x0090
101462306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_9		 0x0094
101562306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_10		 0xc004
101662306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_11		 0xc009
101762306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_12		 0xc00e
101862306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_13		 0xc013
101962306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_14		 0xc018
102062306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_15		 0xc01d
102162306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_16		 0xc01e
102262306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA_17		 0xc01f
102362306a36Sopenharmony_ci
102462306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA		 0x0035
102562306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_2		 0x0036
102662306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_3		 0x0037
102762306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_4		 0x0038
102862306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_5		 0x0039
102962306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_6		 0x003a
103062306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_7		 0x008d
103162306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_8		 0x0091
103262306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_9		 0x0095
103362306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_10		 0xc005
103462306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_11		 0xc00a
103562306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_12		 0xc00f
103662306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_13		 0xc014
103762306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_14		 0xc019
103862306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_15		 0xc020
103962306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_16		 0xc021
104062306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA_17		 0xc022
104162306a36Sopenharmony_ci
104262306a36Sopenharmony_ci/* #define OP_PCL_DTLS_3DES_EDE_CBC_MD5		0x0023 */
104362306a36Sopenharmony_ci
104462306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA		 0x001f
104562306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_2		 0x008b
104662306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_3		 0x008f
104762306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_4		 0x0093
104862306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_5		 0x000a
104962306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_6		 0x000d
105062306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_7		 0x0010
105162306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_8		 0x0013
105262306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_9		 0x0016
105362306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_10		 0x001b
105462306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_11		 0xc003
105562306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_12		 0xc008
105662306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_13		 0xc00d
105762306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_14		 0xc012
105862306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_15		 0xc017
105962306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_16		 0xc01a
106062306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_17		 0xc01b
106162306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA_18		 0xc01c
106262306a36Sopenharmony_ci
106362306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_MD5		 0x0029
106462306a36Sopenharmony_ci
106562306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_MD5			 0x0022
106662306a36Sopenharmony_ci
106762306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA		 0x0008
106862306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_2		 0x000b
106962306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_3		 0x000e
107062306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_4		 0x0011
107162306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_5		 0x0014
107262306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_6		 0x0019
107362306a36Sopenharmony_ci#define OP_PCL_DTLS_DES40_CBC_SHA_7		 0x0026
107462306a36Sopenharmony_ci
107562306a36Sopenharmony_ci
107662306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA			 0x001e
107762306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_2		 0x0009
107862306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_3		 0x000c
107962306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_4		 0x000f
108062306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_5		 0x0012
108162306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_6		 0x0015
108262306a36Sopenharmony_ci#define OP_PCL_DTLS_DES_CBC_SHA_7		 0x001a
108362306a36Sopenharmony_ci
108462306a36Sopenharmony_ci
108562306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_MD5		 0xff23
108662306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA160		 0xff30
108762306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA224		 0xff34
108862306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA256		 0xff36
108962306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA384		 0xff33
109062306a36Sopenharmony_ci#define OP_PCL_DTLS_3DES_EDE_CBC_SHA512		 0xff35
109162306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA160		 0xff80
109262306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA224		 0xff84
109362306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA256		 0xff86
109462306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA384		 0xff83
109562306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_128_CBC_SHA512		 0xff85
109662306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA160		 0xff20
109762306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA224		 0xff24
109862306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA256		 0xff26
109962306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA384		 0xff23
110062306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_192_CBC_SHA512		 0xff25
110162306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA160		 0xff60
110262306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA224		 0xff64
110362306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA256		 0xff66
110462306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA384		 0xff63
110562306a36Sopenharmony_ci#define OP_PCL_DTLS_AES_256_CBC_SHA512		 0xff65
110662306a36Sopenharmony_ci
110762306a36Sopenharmony_ci/* 802.16 WiMAX protinfos */
110862306a36Sopenharmony_ci#define OP_PCL_WIMAX_OFDM			 0x0201
110962306a36Sopenharmony_ci#define OP_PCL_WIMAX_OFDMA			 0x0231
111062306a36Sopenharmony_ci
111162306a36Sopenharmony_ci/* 802.11 WiFi protinfos */
111262306a36Sopenharmony_ci#define OP_PCL_WIFI				 0xac04
111362306a36Sopenharmony_ci
111462306a36Sopenharmony_ci/* MacSec protinfos */
111562306a36Sopenharmony_ci#define OP_PCL_MACSEC				 0x0001
111662306a36Sopenharmony_ci
111762306a36Sopenharmony_ci/* Derived Key Protocol (DKP) Protinfo */
111862306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_SHIFT	14
111962306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_MASK	(3 << OP_PCL_DKP_SRC_SHIFT)
112062306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_IMM	(0 << OP_PCL_DKP_SRC_SHIFT)
112162306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_SEQ	(1 << OP_PCL_DKP_SRC_SHIFT)
112262306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_PTR	(2 << OP_PCL_DKP_SRC_SHIFT)
112362306a36Sopenharmony_ci#define OP_PCL_DKP_SRC_SGF	(3 << OP_PCL_DKP_SRC_SHIFT)
112462306a36Sopenharmony_ci#define OP_PCL_DKP_DST_SHIFT	12
112562306a36Sopenharmony_ci#define OP_PCL_DKP_DST_MASK	(3 << OP_PCL_DKP_DST_SHIFT)
112662306a36Sopenharmony_ci#define OP_PCL_DKP_DST_IMM	(0 << OP_PCL_DKP_DST_SHIFT)
112762306a36Sopenharmony_ci#define OP_PCL_DKP_DST_SEQ	(1 << OP_PCL_DKP_DST_SHIFT)
112862306a36Sopenharmony_ci#define OP_PCL_DKP_DST_PTR	(2 << OP_PCL_DKP_DST_SHIFT)
112962306a36Sopenharmony_ci#define OP_PCL_DKP_DST_SGF	(3 << OP_PCL_DKP_DST_SHIFT)
113062306a36Sopenharmony_ci#define OP_PCL_DKP_KEY_SHIFT	0
113162306a36Sopenharmony_ci#define OP_PCL_DKP_KEY_MASK	(0xfff << OP_PCL_DKP_KEY_SHIFT)
113262306a36Sopenharmony_ci
113362306a36Sopenharmony_ci/* PKI unidirectional protocol protinfo bits */
113462306a36Sopenharmony_ci#define OP_PCL_PKPROT_TEST			 0x0008
113562306a36Sopenharmony_ci#define OP_PCL_PKPROT_DECRYPT			 0x0004
113662306a36Sopenharmony_ci#define OP_PCL_PKPROT_ECC			 0x0002
113762306a36Sopenharmony_ci#define OP_PCL_PKPROT_F2M			 0x0001
113862306a36Sopenharmony_ci
113962306a36Sopenharmony_ci/* For non-protocol/alg-only op commands */
114062306a36Sopenharmony_ci#define OP_ALG_TYPE_SHIFT	24
114162306a36Sopenharmony_ci#define OP_ALG_TYPE_MASK	(0x7 << OP_ALG_TYPE_SHIFT)
114262306a36Sopenharmony_ci#define OP_ALG_TYPE_CLASS1	(2 << OP_ALG_TYPE_SHIFT)
114362306a36Sopenharmony_ci#define OP_ALG_TYPE_CLASS2	(4 << OP_ALG_TYPE_SHIFT)
114462306a36Sopenharmony_ci
114562306a36Sopenharmony_ci/* version register fields */
114662306a36Sopenharmony_ci#define OP_VER_CCHA_NUM  0x000000ff /* Number CCHAs instantiated */
114762306a36Sopenharmony_ci#define OP_VER_CCHA_MISC 0x0000ff00 /* CCHA Miscellaneous Information */
114862306a36Sopenharmony_ci#define OP_VER_CCHA_REV  0x00ff0000 /* CCHA Revision Number */
114962306a36Sopenharmony_ci#define OP_VER_CCHA_VID  0xff000000 /* CCHA Version ID */
115062306a36Sopenharmony_ci
115162306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHIFT	16
115262306a36Sopenharmony_ci#define OP_ALG_ALGSEL_MASK	(0xff << OP_ALG_ALGSEL_SHIFT)
115362306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SUBMASK	(0x0f << OP_ALG_ALGSEL_SHIFT)
115462306a36Sopenharmony_ci#define OP_ALG_ALGSEL_AES	(0x10 << OP_ALG_ALGSEL_SHIFT)
115562306a36Sopenharmony_ci#define OP_ALG_ALGSEL_DES	(0x20 << OP_ALG_ALGSEL_SHIFT)
115662306a36Sopenharmony_ci#define OP_ALG_ALGSEL_3DES	(0x21 << OP_ALG_ALGSEL_SHIFT)
115762306a36Sopenharmony_ci#define OP_ALG_ALGSEL_ARC4	(0x30 << OP_ALG_ALGSEL_SHIFT)
115862306a36Sopenharmony_ci#define OP_ALG_CHA_MDHA		(0x40 << OP_ALG_ALGSEL_SHIFT)
115962306a36Sopenharmony_ci#define OP_ALG_ALGSEL_MD5	(0x40 << OP_ALG_ALGSEL_SHIFT)
116062306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHA1	(0x41 << OP_ALG_ALGSEL_SHIFT)
116162306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHA224	(0x42 << OP_ALG_ALGSEL_SHIFT)
116262306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHA256	(0x43 << OP_ALG_ALGSEL_SHIFT)
116362306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHA384	(0x44 << OP_ALG_ALGSEL_SHIFT)
116462306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SHA512	(0x45 << OP_ALG_ALGSEL_SHIFT)
116562306a36Sopenharmony_ci#define OP_ALG_ALGSEL_RNG	(0x50 << OP_ALG_ALGSEL_SHIFT)
116662306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW	(0x60 << OP_ALG_ALGSEL_SHIFT)
116762306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW_F8	(0x60 << OP_ALG_ALGSEL_SHIFT)
116862306a36Sopenharmony_ci#define OP_ALG_ALGSEL_KASUMI	(0x70 << OP_ALG_ALGSEL_SHIFT)
116962306a36Sopenharmony_ci#define OP_ALG_ALGSEL_CRC	(0x90 << OP_ALG_ALGSEL_SHIFT)
117062306a36Sopenharmony_ci#define OP_ALG_ALGSEL_SNOW_F9	(0xA0 << OP_ALG_ALGSEL_SHIFT)
117162306a36Sopenharmony_ci#define OP_ALG_ALGSEL_CHACHA20	(0xD0 << OP_ALG_ALGSEL_SHIFT)
117262306a36Sopenharmony_ci#define OP_ALG_ALGSEL_POLY1305	(0xE0 << OP_ALG_ALGSEL_SHIFT)
117362306a36Sopenharmony_ci
117462306a36Sopenharmony_ci#define OP_ALG_AAI_SHIFT	4
117562306a36Sopenharmony_ci#define OP_ALG_AAI_MASK		(0x1ff << OP_ALG_AAI_SHIFT)
117662306a36Sopenharmony_ci
117762306a36Sopenharmony_ci/* blockcipher AAI set */
117862306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD128	(0x00 << OP_ALG_AAI_SHIFT)
117962306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD8	(0x01 << OP_ALG_AAI_SHIFT)
118062306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD16	(0x02 << OP_ALG_AAI_SHIFT)
118162306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD24	(0x03 << OP_ALG_AAI_SHIFT)
118262306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD32	(0x04 << OP_ALG_AAI_SHIFT)
118362306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD40	(0x05 << OP_ALG_AAI_SHIFT)
118462306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD48	(0x06 << OP_ALG_AAI_SHIFT)
118562306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD56	(0x07 << OP_ALG_AAI_SHIFT)
118662306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD64	(0x08 << OP_ALG_AAI_SHIFT)
118762306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD72	(0x09 << OP_ALG_AAI_SHIFT)
118862306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD80	(0x0a << OP_ALG_AAI_SHIFT)
118962306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD88	(0x0b << OP_ALG_AAI_SHIFT)
119062306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD96	(0x0c << OP_ALG_AAI_SHIFT)
119162306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD104	(0x0d << OP_ALG_AAI_SHIFT)
119262306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD112	(0x0e << OP_ALG_AAI_SHIFT)
119362306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_MOD120	(0x0f << OP_ALG_AAI_SHIFT)
119462306a36Sopenharmony_ci#define OP_ALG_AAI_CBC		(0x10 << OP_ALG_AAI_SHIFT)
119562306a36Sopenharmony_ci#define OP_ALG_AAI_ECB		(0x20 << OP_ALG_AAI_SHIFT)
119662306a36Sopenharmony_ci#define OP_ALG_AAI_CFB		(0x30 << OP_ALG_AAI_SHIFT)
119762306a36Sopenharmony_ci#define OP_ALG_AAI_OFB		(0x40 << OP_ALG_AAI_SHIFT)
119862306a36Sopenharmony_ci#define OP_ALG_AAI_XTS		(0x50 << OP_ALG_AAI_SHIFT)
119962306a36Sopenharmony_ci#define OP_ALG_AAI_CMAC		(0x60 << OP_ALG_AAI_SHIFT)
120062306a36Sopenharmony_ci#define OP_ALG_AAI_XCBC_MAC	(0x70 << OP_ALG_AAI_SHIFT)
120162306a36Sopenharmony_ci#define OP_ALG_AAI_CCM		(0x80 << OP_ALG_AAI_SHIFT)
120262306a36Sopenharmony_ci#define OP_ALG_AAI_GCM		(0x90 << OP_ALG_AAI_SHIFT)
120362306a36Sopenharmony_ci#define OP_ALG_AAI_CBC_XCBCMAC	(0xa0 << OP_ALG_AAI_SHIFT)
120462306a36Sopenharmony_ci#define OP_ALG_AAI_CTR_XCBCMAC	(0xb0 << OP_ALG_AAI_SHIFT)
120562306a36Sopenharmony_ci#define OP_ALG_AAI_CHECKODD	(0x80 << OP_ALG_AAI_SHIFT)
120662306a36Sopenharmony_ci#define OP_ALG_AAI_DK		(0x100 << OP_ALG_AAI_SHIFT)
120762306a36Sopenharmony_ci
120862306a36Sopenharmony_ci/* randomizer AAI set */
120962306a36Sopenharmony_ci#define OP_ALG_AAI_RNG		(0x00 << OP_ALG_AAI_SHIFT)
121062306a36Sopenharmony_ci#define OP_ALG_AAI_RNG_NZB	(0x10 << OP_ALG_AAI_SHIFT)
121162306a36Sopenharmony_ci#define OP_ALG_AAI_RNG_OBP	(0x20 << OP_ALG_AAI_SHIFT)
121262306a36Sopenharmony_ci
121362306a36Sopenharmony_ci/* RNG4 AAI set */
121462306a36Sopenharmony_ci#define OP_ALG_AAI_RNG4_SH_0	(0x00 << OP_ALG_AAI_SHIFT)
121562306a36Sopenharmony_ci#define OP_ALG_AAI_RNG4_SH_1	(0x01 << OP_ALG_AAI_SHIFT)
121662306a36Sopenharmony_ci#define OP_ALG_AAI_RNG4_PS	(0x40 << OP_ALG_AAI_SHIFT)
121762306a36Sopenharmony_ci#define OP_ALG_AAI_RNG4_AI	(0x80 << OP_ALG_AAI_SHIFT)
121862306a36Sopenharmony_ci#define OP_ALG_AAI_RNG4_SK	(0x100 << OP_ALG_AAI_SHIFT)
121962306a36Sopenharmony_ci
122062306a36Sopenharmony_ci/* Chacha20 AAI set */
122162306a36Sopenharmony_ci#define OP_ALG_AAI_AEAD	(0x002 << OP_ALG_AAI_SHIFT)
122262306a36Sopenharmony_ci#define OP_ALG_AAI_KEYSTREAM	(0x001 << OP_ALG_AAI_SHIFT)
122362306a36Sopenharmony_ci#define OP_ALG_AAI_BC8		(0x008 << OP_ALG_AAI_SHIFT)
122462306a36Sopenharmony_ci
122562306a36Sopenharmony_ci/* hmac/smac AAI set */
122662306a36Sopenharmony_ci#define OP_ALG_AAI_HASH		(0x00 << OP_ALG_AAI_SHIFT)
122762306a36Sopenharmony_ci#define OP_ALG_AAI_HMAC		(0x01 << OP_ALG_AAI_SHIFT)
122862306a36Sopenharmony_ci#define OP_ALG_AAI_SMAC		(0x02 << OP_ALG_AAI_SHIFT)
122962306a36Sopenharmony_ci#define OP_ALG_AAI_HMAC_PRECOMP	(0x04 << OP_ALG_AAI_SHIFT)
123062306a36Sopenharmony_ci
123162306a36Sopenharmony_ci/* CRC AAI set*/
123262306a36Sopenharmony_ci#define OP_ALG_AAI_802		(0x01 << OP_ALG_AAI_SHIFT)
123362306a36Sopenharmony_ci#define OP_ALG_AAI_3385		(0x02 << OP_ALG_AAI_SHIFT)
123462306a36Sopenharmony_ci#define OP_ALG_AAI_CUST_POLY	(0x04 << OP_ALG_AAI_SHIFT)
123562306a36Sopenharmony_ci#define OP_ALG_AAI_DIS		(0x10 << OP_ALG_AAI_SHIFT)
123662306a36Sopenharmony_ci#define OP_ALG_AAI_DOS		(0x20 << OP_ALG_AAI_SHIFT)
123762306a36Sopenharmony_ci#define OP_ALG_AAI_DOC		(0x40 << OP_ALG_AAI_SHIFT)
123862306a36Sopenharmony_ci
123962306a36Sopenharmony_ci/* Kasumi/SNOW AAI set */
124062306a36Sopenharmony_ci#define OP_ALG_AAI_F8		(0xc0 << OP_ALG_AAI_SHIFT)
124162306a36Sopenharmony_ci#define OP_ALG_AAI_F9		(0xc8 << OP_ALG_AAI_SHIFT)
124262306a36Sopenharmony_ci#define OP_ALG_AAI_GSM		(0x10 << OP_ALG_AAI_SHIFT)
124362306a36Sopenharmony_ci#define OP_ALG_AAI_EDGE		(0x20 << OP_ALG_AAI_SHIFT)
124462306a36Sopenharmony_ci
124562306a36Sopenharmony_ci#define OP_ALG_AS_SHIFT		2
124662306a36Sopenharmony_ci#define OP_ALG_AS_MASK		(0x3 << OP_ALG_AS_SHIFT)
124762306a36Sopenharmony_ci#define OP_ALG_AS_UPDATE	(0 << OP_ALG_AS_SHIFT)
124862306a36Sopenharmony_ci#define OP_ALG_AS_INIT		(1 << OP_ALG_AS_SHIFT)
124962306a36Sopenharmony_ci#define OP_ALG_AS_FINALIZE	(2 << OP_ALG_AS_SHIFT)
125062306a36Sopenharmony_ci#define OP_ALG_AS_INITFINAL	(3 << OP_ALG_AS_SHIFT)
125162306a36Sopenharmony_ci
125262306a36Sopenharmony_ci#define OP_ALG_ICV_SHIFT	1
125362306a36Sopenharmony_ci#define OP_ALG_ICV_MASK		(1 << OP_ALG_ICV_SHIFT)
125462306a36Sopenharmony_ci#define OP_ALG_ICV_OFF		(0 << OP_ALG_ICV_SHIFT)
125562306a36Sopenharmony_ci#define OP_ALG_ICV_ON		(1 << OP_ALG_ICV_SHIFT)
125662306a36Sopenharmony_ci
125762306a36Sopenharmony_ci#define OP_ALG_PR_ON		BIT(1)
125862306a36Sopenharmony_ci
125962306a36Sopenharmony_ci#define OP_ALG_DIR_SHIFT	0
126062306a36Sopenharmony_ci#define OP_ALG_DIR_MASK		1
126162306a36Sopenharmony_ci#define OP_ALG_DECRYPT		0
126262306a36Sopenharmony_ci#define OP_ALG_ENCRYPT		1
126362306a36Sopenharmony_ci
126462306a36Sopenharmony_ci/* PKHA algorithm type set */
126562306a36Sopenharmony_ci#define OP_ALG_PK		0x00800000
126662306a36Sopenharmony_ci#define OP_ALG_PK_FUN_MASK	0x3f /* clrmem, modmath, or cpymem */
126762306a36Sopenharmony_ci
126862306a36Sopenharmony_ci/* PKHA mode clear memory functions */
126962306a36Sopenharmony_ci#define OP_ALG_PKMODE_A_RAM	0x80000
127062306a36Sopenharmony_ci#define OP_ALG_PKMODE_B_RAM	0x40000
127162306a36Sopenharmony_ci#define OP_ALG_PKMODE_E_RAM	0x20000
127262306a36Sopenharmony_ci#define OP_ALG_PKMODE_N_RAM	0x10000
127362306a36Sopenharmony_ci#define OP_ALG_PKMODE_CLEARMEM	0x00001
127462306a36Sopenharmony_ci
127562306a36Sopenharmony_ci/* PKHA mode modular-arithmetic functions */
127662306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_IN_MONTY	0x80000
127762306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_OUT_MONTY	0x40000
127862306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_F2M		0x20000
127962306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_R2_IN		0x10000
128062306a36Sopenharmony_ci#define OP_ALG_PKMODE_PRJECTV		0x00800
128162306a36Sopenharmony_ci#define OP_ALG_PKMODE_TIME_EQ		0x400
128262306a36Sopenharmony_ci#define OP_ALG_PKMODE_OUT_B		0x000
128362306a36Sopenharmony_ci#define OP_ALG_PKMODE_OUT_A		0x100
128462306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ADD		0x002
128562306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_SUB_AB	0x003
128662306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_SUB_BA	0x004
128762306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_MULT		0x005
128862306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_EXPO		0x006
128962306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_REDUCT	0x007
129062306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_INV		0x008
129162306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_ADD	0x009
129262306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_DBL	0x00a
129362306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_ECC_MULT	0x00b
129462306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_MONT_CNST	0x00c
129562306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_CRT_CNST	0x00d
129662306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_GCD		0x00e
129762306a36Sopenharmony_ci#define OP_ALG_PKMODE_MOD_PRIMALITY	0x00f
129862306a36Sopenharmony_ci
129962306a36Sopenharmony_ci/* PKHA mode copy-memory functions */
130062306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_SHIFT	17
130162306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_MASK	(7 << OP_ALG_PKMODE_SRC_REG_SHIFT)
130262306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_SHIFT	10
130362306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_MASK	(7 << OP_ALG_PKMODE_DST_REG_SHIFT)
130462306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_SHIFT	8
130562306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_MASK	(3 << OP_ALG_PKMODE_SRC_SEG_SHIFT)
130662306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_SHIFT	6
130762306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_MASK	(3 << OP_ALG_PKMODE_DST_SEG_SHIFT)
130862306a36Sopenharmony_ci
130962306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_A		(0 << OP_ALG_PKMODE_SRC_REG_SHIFT)
131062306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_B		(1 << OP_ALG_PKMODE_SRC_REG_SHIFT)
131162306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_REG_N		(3 << OP_ALG_PKMODE_SRC_REG_SHIFT)
131262306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_A		(0 << OP_ALG_PKMODE_DST_REG_SHIFT)
131362306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_B		(1 << OP_ALG_PKMODE_DST_REG_SHIFT)
131462306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_E		(2 << OP_ALG_PKMODE_DST_REG_SHIFT)
131562306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_REG_N		(3 << OP_ALG_PKMODE_DST_REG_SHIFT)
131662306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_0		(0 << OP_ALG_PKMODE_SRC_SEG_SHIFT)
131762306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_1		(1 << OP_ALG_PKMODE_SRC_SEG_SHIFT)
131862306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_2		(2 << OP_ALG_PKMODE_SRC_SEG_SHIFT)
131962306a36Sopenharmony_ci#define OP_ALG_PKMODE_SRC_SEG_3		(3 << OP_ALG_PKMODE_SRC_SEG_SHIFT)
132062306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_0		(0 << OP_ALG_PKMODE_DST_SEG_SHIFT)
132162306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_1		(1 << OP_ALG_PKMODE_DST_SEG_SHIFT)
132262306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_2		(2 << OP_ALG_PKMODE_DST_SEG_SHIFT)
132362306a36Sopenharmony_ci#define OP_ALG_PKMODE_DST_SEG_3		(3 << OP_ALG_PKMODE_DST_SEG_SHIFT)
132462306a36Sopenharmony_ci#define OP_ALG_PKMODE_CPYMEM_N_SZ	0x80
132562306a36Sopenharmony_ci#define OP_ALG_PKMODE_CPYMEM_SRC_SZ	0x81
132662306a36Sopenharmony_ci
132762306a36Sopenharmony_ci/*
132862306a36Sopenharmony_ci * SEQ_IN_PTR Command Constructs
132962306a36Sopenharmony_ci */
133062306a36Sopenharmony_ci
133162306a36Sopenharmony_ci/* Release Buffers */
133262306a36Sopenharmony_ci#define SQIN_RBS	0x04000000
133362306a36Sopenharmony_ci
133462306a36Sopenharmony_ci/* Sequence pointer is really a descriptor */
133562306a36Sopenharmony_ci#define SQIN_INL	0x02000000
133662306a36Sopenharmony_ci
133762306a36Sopenharmony_ci/* Sequence pointer is a scatter-gather table */
133862306a36Sopenharmony_ci#define SQIN_SGF	0x01000000
133962306a36Sopenharmony_ci
134062306a36Sopenharmony_ci/* Appends to a previous pointer */
134162306a36Sopenharmony_ci#define SQIN_PRE	0x00800000
134262306a36Sopenharmony_ci
134362306a36Sopenharmony_ci/* Use extended length following pointer */
134462306a36Sopenharmony_ci#define SQIN_EXT	0x00400000
134562306a36Sopenharmony_ci
134662306a36Sopenharmony_ci/* Restore sequence with pointer/length */
134762306a36Sopenharmony_ci#define SQIN_RTO	0x00200000
134862306a36Sopenharmony_ci
134962306a36Sopenharmony_ci/* Replace job descriptor */
135062306a36Sopenharmony_ci#define SQIN_RJD	0x00100000
135162306a36Sopenharmony_ci
135262306a36Sopenharmony_ci#define SQIN_LEN_SHIFT		 0
135362306a36Sopenharmony_ci#define SQIN_LEN_MASK		(0xffff << SQIN_LEN_SHIFT)
135462306a36Sopenharmony_ci
135562306a36Sopenharmony_ci/*
135662306a36Sopenharmony_ci * SEQ_OUT_PTR Command Constructs
135762306a36Sopenharmony_ci */
135862306a36Sopenharmony_ci
135962306a36Sopenharmony_ci/* Sequence pointer is a scatter-gather table */
136062306a36Sopenharmony_ci#define SQOUT_SGF	0x01000000
136162306a36Sopenharmony_ci
136262306a36Sopenharmony_ci/* Appends to a previous pointer */
136362306a36Sopenharmony_ci#define SQOUT_PRE	SQIN_PRE
136462306a36Sopenharmony_ci
136562306a36Sopenharmony_ci/* Restore sequence with pointer/length */
136662306a36Sopenharmony_ci#define SQOUT_RTO	 SQIN_RTO
136762306a36Sopenharmony_ci
136862306a36Sopenharmony_ci/* Use extended length following pointer */
136962306a36Sopenharmony_ci#define SQOUT_EXT	0x00400000
137062306a36Sopenharmony_ci
137162306a36Sopenharmony_ci#define SQOUT_LEN_SHIFT		0
137262306a36Sopenharmony_ci#define SQOUT_LEN_MASK		(0xffff << SQOUT_LEN_SHIFT)
137362306a36Sopenharmony_ci
137462306a36Sopenharmony_ci
137562306a36Sopenharmony_ci/*
137662306a36Sopenharmony_ci * SIGNATURE Command Constructs
137762306a36Sopenharmony_ci */
137862306a36Sopenharmony_ci
137962306a36Sopenharmony_ci/* TYPE field is all that's relevant */
138062306a36Sopenharmony_ci#define SIGN_TYPE_SHIFT		16
138162306a36Sopenharmony_ci#define SIGN_TYPE_MASK		(0x0f << SIGN_TYPE_SHIFT)
138262306a36Sopenharmony_ci
138362306a36Sopenharmony_ci#define SIGN_TYPE_FINAL		(0x00 << SIGN_TYPE_SHIFT)
138462306a36Sopenharmony_ci#define SIGN_TYPE_FINAL_RESTORE (0x01 << SIGN_TYPE_SHIFT)
138562306a36Sopenharmony_ci#define SIGN_TYPE_FINAL_NONZERO (0x02 << SIGN_TYPE_SHIFT)
138662306a36Sopenharmony_ci#define SIGN_TYPE_IMM_2		(0x0a << SIGN_TYPE_SHIFT)
138762306a36Sopenharmony_ci#define SIGN_TYPE_IMM_3		(0x0b << SIGN_TYPE_SHIFT)
138862306a36Sopenharmony_ci#define SIGN_TYPE_IMM_4		(0x0c << SIGN_TYPE_SHIFT)
138962306a36Sopenharmony_ci
139062306a36Sopenharmony_ci/*
139162306a36Sopenharmony_ci * MOVE Command Constructs
139262306a36Sopenharmony_ci */
139362306a36Sopenharmony_ci
139462306a36Sopenharmony_ci#define MOVE_AUX_SHIFT		25
139562306a36Sopenharmony_ci#define MOVE_AUX_MASK		(3 << MOVE_AUX_SHIFT)
139662306a36Sopenharmony_ci#define MOVE_AUX_MS		(2 << MOVE_AUX_SHIFT)
139762306a36Sopenharmony_ci#define MOVE_AUX_LS		(1 << MOVE_AUX_SHIFT)
139862306a36Sopenharmony_ci
139962306a36Sopenharmony_ci#define MOVE_WAITCOMP_SHIFT	24
140062306a36Sopenharmony_ci#define MOVE_WAITCOMP_MASK	(1 << MOVE_WAITCOMP_SHIFT)
140162306a36Sopenharmony_ci#define MOVE_WAITCOMP		(1 << MOVE_WAITCOMP_SHIFT)
140262306a36Sopenharmony_ci
140362306a36Sopenharmony_ci#define MOVE_SRC_SHIFT		20
140462306a36Sopenharmony_ci#define MOVE_SRC_MASK		(0x0f << MOVE_SRC_SHIFT)
140562306a36Sopenharmony_ci#define MOVE_SRC_CLASS1CTX	(0x00 << MOVE_SRC_SHIFT)
140662306a36Sopenharmony_ci#define MOVE_SRC_CLASS2CTX	(0x01 << MOVE_SRC_SHIFT)
140762306a36Sopenharmony_ci#define MOVE_SRC_OUTFIFO	(0x02 << MOVE_SRC_SHIFT)
140862306a36Sopenharmony_ci#define MOVE_SRC_DESCBUF	(0x03 << MOVE_SRC_SHIFT)
140962306a36Sopenharmony_ci#define MOVE_SRC_MATH0		(0x04 << MOVE_SRC_SHIFT)
141062306a36Sopenharmony_ci#define MOVE_SRC_MATH1		(0x05 << MOVE_SRC_SHIFT)
141162306a36Sopenharmony_ci#define MOVE_SRC_MATH2		(0x06 << MOVE_SRC_SHIFT)
141262306a36Sopenharmony_ci#define MOVE_SRC_MATH3		(0x07 << MOVE_SRC_SHIFT)
141362306a36Sopenharmony_ci#define MOVE_SRC_INFIFO		(0x08 << MOVE_SRC_SHIFT)
141462306a36Sopenharmony_ci#define MOVE_SRC_INFIFO_CL	(0x09 << MOVE_SRC_SHIFT)
141562306a36Sopenharmony_ci#define MOVE_SRC_AUX_ABLK	(0x0a << MOVE_SRC_SHIFT)
141662306a36Sopenharmony_ci
141762306a36Sopenharmony_ci#define MOVE_DEST_SHIFT		16
141862306a36Sopenharmony_ci#define MOVE_DEST_MASK		(0x0f << MOVE_DEST_SHIFT)
141962306a36Sopenharmony_ci#define MOVE_DEST_CLASS1CTX	(0x00 << MOVE_DEST_SHIFT)
142062306a36Sopenharmony_ci#define MOVE_DEST_CLASS2CTX	(0x01 << MOVE_DEST_SHIFT)
142162306a36Sopenharmony_ci#define MOVE_DEST_OUTFIFO	(0x02 << MOVE_DEST_SHIFT)
142262306a36Sopenharmony_ci#define MOVE_DEST_DESCBUF	(0x03 << MOVE_DEST_SHIFT)
142362306a36Sopenharmony_ci#define MOVE_DEST_MATH0		(0x04 << MOVE_DEST_SHIFT)
142462306a36Sopenharmony_ci#define MOVE_DEST_MATH1		(0x05 << MOVE_DEST_SHIFT)
142562306a36Sopenharmony_ci#define MOVE_DEST_MATH2		(0x06 << MOVE_DEST_SHIFT)
142662306a36Sopenharmony_ci#define MOVE_DEST_MATH3		(0x07 << MOVE_DEST_SHIFT)
142762306a36Sopenharmony_ci#define MOVE_DEST_CLASS1INFIFO	(0x08 << MOVE_DEST_SHIFT)
142862306a36Sopenharmony_ci#define MOVE_DEST_CLASS2INFIFO	(0x09 << MOVE_DEST_SHIFT)
142962306a36Sopenharmony_ci#define MOVE_DEST_INFIFO_NOINFO (0x0a << MOVE_DEST_SHIFT)
143062306a36Sopenharmony_ci#define MOVE_DEST_PK_A		(0x0c << MOVE_DEST_SHIFT)
143162306a36Sopenharmony_ci#define MOVE_DEST_CLASS1KEY	(0x0d << MOVE_DEST_SHIFT)
143262306a36Sopenharmony_ci#define MOVE_DEST_CLASS2KEY	(0x0e << MOVE_DEST_SHIFT)
143362306a36Sopenharmony_ci
143462306a36Sopenharmony_ci#define MOVE_OFFSET_SHIFT	8
143562306a36Sopenharmony_ci#define MOVE_OFFSET_MASK	(0xff << MOVE_OFFSET_SHIFT)
143662306a36Sopenharmony_ci
143762306a36Sopenharmony_ci#define MOVE_LEN_SHIFT		0
143862306a36Sopenharmony_ci#define MOVE_LEN_MASK		(0xff << MOVE_LEN_SHIFT)
143962306a36Sopenharmony_ci
144062306a36Sopenharmony_ci#define MOVELEN_MRSEL_SHIFT	0
144162306a36Sopenharmony_ci#define MOVELEN_MRSEL_MASK	(0x3 << MOVE_LEN_SHIFT)
144262306a36Sopenharmony_ci#define MOVELEN_MRSEL_MATH0	(0 << MOVELEN_MRSEL_SHIFT)
144362306a36Sopenharmony_ci#define MOVELEN_MRSEL_MATH1	(1 << MOVELEN_MRSEL_SHIFT)
144462306a36Sopenharmony_ci#define MOVELEN_MRSEL_MATH2	(2 << MOVELEN_MRSEL_SHIFT)
144562306a36Sopenharmony_ci#define MOVELEN_MRSEL_MATH3	(3 << MOVELEN_MRSEL_SHIFT)
144662306a36Sopenharmony_ci
144762306a36Sopenharmony_ci/*
144862306a36Sopenharmony_ci * MATH Command Constructs
144962306a36Sopenharmony_ci */
145062306a36Sopenharmony_ci
145162306a36Sopenharmony_ci#define MATH_IFB_SHIFT		26
145262306a36Sopenharmony_ci#define MATH_IFB_MASK		(1 << MATH_IFB_SHIFT)
145362306a36Sopenharmony_ci#define MATH_IFB		(1 << MATH_IFB_SHIFT)
145462306a36Sopenharmony_ci
145562306a36Sopenharmony_ci#define MATH_NFU_SHIFT		25
145662306a36Sopenharmony_ci#define MATH_NFU_MASK		(1 << MATH_NFU_SHIFT)
145762306a36Sopenharmony_ci#define MATH_NFU		(1 << MATH_NFU_SHIFT)
145862306a36Sopenharmony_ci
145962306a36Sopenharmony_ci#define MATH_STL_SHIFT		24
146062306a36Sopenharmony_ci#define MATH_STL_MASK		(1 << MATH_STL_SHIFT)
146162306a36Sopenharmony_ci#define MATH_STL		(1 << MATH_STL_SHIFT)
146262306a36Sopenharmony_ci
146362306a36Sopenharmony_ci/* Function selectors */
146462306a36Sopenharmony_ci#define MATH_FUN_SHIFT		20
146562306a36Sopenharmony_ci#define MATH_FUN_MASK		(0x0f << MATH_FUN_SHIFT)
146662306a36Sopenharmony_ci#define MATH_FUN_ADD		(0x00 << MATH_FUN_SHIFT)
146762306a36Sopenharmony_ci#define MATH_FUN_ADDC		(0x01 << MATH_FUN_SHIFT)
146862306a36Sopenharmony_ci#define MATH_FUN_SUB		(0x02 << MATH_FUN_SHIFT)
146962306a36Sopenharmony_ci#define MATH_FUN_SUBB		(0x03 << MATH_FUN_SHIFT)
147062306a36Sopenharmony_ci#define MATH_FUN_OR		(0x04 << MATH_FUN_SHIFT)
147162306a36Sopenharmony_ci#define MATH_FUN_AND		(0x05 << MATH_FUN_SHIFT)
147262306a36Sopenharmony_ci#define MATH_FUN_XOR		(0x06 << MATH_FUN_SHIFT)
147362306a36Sopenharmony_ci#define MATH_FUN_LSHIFT		(0x07 << MATH_FUN_SHIFT)
147462306a36Sopenharmony_ci#define MATH_FUN_RSHIFT		(0x08 << MATH_FUN_SHIFT)
147562306a36Sopenharmony_ci#define MATH_FUN_SHLD		(0x09 << MATH_FUN_SHIFT)
147662306a36Sopenharmony_ci#define MATH_FUN_ZBYT		(0x0a << MATH_FUN_SHIFT)
147762306a36Sopenharmony_ci
147862306a36Sopenharmony_ci/* Source 0 selectors */
147962306a36Sopenharmony_ci#define MATH_SRC0_SHIFT		16
148062306a36Sopenharmony_ci#define MATH_SRC0_MASK		(0x0f << MATH_SRC0_SHIFT)
148162306a36Sopenharmony_ci#define MATH_SRC0_REG0		(0x00 << MATH_SRC0_SHIFT)
148262306a36Sopenharmony_ci#define MATH_SRC0_REG1		(0x01 << MATH_SRC0_SHIFT)
148362306a36Sopenharmony_ci#define MATH_SRC0_REG2		(0x02 << MATH_SRC0_SHIFT)
148462306a36Sopenharmony_ci#define MATH_SRC0_REG3		(0x03 << MATH_SRC0_SHIFT)
148562306a36Sopenharmony_ci#define MATH_SRC0_IMM		(0x04 << MATH_SRC0_SHIFT)
148662306a36Sopenharmony_ci#define MATH_SRC0_DPOVRD	(0x07 << MATH_SRC0_SHIFT)
148762306a36Sopenharmony_ci#define MATH_SRC0_SEQINLEN	(0x08 << MATH_SRC0_SHIFT)
148862306a36Sopenharmony_ci#define MATH_SRC0_SEQOUTLEN	(0x09 << MATH_SRC0_SHIFT)
148962306a36Sopenharmony_ci#define MATH_SRC0_VARSEQINLEN	(0x0a << MATH_SRC0_SHIFT)
149062306a36Sopenharmony_ci#define MATH_SRC0_VARSEQOUTLEN	(0x0b << MATH_SRC0_SHIFT)
149162306a36Sopenharmony_ci#define MATH_SRC0_ZERO		(0x0c << MATH_SRC0_SHIFT)
149262306a36Sopenharmony_ci
149362306a36Sopenharmony_ci/* Source 1 selectors */
149462306a36Sopenharmony_ci#define MATH_SRC1_SHIFT		12
149562306a36Sopenharmony_ci#define MATH_SRC1_MASK		(0x0f << MATH_SRC1_SHIFT)
149662306a36Sopenharmony_ci#define MATH_SRC1_REG0		(0x00 << MATH_SRC1_SHIFT)
149762306a36Sopenharmony_ci#define MATH_SRC1_REG1		(0x01 << MATH_SRC1_SHIFT)
149862306a36Sopenharmony_ci#define MATH_SRC1_REG2		(0x02 << MATH_SRC1_SHIFT)
149962306a36Sopenharmony_ci#define MATH_SRC1_REG3		(0x03 << MATH_SRC1_SHIFT)
150062306a36Sopenharmony_ci#define MATH_SRC1_IMM		(0x04 << MATH_SRC1_SHIFT)
150162306a36Sopenharmony_ci#define MATH_SRC1_DPOVRD	(0x07 << MATH_SRC1_SHIFT)
150262306a36Sopenharmony_ci#define MATH_SRC1_INFIFO	(0x0a << MATH_SRC1_SHIFT)
150362306a36Sopenharmony_ci#define MATH_SRC1_OUTFIFO	(0x0b << MATH_SRC1_SHIFT)
150462306a36Sopenharmony_ci#define MATH_SRC1_ONE		(0x0c << MATH_SRC1_SHIFT)
150562306a36Sopenharmony_ci
150662306a36Sopenharmony_ci/* Destination selectors */
150762306a36Sopenharmony_ci#define MATH_DEST_SHIFT		8
150862306a36Sopenharmony_ci#define MATH_DEST_MASK		(0x0f << MATH_DEST_SHIFT)
150962306a36Sopenharmony_ci#define MATH_DEST_REG0		(0x00 << MATH_DEST_SHIFT)
151062306a36Sopenharmony_ci#define MATH_DEST_REG1		(0x01 << MATH_DEST_SHIFT)
151162306a36Sopenharmony_ci#define MATH_DEST_REG2		(0x02 << MATH_DEST_SHIFT)
151262306a36Sopenharmony_ci#define MATH_DEST_REG3		(0x03 << MATH_DEST_SHIFT)
151362306a36Sopenharmony_ci#define MATH_DEST_DPOVRD	(0x07 << MATH_DEST_SHIFT)
151462306a36Sopenharmony_ci#define MATH_DEST_SEQINLEN	(0x08 << MATH_DEST_SHIFT)
151562306a36Sopenharmony_ci#define MATH_DEST_SEQOUTLEN	(0x09 << MATH_DEST_SHIFT)
151662306a36Sopenharmony_ci#define MATH_DEST_VARSEQINLEN	(0x0a << MATH_DEST_SHIFT)
151762306a36Sopenharmony_ci#define MATH_DEST_VARSEQOUTLEN	(0x0b << MATH_DEST_SHIFT)
151862306a36Sopenharmony_ci#define MATH_DEST_NONE		(0x0f << MATH_DEST_SHIFT)
151962306a36Sopenharmony_ci
152062306a36Sopenharmony_ci/* Length selectors */
152162306a36Sopenharmony_ci#define MATH_LEN_SHIFT		0
152262306a36Sopenharmony_ci#define MATH_LEN_MASK		(0x0f << MATH_LEN_SHIFT)
152362306a36Sopenharmony_ci#define MATH_LEN_1BYTE		0x01
152462306a36Sopenharmony_ci#define MATH_LEN_2BYTE		0x02
152562306a36Sopenharmony_ci#define MATH_LEN_4BYTE		0x04
152662306a36Sopenharmony_ci#define MATH_LEN_8BYTE		0x08
152762306a36Sopenharmony_ci
152862306a36Sopenharmony_ci/*
152962306a36Sopenharmony_ci * JUMP Command Constructs
153062306a36Sopenharmony_ci */
153162306a36Sopenharmony_ci
153262306a36Sopenharmony_ci#define JUMP_CLASS_SHIFT	25
153362306a36Sopenharmony_ci#define JUMP_CLASS_MASK		(3 << JUMP_CLASS_SHIFT)
153462306a36Sopenharmony_ci#define JUMP_CLASS_NONE		0
153562306a36Sopenharmony_ci#define JUMP_CLASS_CLASS1	(1 << JUMP_CLASS_SHIFT)
153662306a36Sopenharmony_ci#define JUMP_CLASS_CLASS2	(2 << JUMP_CLASS_SHIFT)
153762306a36Sopenharmony_ci#define JUMP_CLASS_BOTH		(3 << JUMP_CLASS_SHIFT)
153862306a36Sopenharmony_ci
153962306a36Sopenharmony_ci#define JUMP_JSL_SHIFT		24
154062306a36Sopenharmony_ci#define JUMP_JSL_MASK		(1 << JUMP_JSL_SHIFT)
154162306a36Sopenharmony_ci#define JUMP_JSL		(1 << JUMP_JSL_SHIFT)
154262306a36Sopenharmony_ci
154362306a36Sopenharmony_ci#define JUMP_TYPE_SHIFT		22
154462306a36Sopenharmony_ci#define JUMP_TYPE_LOCAL		(0x00 << JUMP_TYPE_SHIFT)
154562306a36Sopenharmony_ci#define JUMP_TYPE_NONLOCAL	(0x01 << JUMP_TYPE_SHIFT)
154662306a36Sopenharmony_ci#define JUMP_TYPE_HALT		(0x02 << JUMP_TYPE_SHIFT)
154762306a36Sopenharmony_ci#define JUMP_TYPE_HALT_USER	(0x03 << JUMP_TYPE_SHIFT)
154862306a36Sopenharmony_ci
154962306a36Sopenharmony_ci#define JUMP_TEST_SHIFT		16
155062306a36Sopenharmony_ci#define JUMP_TEST_MASK		(0x03 << JUMP_TEST_SHIFT)
155162306a36Sopenharmony_ci#define JUMP_TEST_ALL		(0x00 << JUMP_TEST_SHIFT)
155262306a36Sopenharmony_ci#define JUMP_TEST_INVALL	(0x01 << JUMP_TEST_SHIFT)
155362306a36Sopenharmony_ci#define JUMP_TEST_ANY		(0x02 << JUMP_TEST_SHIFT)
155462306a36Sopenharmony_ci#define JUMP_TEST_INVANY	(0x03 << JUMP_TEST_SHIFT)
155562306a36Sopenharmony_ci
155662306a36Sopenharmony_ci/* Condition codes. JSL bit is factored in */
155762306a36Sopenharmony_ci#define JUMP_COND_SHIFT		8
155862306a36Sopenharmony_ci#define JUMP_COND_MASK		(0x100ff << JUMP_COND_SHIFT)
155962306a36Sopenharmony_ci#define JUMP_COND_PK_0		(0x80 << JUMP_COND_SHIFT)
156062306a36Sopenharmony_ci#define JUMP_COND_PK_GCD_1	(0x40 << JUMP_COND_SHIFT)
156162306a36Sopenharmony_ci#define JUMP_COND_PK_PRIME	(0x20 << JUMP_COND_SHIFT)
156262306a36Sopenharmony_ci#define JUMP_COND_MATH_N	(0x08 << JUMP_COND_SHIFT)
156362306a36Sopenharmony_ci#define JUMP_COND_MATH_Z	(0x04 << JUMP_COND_SHIFT)
156462306a36Sopenharmony_ci#define JUMP_COND_MATH_C	(0x02 << JUMP_COND_SHIFT)
156562306a36Sopenharmony_ci#define JUMP_COND_MATH_NV	(0x01 << JUMP_COND_SHIFT)
156662306a36Sopenharmony_ci
156762306a36Sopenharmony_ci#define JUMP_COND_JRP		((0x80 << JUMP_COND_SHIFT) | JUMP_JSL)
156862306a36Sopenharmony_ci#define JUMP_COND_SHRD		((0x40 << JUMP_COND_SHIFT) | JUMP_JSL)
156962306a36Sopenharmony_ci#define JUMP_COND_SELF		((0x20 << JUMP_COND_SHIFT) | JUMP_JSL)
157062306a36Sopenharmony_ci#define JUMP_COND_CALM		((0x10 << JUMP_COND_SHIFT) | JUMP_JSL)
157162306a36Sopenharmony_ci#define JUMP_COND_NIP		((0x08 << JUMP_COND_SHIFT) | JUMP_JSL)
157262306a36Sopenharmony_ci#define JUMP_COND_NIFP		((0x04 << JUMP_COND_SHIFT) | JUMP_JSL)
157362306a36Sopenharmony_ci#define JUMP_COND_NOP		((0x02 << JUMP_COND_SHIFT) | JUMP_JSL)
157462306a36Sopenharmony_ci#define JUMP_COND_NCP		((0x01 << JUMP_COND_SHIFT) | JUMP_JSL)
157562306a36Sopenharmony_ci
157662306a36Sopenharmony_ci#define JUMP_OFFSET_SHIFT	0
157762306a36Sopenharmony_ci#define JUMP_OFFSET_MASK	(0xff << JUMP_OFFSET_SHIFT)
157862306a36Sopenharmony_ci
157962306a36Sopenharmony_ci/*
158062306a36Sopenharmony_ci * NFIFO ENTRY
158162306a36Sopenharmony_ci * Data Constructs
158262306a36Sopenharmony_ci *
158362306a36Sopenharmony_ci */
158462306a36Sopenharmony_ci#define NFIFOENTRY_DEST_SHIFT	30
158562306a36Sopenharmony_ci#define NFIFOENTRY_DEST_MASK	(3 << NFIFOENTRY_DEST_SHIFT)
158662306a36Sopenharmony_ci#define NFIFOENTRY_DEST_DECO	(0 << NFIFOENTRY_DEST_SHIFT)
158762306a36Sopenharmony_ci#define NFIFOENTRY_DEST_CLASS1	(1 << NFIFOENTRY_DEST_SHIFT)
158862306a36Sopenharmony_ci#define NFIFOENTRY_DEST_CLASS2	(2 << NFIFOENTRY_DEST_SHIFT)
158962306a36Sopenharmony_ci#define NFIFOENTRY_DEST_BOTH	(3 << NFIFOENTRY_DEST_SHIFT)
159062306a36Sopenharmony_ci
159162306a36Sopenharmony_ci#define NFIFOENTRY_LC2_SHIFT	29
159262306a36Sopenharmony_ci#define NFIFOENTRY_LC2_MASK	(1 << NFIFOENTRY_LC2_SHIFT)
159362306a36Sopenharmony_ci#define NFIFOENTRY_LC2		(1 << NFIFOENTRY_LC2_SHIFT)
159462306a36Sopenharmony_ci
159562306a36Sopenharmony_ci#define NFIFOENTRY_LC1_SHIFT	28
159662306a36Sopenharmony_ci#define NFIFOENTRY_LC1_MASK	(1 << NFIFOENTRY_LC1_SHIFT)
159762306a36Sopenharmony_ci#define NFIFOENTRY_LC1		(1 << NFIFOENTRY_LC1_SHIFT)
159862306a36Sopenharmony_ci
159962306a36Sopenharmony_ci#define NFIFOENTRY_FC2_SHIFT	27
160062306a36Sopenharmony_ci#define NFIFOENTRY_FC2_MASK	(1 << NFIFOENTRY_FC2_SHIFT)
160162306a36Sopenharmony_ci#define NFIFOENTRY_FC2		(1 << NFIFOENTRY_FC2_SHIFT)
160262306a36Sopenharmony_ci
160362306a36Sopenharmony_ci#define NFIFOENTRY_FC1_SHIFT	26
160462306a36Sopenharmony_ci#define NFIFOENTRY_FC1_MASK	(1 << NFIFOENTRY_FC1_SHIFT)
160562306a36Sopenharmony_ci#define NFIFOENTRY_FC1		(1 << NFIFOENTRY_FC1_SHIFT)
160662306a36Sopenharmony_ci
160762306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_SHIFT	24
160862306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_MASK	(3 << NFIFOENTRY_STYPE_SHIFT)
160962306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_DFIFO	(0 << NFIFOENTRY_STYPE_SHIFT)
161062306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_OFIFO	(1 << NFIFOENTRY_STYPE_SHIFT)
161162306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_PAD	(2 << NFIFOENTRY_STYPE_SHIFT)
161262306a36Sopenharmony_ci#define NFIFOENTRY_STYPE_SNOOP	(3 << NFIFOENTRY_STYPE_SHIFT)
161362306a36Sopenharmony_ci
161462306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_SHIFT	20
161562306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_MASK	(0xF << NFIFOENTRY_DTYPE_SHIFT)
161662306a36Sopenharmony_ci
161762306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_SBOX	(0x0 << NFIFOENTRY_DTYPE_SHIFT)
161862306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_AAD	(0x1 << NFIFOENTRY_DTYPE_SHIFT)
161962306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_IV	(0x2 << NFIFOENTRY_DTYPE_SHIFT)
162062306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_SAD	(0x3 << NFIFOENTRY_DTYPE_SHIFT)
162162306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_ICV	(0xA << NFIFOENTRY_DTYPE_SHIFT)
162262306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_POLY	(0xB << NFIFOENTRY_DTYPE_SHIFT)
162362306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_SKIP	(0xE << NFIFOENTRY_DTYPE_SHIFT)
162462306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_MSG	(0xF << NFIFOENTRY_DTYPE_SHIFT)
162562306a36Sopenharmony_ci
162662306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A0	(0x0 << NFIFOENTRY_DTYPE_SHIFT)
162762306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A1	(0x1 << NFIFOENTRY_DTYPE_SHIFT)
162862306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A2	(0x2 << NFIFOENTRY_DTYPE_SHIFT)
162962306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A3	(0x3 << NFIFOENTRY_DTYPE_SHIFT)
163062306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B0	(0x4 << NFIFOENTRY_DTYPE_SHIFT)
163162306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B1	(0x5 << NFIFOENTRY_DTYPE_SHIFT)
163262306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B2	(0x6 << NFIFOENTRY_DTYPE_SHIFT)
163362306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B3	(0x7 << NFIFOENTRY_DTYPE_SHIFT)
163462306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_N	(0x8 << NFIFOENTRY_DTYPE_SHIFT)
163562306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_E	(0x9 << NFIFOENTRY_DTYPE_SHIFT)
163662306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_A	(0xC << NFIFOENTRY_DTYPE_SHIFT)
163762306a36Sopenharmony_ci#define NFIFOENTRY_DTYPE_PK_B	(0xD << NFIFOENTRY_DTYPE_SHIFT)
163862306a36Sopenharmony_ci
163962306a36Sopenharmony_ci
164062306a36Sopenharmony_ci#define NFIFOENTRY_BND_SHIFT	19
164162306a36Sopenharmony_ci#define NFIFOENTRY_BND_MASK	(1 << NFIFOENTRY_BND_SHIFT)
164262306a36Sopenharmony_ci#define NFIFOENTRY_BND		(1 << NFIFOENTRY_BND_SHIFT)
164362306a36Sopenharmony_ci
164462306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_SHIFT	16
164562306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_MASK	(0x7 << NFIFOENTRY_PTYPE_SHIFT)
164662306a36Sopenharmony_ci
164762306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_ZEROS		(0x0 << NFIFOENTRY_PTYPE_SHIFT)
164862306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NOZEROS	(0x1 << NFIFOENTRY_PTYPE_SHIFT)
164962306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_INCREMENT	(0x2 << NFIFOENTRY_PTYPE_SHIFT)
165062306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND		(0x3 << NFIFOENTRY_PTYPE_SHIFT)
165162306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_ZEROS_NZ	(0x4 << NFIFOENTRY_PTYPE_SHIFT)
165262306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NZ_LZ	(0x5 << NFIFOENTRY_PTYPE_SHIFT)
165362306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_N		(0x6 << NFIFOENTRY_PTYPE_SHIFT)
165462306a36Sopenharmony_ci#define NFIFOENTRY_PTYPE_RND_NZ_N	(0x7 << NFIFOENTRY_PTYPE_SHIFT)
165562306a36Sopenharmony_ci
165662306a36Sopenharmony_ci#define NFIFOENTRY_OC_SHIFT	15
165762306a36Sopenharmony_ci#define NFIFOENTRY_OC_MASK	(1 << NFIFOENTRY_OC_SHIFT)
165862306a36Sopenharmony_ci#define NFIFOENTRY_OC		(1 << NFIFOENTRY_OC_SHIFT)
165962306a36Sopenharmony_ci
166062306a36Sopenharmony_ci#define NFIFOENTRY_AST_SHIFT	14
166162306a36Sopenharmony_ci#define NFIFOENTRY_AST_MASK	(1 << NFIFOENTRY_OC_SHIFT)
166262306a36Sopenharmony_ci#define NFIFOENTRY_AST		(1 << NFIFOENTRY_OC_SHIFT)
166362306a36Sopenharmony_ci
166462306a36Sopenharmony_ci#define NFIFOENTRY_BM_SHIFT	11
166562306a36Sopenharmony_ci#define NFIFOENTRY_BM_MASK	(1 << NFIFOENTRY_BM_SHIFT)
166662306a36Sopenharmony_ci#define NFIFOENTRY_BM		(1 << NFIFOENTRY_BM_SHIFT)
166762306a36Sopenharmony_ci
166862306a36Sopenharmony_ci#define NFIFOENTRY_PS_SHIFT	10
166962306a36Sopenharmony_ci#define NFIFOENTRY_PS_MASK	(1 << NFIFOENTRY_PS_SHIFT)
167062306a36Sopenharmony_ci#define NFIFOENTRY_PS		(1 << NFIFOENTRY_PS_SHIFT)
167162306a36Sopenharmony_ci
167262306a36Sopenharmony_ci#define NFIFOENTRY_DLEN_SHIFT	0
167362306a36Sopenharmony_ci#define NFIFOENTRY_DLEN_MASK	(0xFFF << NFIFOENTRY_DLEN_SHIFT)
167462306a36Sopenharmony_ci
167562306a36Sopenharmony_ci#define NFIFOENTRY_PLEN_SHIFT	0
167662306a36Sopenharmony_ci#define NFIFOENTRY_PLEN_MASK	(0xFF << NFIFOENTRY_PLEN_SHIFT)
167762306a36Sopenharmony_ci
167862306a36Sopenharmony_ci/* Append Load Immediate Command */
167962306a36Sopenharmony_ci#define FD_CMD_APPEND_LOAD_IMMEDIATE			0x80000000
168062306a36Sopenharmony_ci
168162306a36Sopenharmony_ci/* Set SEQ LIODN equal to the Non-SEQ LIODN for the job */
168262306a36Sopenharmony_ci#define FD_CMD_SET_SEQ_LIODN_EQUAL_NONSEQ_LIODN		0x40000000
168362306a36Sopenharmony_ci
168462306a36Sopenharmony_ci/* Frame Descriptor Command for Replacement Job Descriptor */
168562306a36Sopenharmony_ci#define FD_CMD_REPLACE_JOB_DESC				0x20000000
168662306a36Sopenharmony_ci
168762306a36Sopenharmony_ci#endif /* DESC_H */
1688