diff options
author | 2004-02-03 08:42:19 +0000 | |
---|---|---|
committer | 2004-02-03 08:42:19 +0000 | |
commit | ec98d21bbe7beac0bed669ca74013642fc894d79 (patch) | |
tree | 4b4f763b1d7e057c9662ba30d5bf6b56d943a9b9 | |
parent | close socket on error in control_init (diff) | |
download | wireguard-openbsd-ec98d21bbe7beac0bed669ca74013642fc894d79.tar.xz wireguard-openbsd-ec98d21bbe7beac0bed669ca74013642fc894d79.zip |
move VIA xcrypt-* options to specialreg.h
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 23 | ||||
-rw-r--r-- | sys/arch/i386/include/specialreg.h | 24 |
2 files changed, 24 insertions, 23 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index c697c3a1e03..afd3e6e3f7a 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.273 2004/02/02 01:15:58 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.274 2004/02/03 08:42:19 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1186,30 +1186,9 @@ struct viac3_softc { #define VIAC3_SESSION(sid) ((sid) & 0x0fffffff) #define VIAC3_SID(crd,ses) (((crd) << 28) | ((ses) & 0x0fffffff)) -#define C3_CRYPT_CWLO_ROUND_M 0x0000000f -#define C3_CRYPT_CWLO_ALG_M 0x00000070 -#define C3_CRYPT_CWLO_ALG_AES 0x00000000 -#define C3_CRYPT_CWLO_KEYGEN_M 0x00000080 -#define C3_CRYPT_CWLO_KEYGEN_HW 0x00000000 -#define C3_CRYPT_CWLO_KEYGEN_SW 0x00000080 -#define C3_CRYPT_CWLO_NORMAL 0x00000000 -#define C3_CRYPT_CWLO_INTERMEDIATE 0x00000100 -#define C3_CRYPT_CWLO_ENCRYPT 0x00000000 -#define C3_CRYPT_CWLO_DECRYPT 0x00000200 -#define C3_CRYPT_CWLO_KEY128 0x0000000a /* 128bit, 10 rds */ -#define C3_CRYPT_CWLO_KEY192 0x0000040c /* 192bit, 12 rds */ -#define C3_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */ - static struct viac3_softc *vc3_sc; int viac3_crypto_present; -/* Opcodes */ -#define VIAC3_CRYPTOP_RNG 0xc0 /* rng */ -#define VIAC3_CRYPTOP_ECB 0xc8 /* aes-ecb */ -#define VIAC3_CRYPTOP_CBC 0xd0 /* aes-cbc */ -#define VIAC3_CRYPTOP_CFB 0xe0 /* aes-cfb */ -#define VIAC3_CRYPTOP_OFB 0xe8 /* aes-ofb */ - void viac3_crypto_setup(void); int viac3_crypto_newsession(u_int32_t *, struct cryptoini *); int viac3_crypto_process(struct cryptop *); diff --git a/sys/arch/i386/include/specialreg.h b/sys/arch/i386/include/specialreg.h index 7b41a040956..c2239d4206d 100644 --- a/sys/arch/i386/include/specialreg.h +++ b/sys/arch/i386/include/specialreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: specialreg.h,v 1.18 2004/01/31 00:09:41 deraadt Exp $ */ +/* $OpenBSD: specialreg.h,v 1.19 2004/02/03 08:42:19 deraadt Exp $ */ /* $NetBSD: specialreg.h,v 1.7 1994/10/27 04:16:26 cgd Exp $ */ /*- @@ -421,3 +421,25 @@ #define PMC6_SEG_RENAME_STALLS 0xd4 /* P-II and P-III only */ #define PMC6_SEG_REG_RENAMES 0xd5 /* P-II and P-III only */ #define PMC6_RET_SEG_RENAMES 0xd6 /* P-II and P-III only */ + +/* VIA C3 xcrypt-* instruction context control options */ +#define C3_CRYPT_CWLO_ROUND_M 0x0000000f +#define C3_CRYPT_CWLO_ALG_M 0x00000070 +#define C3_CRYPT_CWLO_ALG_AES 0x00000000 +#define C3_CRYPT_CWLO_KEYGEN_M 0x00000080 +#define C3_CRYPT_CWLO_KEYGEN_HW 0x00000000 +#define C3_CRYPT_CWLO_KEYGEN_SW 0x00000080 +#define C3_CRYPT_CWLO_NORMAL 0x00000000 +#define C3_CRYPT_CWLO_INTERMEDIATE 0x00000100 +#define C3_CRYPT_CWLO_ENCRYPT 0x00000000 +#define C3_CRYPT_CWLO_DECRYPT 0x00000200 +#define C3_CRYPT_CWLO_KEY128 0x0000000a /* 128bit, 10 rds */ +#define C3_CRYPT_CWLO_KEY192 0x0000040c /* 192bit, 12 rds */ +#define C3_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */ + +/* VIA C3 xcrypt-* opcodes */ +#define VIAC3_CRYPTOP_RNG 0xc0 /* rng */ +#define VIAC3_CRYPTOP_ECB 0xc8 /* aes-ecb */ +#define VIAC3_CRYPTOP_CBC 0xd0 /* aes-cbc */ +#define VIAC3_CRYPTOP_CFB 0xe0 /* aes-cfb */ +#define VIAC3_CRYPTOP_OFB 0xe8 /* aes-ofb */ |