Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/9206ebd05f3b
branches:  netbsd-8
changeset: 434747:9206ebd05f3b
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Mar 16 13:08:14 2018 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #634):
        sys/arch/x86/x86/procfs_machdep.c: revision 1.22
- Add AMD CPUID leaf 0x80000008 ebx's xsaveerptr, ibpb, ibrs, stibp.
- Add Intel CPUID leaf 7 ebx's umip, avx512_vbmi2, gfni, vaes, vpclmulqdq,
   avx512_vnni and avx512_bitalg.
- Add Intel CPUID leaf 7 edx's avx512_4vnniw, avx512_4fmaps and
   arch_capabilities.

diffstat:

 sys/arch/x86/x86/procfs_machdep.c |  30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diffs (72 lines):

diff -r 76ed146b5dce -r 9206ebd05f3b sys/arch/x86/x86/procfs_machdep.c
--- a/sys/arch/x86/x86/procfs_machdep.c Fri Mar 16 13:05:31 2018 +0000
+++ b/sys/arch/x86/x86/procfs_machdep.c Fri Mar 16 13:08:14 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_machdep.c,v 1.15.2.3 2018/01/13 21:44:20 snj Exp $ */
+/*     $NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.3 2018/01/13 21:44:20 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -151,9 +151,9 @@
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
-       { /* (13) 0x80000008 ebx */
-       "clzero", "irperf", NULL, NULL, NULL, NULL, NULL, NULL,
-       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       { /* (13) AMD 0x80000008 ebx */
+       "clzero", "irperf", "xsaveerptr", NULL, NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, "ibpb", NULL, "ibrs", "stibp",
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
@@ -173,8 +173,10 @@
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
        { /* (16) 0x00000007:0 ecx */
-       NULL, "avx512vbmi", NULL, "pku", "ospke", NULL, NULL, NULL,
-       NULL, NULL, NULL, NULL, NULL, NULL, "avx512_vpopcntdq", NULL,
+       NULL, "avx512vbmi", "umip", "pku",
+       "ospke", NULL, "avx512_vbmi2", NULL,
+       "gfni", "vaes", "vpclmulqdq", "avx512_vnni",
+       "avx512_bitalg", NULL, "avx512_vpopcntdq", NULL,
        "la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
@@ -183,6 +185,12 @@
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+
+       { /* (18) Intel 0x00000007 edx */
+       NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+       NULL, NULL, NULL, NULL, NULL, "arch_capabilities", NULL, NULL},
 };
 
 static int     procfs_getonecpu(int, struct cpu_info *, char *, size_t *);
@@ -336,6 +344,14 @@
                diff = last - *left;
        }
 
+       if ((cpu_vendor == CPUVENDOR_INTEL)
+           && (ci->ci_max_cpuid >= 0x00000007)) {
+               x86_cpuid(0x00000007, descs);
+               procfs_getonefeatreg(descs[3], x86_features[18], p + diff,
+                   left);
+               diff = last - *left;
+       }
+
        return 0; /* XXX */
 }
 



Home | Main Index | Thread Index | Old Index