On Sat, Jun 02, 2018 at 01:00:05PM +0200, Frederic Cambus wrote:
> Hi tech@,
>
> Here is a diff to remove unused C3 values.
>
> Comments? OK?
I would keep the definitions because they can at least serve as a weak
form of documentation about the hardware. For example,
C3_CRYPT_CWLO_ALG_M indicates what bits specify the algorithm, which
in turn helps one to understand the value of C3_CRYPT_CWLO_ALG_AES.
> Index: sys/arch/amd64/include/specialreg.h
> ===
> RCS file: /cvs/src/sys/arch/amd64/include/specialreg.h,v
> retrieving revision 1.72
> diff -u -p -r1.72 specialreg.h
> --- sys/arch/amd64/include/specialreg.h 23 May 2018 05:37:01 -
> 1.72
> +++ sys/arch/amd64/include/specialreg.h 2 Jun 2018 09:14:32 -
> @@ -873,14 +873,9 @@
> #define C3_CPUID_DO_PMM 0x002000
>
> /* VIA C3 xcrypt-* instruction context control options */
> -#define C3_CRYPT_CWLO_ROUND_M 0x000f
> -#define C3_CRYPT_CWLO_ALG_M 0x0070
> #define C3_CRYPT_CWLO_ALG_AES 0x
> -#define C3_CRYPT_CWLO_KEYGEN_M 0x0080
> -#define C3_CRYPT_CWLO_KEYGEN_HW 0x
> #define C3_CRYPT_CWLO_KEYGEN_SW 0x0080
> #define C3_CRYPT_CWLO_NORMAL0x
> -#define C3_CRYPT_CWLO_INTERMEDIATE 0x0100
> #define C3_CRYPT_CWLO_ENCRYPT 0x
> #define C3_CRYPT_CWLO_DECRYPT 0x0200
> #define C3_CRYPT_CWLO_KEY1280x000a /* 128bit, 10
> rds */
> Index: sys/arch/i386/include/specialreg.h
> ===
> RCS file: /cvs/src/sys/arch/i386/include/specialreg.h,v
> retrieving revision 1.66
> diff -u -p -r1.66 specialreg.h
> --- sys/arch/i386/include/specialreg.h28 May 2018 20:52:44 -
> 1.66
> +++ sys/arch/i386/include/specialreg.h2 Jun 2018 09:14:32 -
> @@ -724,14 +724,9 @@
> #define C3_CPUID_DO_PMM 0x002000
>
> /* VIA C3 xcrypt-* instruction context control options */
> -#define C3_CRYPT_CWLO_ROUND_M 0x000f
> -#define C3_CRYPT_CWLO_ALG_M 0x0070
> #define C3_CRYPT_CWLO_ALG_AES 0x
> -#define C3_CRYPT_CWLO_KEYGEN_M 0x0080
> -#define C3_CRYPT_CWLO_KEYGEN_HW 0x
> #define C3_CRYPT_CWLO_KEYGEN_SW 0x0080
> #define C3_CRYPT_CWLO_NORMAL0x
> -#define C3_CRYPT_CWLO_INTERMEDIATE 0x0100
> #define C3_CRYPT_CWLO_ENCRYPT 0x
> #define C3_CRYPT_CWLO_DECRYPT 0x0200
> #define C3_CRYPT_CWLO_KEY1280x000a /* 128bit, 10
> rds */
>