diff options
author | jkim <jkim@FreeBSD.org> | 2009-01-12 19:17:35 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2009-01-12 19:17:35 +0000 |
commit | 7cdff4176a3e40ec42ba82e4efdd71851bb4b64e (patch) | |
tree | eecbe0e11554a2633c3b731862a1f18dd13b5a77 /sys/amd64/include/specialreg.h | |
parent | b1dd6fa37d9bcc30854719a38a0bc5f4223331cc (diff) | |
download | FreeBSD-src-7cdff4176a3e40ec42ba82e4efdd71851bb4b64e.zip FreeBSD-src-7cdff4176a3e40ec42ba82e4efdd71851bb4b64e.tar.gz |
Add basic amd64 support for VIA Nano processors.
Diffstat (limited to 'sys/amd64/include/specialreg.h')
-rw-r--r-- | sys/amd64/include/specialreg.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h index c08668c..eb2ff9b 100644 --- a/sys/amd64/include/specialreg.h +++ b/sys/amd64/include/specialreg.h @@ -459,4 +459,40 @@ #define MSR_TOP_MEM2 0xc001001d /* boundary for ram above 4G */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ +/* VIA ACE crypto featureset: for via_feature_rng */ +#define VIA_HAS_RNG 1 /* cpu has RNG */ + +/* VIA ACE crypto featureset: for via_feature_xcrypt */ +#define VIA_HAS_AES 1 /* cpu has AES */ +#define VIA_HAS_SHA 2 /* cpu has SHA1 & SHA256 */ +#define VIA_HAS_MM 4 /* cpu has RSA instructions */ +#define VIA_HAS_AESCTR 8 /* cpu has AES-CTR instructions */ + +/* Centaur Extended Feature flags */ +#define VIA_CPUID_HAS_RNG 0x000004 +#define VIA_CPUID_DO_RNG 0x000008 +#define VIA_CPUID_HAS_ACE 0x000040 +#define VIA_CPUID_DO_ACE 0x000080 +#define VIA_CPUID_HAS_ACE2 0x000100 +#define VIA_CPUID_DO_ACE2 0x000200 +#define VIA_CPUID_HAS_PHE 0x000400 +#define VIA_CPUID_DO_PHE 0x000800 +#define VIA_CPUID_HAS_PMM 0x001000 +#define VIA_CPUID_DO_PMM 0x002000 + +/* VIA ACE xcrypt-* instruction context control options */ +#define VIA_CRYPT_CWLO_ROUND_M 0x0000000f +#define VIA_CRYPT_CWLO_ALG_M 0x00000070 +#define VIA_CRYPT_CWLO_ALG_AES 0x00000000 +#define VIA_CRYPT_CWLO_KEYGEN_M 0x00000080 +#define VIA_CRYPT_CWLO_KEYGEN_HW 0x00000000 +#define VIA_CRYPT_CWLO_KEYGEN_SW 0x00000080 +#define VIA_CRYPT_CWLO_NORMAL 0x00000000 +#define VIA_CRYPT_CWLO_INTERMEDIATE 0x00000100 +#define VIA_CRYPT_CWLO_ENCRYPT 0x00000000 +#define VIA_CRYPT_CWLO_DECRYPT 0x00000200 +#define VIA_CRYPT_CWLO_KEY128 0x0000000a /* 128bit, 10 rds */ +#define VIA_CRYPT_CWLO_KEY192 0x0000040c /* 192bit, 12 rds */ +#define VIA_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */ + #endif /* !_MACHINE_SPECIALREG_H_ */ |