1*b9fcd28bSsimonb /* $NetBSD: octeon_cop2reg.h,v 1.2 2020/06/18 13:52:08 simonb Exp $ */ 2f693c922Shikaru 3f693c922Shikaru /* 4f693c922Shikaru * Copyright (c) 2008 Internet Initiative Japan, Inc. 5f693c922Shikaru * All rights reserved. 6f693c922Shikaru * 7f693c922Shikaru * Redistribution and use in source and binary forms, with or without 8f693c922Shikaru * modification, are permitted provided that the following conditions 9f693c922Shikaru * are met: 10f693c922Shikaru * 1. Redistributions of source code must retain the above copyright 11f693c922Shikaru * notice, this list of conditions and the following disclaimer. 12f693c922Shikaru * 2. Redistributions in binary form must reproduce the above copyright 13f693c922Shikaru * notice, this list of conditions and the following disclaimer in the 14f693c922Shikaru * documentation and/or other materials provided with the distribution. 15f693c922Shikaru * 16f693c922Shikaru * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17f693c922Shikaru * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18f693c922Shikaru * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19f693c922Shikaru * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20f693c922Shikaru * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21f693c922Shikaru * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22f693c922Shikaru * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23f693c922Shikaru * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24f693c922Shikaru * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25f693c922Shikaru * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26f693c922Shikaru * SUCH DAMAGE. 27f693c922Shikaru */ 28f693c922Shikaru 29f693c922Shikaru /* 30f693c922Shikaru * Cavium-Specific Instruction Summary 31f693c922Shikaru * Cavium Networks-Specific Instruction Description 32f693c922Shikaru * 33f693c922Shikaru * DMFC2 / DMTC2 instructions 34f693c922Shikaru */ 35f693c922Shikaru 36*b9fcd28bSsimonb #ifndef _OCTEON_COP2REG_H_ 37*b9fcd28bSsimonb #define _OCTEON_COP2REG_H_ 38f693c922Shikaru 39f693c922Shikaru /* 3DES */ 40f693c922Shikaru 41f693c922Shikaru #define CVM_MF_3DES_IV 0x0084 /* Load IV from 3DES Unit */ 42f693c922Shikaru #define CVM_MF_3DES_KEY 0x0080 /* Load Key from 3DES Unit */ 43f693c922Shikaru #define CVM_MF_3DES_RESULT 0x0088 /* Load Result from 3DES Unit */ 44f693c922Shikaru #define CVM_MT_3DES_DEC 0x408e /* 3DES Decrypt */ 45f693c922Shikaru #define CVM_MT_3DES_DEC_CBC 0x408c /* 3DES CBC Decrypt */ 46f693c922Shikaru #define CVM_MT_3DES_ENC 0x408a /* 3DES Encrypt */ 47f693c922Shikaru #define CVM_MT_3DES_ENC_CBC 0x4088 /* 3DES CBC Encrypt */ 48f693c922Shikaru #define CVM_MT_3DES_IV 0x0084 /* Load IV into 3DES Unit */ 49f693c922Shikaru #define CVM_MT_3DES_KEY 0x0080 /* Load Key into 3DES Unit */ 50f693c922Shikaru #define CVM_MT_3DES_RESULT 0x0098 /* Load Result into 3DES Unit */ 51f693c922Shikaru 52f693c922Shikaru /* AES */ 53f693c922Shikaru 54f693c922Shikaru #define CVM_MF_AES_INP0 0x0111 /* Load INP0 from AES Unit */ 55f693c922Shikaru #define CVM_MF_AES_IV 0x0102 /* Load IV from AES Unit */ 56f693c922Shikaru #define CVM_MF_AES_KEY 0x0104 /* Load Key from AES Unit */ 57f693c922Shikaru #define CVM_MF_AES_KEYLENGTH 0x0110 /* Load Keylength from AES Unit */ 58f693c922Shikaru #define CVM_MF_AES_RESINP 0x0100 /* Load Result/Input from AES Unit */ 59f693c922Shikaru #define CVM_MT_AES_DEC_CBC0 0x010c /* AES CBC Decrypt (part 1) */ 60f693c922Shikaru #define CVM_MT_AES_DEC_CBC1 0x310d /* AES CBC Decrypt (part 2) */ 61f693c922Shikaru #define CVM_MT_AES_DEC0 0x010e /* AES Decrypt (part 1) */ 62f693c922Shikaru #define CVM_MT_AES_DEC1 0x310f /* AES Decrypt (part 2) */ 63f693c922Shikaru #define CVM_MT_AES_ENC_CBC0 0x0108 /* AES CBC Encrypt (part 1) */ 64f693c922Shikaru #define CVM_MT_AES_ENC_CBC1 0x3109 /* AES CBC Encrypt (part 2) */ 65f693c922Shikaru #define CVM_MT_AES_ENC0 0x010a /* AES Encrypt (part 1) */ 66f693c922Shikaru #define CVM_MT_AES_ENC1 0x310b /* AES Encrypt (part 2) */ 67f693c922Shikaru #define CVM_MT_AES_IV 0x0102 /* Load IV into AES Unit */ 68f693c922Shikaru #define CVM_MT_AES_KEY 0x0104 /* Load Key into AES Unit */ 69f693c922Shikaru #define CVM_MT_AES_KEYLENGTH 0x0110 /* Load Keylength into AES Unit */ 70f693c922Shikaru #define CVM_MT_AES_RESINP 0x0100 /* Load Result/Input into AES Unit */ 71f693c922Shikaru 72f693c922Shikaru /* CRC */ 73f693c922Shikaru 74f693c922Shikaru #define CVM_MF_CRC_IV 0x0201 /* Load IV from CRC Unit */ 75f693c922Shikaru #define CVM_MF_CRC_IV_REFLECT 0x0203 /* Load IV from CRC Unit Reflected */ 76f693c922Shikaru #define CVM_MF_CRC_LEN 0x0202 /* Load Length from CRC Unit */ 77f693c922Shikaru #define CVM_MF_CRC_POLYNOMIAL 0x0200 /* Load Polynomial from CRC Unit */ 78f693c922Shikaru #define CVM_MT_CRC_BYTE 0x0204 /* CRC for a Byte */ 79f693c922Shikaru #define CVM_MT_CRC_BYTE_REFLECT 0x0214 /* CRC for a Byte Reflected */ 80f693c922Shikaru #define CVM_MT_CRC_DWORD 0x1207 /* CRC for a Double-word */ 81f693c922Shikaru #define CVM_MT_CRC_DWORD_REFLECT 0x1217 /* CRC for a Double-word Reflected */ 82f693c922Shikaru #define CVM_MT_CRC_HALF 0x0205 /* CRC for a Halfword */ 83f693c922Shikaru #define CVM_MT_CRC_HALF_REFLECT 0x0215 /* CRC for a Halfword Reflected */ 84f693c922Shikaru #define CVM_MT_CRC_IV 0x0201 /* Load IV into CRC Unit */ 85f693c922Shikaru #define CVM_MT_CRC_IV_REFLECT 0x0211 /* Load IV into CRC Unit Reflected */ 86f693c922Shikaru #define CVM_MT_CRC_LEN 0x1202 /* Load Length into CRC Unit */ 87f693c922Shikaru #define CVM_MT_CRC_POLYNOMIAL 0x4200 /* Load Polynomial into CRC Unit */ 88f693c922Shikaru #define CVM_MT_CRC_POLYNOMIAL_REFLECT 0x4210 /* Load Polynomial into CRC Unit Reflected */ 89f693c922Shikaru #define CVM_MT_CRC_VAR 0x1208 /* CRC for Variable Length */ 90f693c922Shikaru #define CVM_MT_CRC_VAR_REFLECT 0x1218 /* CRC for Variable Length Reflected */ 91f693c922Shikaru #define CVM_MT_CRC_WORD 0x0206 /* CRC for a Word */ 92f693c922Shikaru #define CVM_MT_CRC_WORD_REFLECT 0x0216 /* CRC for a Word Reflected */ 93f693c922Shikaru 94f693c922Shikaru /* GFM */ 95f693c922Shikaru 96f693c922Shikaru #define CVM_MF_GFM_MUL 0x0258 /* Load Multiplier from GFM Unit */ 97f693c922Shikaru #define CVM_MF_GFM_RESINP 0x025a /* Load Result/Input from GFM Unit */ 98f693c922Shikaru #define CVM_MF_GFM_POLY 0x025e /* Load Polynomial from GFM Unit */ 99f693c922Shikaru #define CVM_MT_GFM_MUL 0x0258 /* Load Multiplier into GFM Unit */ 100f693c922Shikaru #define CVM_MT_GFM_RESINP 0x025a /* Load Result/Input into GFM Unit */ 101f693c922Shikaru #define CVM_MT_GFM_XOR0 0x025c /* XOR into GFM Unit */ 102f693c922Shikaru #define CVM_MT_GFM_XORMUL1 0x425d /* XOR and GFM Multiply */ 103f693c922Shikaru #define CVM_MT_GFM_POLY 0x025e /* Load Polynomial into GFM Unit */ 104f693c922Shikaru 105f693c922Shikaru /* Hash */ 106f693c922Shikaru 107f693c922Shikaru #define CVM_MF_HSH_DAT 0x0040 /* Load Data from HSH Unit (narrow mode) */ 108f693c922Shikaru #define CVM_MF_HSH_DATW 0x0240 /* Load Data from HSH Unit (wide mode) */ 109f693c922Shikaru #define CVM_MF_HSH_IV 0x0048 /* Load IV from HSH Unit (narrow mode) */ 110f693c922Shikaru #define CVM_MF_HSH_IVW 0x0250 /* Load IV from HSH Unit (wide mode) */ 111f693c922Shikaru #define CVM_MT_HSH_DAT 0x0040 /* Load Data into HSH Unit (narrow mode) */ 112f693c922Shikaru #define CVM_MT_HSH_DATW 0x0240 /* Load Data into HSH Unit (wide mode) */ 113f693c922Shikaru #define CVM_MT_HSH_IV 0x0048 /* Load IV into HSH Unit (narrow mode) */ 114f693c922Shikaru #define CVM_MT_HSH_IVW 0x0250 /* Load IV into HSH Unit (wide mode) */ 115f693c922Shikaru #define CVM_MT_HSH_STANDARD5 0x4047 /* MD5 Hash */ 116f693c922Shikaru #define CVM_MT_HSH_STARTSHA 0x4057 /* SHA-1 Hash */ 117f693c922Shikaru #define CVM_MT_HSH_STARTSHA256 0x404f /* SHA-256 Hash */ 118f693c922Shikaru #define CVM_MT_HSH_STARTSHA512 0x424f /* SHA-512 Hash */ 119f693c922Shikaru 120f693c922Shikaru /* KASUMI */ 121f693c922Shikaru 122f693c922Shikaru #define CVM_MF_KAS_KEY 0x0080 /* Load Key from KASUMI Unit */ 123f693c922Shikaru #define CVM_MT_KAS_ENC_CBC 0x4089 /* KASUMI CBC Encrypt */ 124f693c922Shikaru #define CVM_MT_KAS_ENC 0x408b /* KASUMI Encrypt */ 125f693c922Shikaru #define CVM_MT_KAS_KEY 0x0080 /* Load Key into KASUMI Unit */ 126f693c922Shikaru #define CVM_MT_KAS_RESULT 0x0098 /* Load Result into KASUMI Unit */ 127f693c922Shikaru 128*b9fcd28bSsimonb #endif /* _OCTEON_COP2REG_H_ */ 129