Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 - Add AMD CPUID leaf 0x80000008 ebx's xsave...
details: https://anonhg.NetBSD.org/src/rev/b72a8d33172e
branches: trunk
changeset: 320926:b72a8d33172e
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Mar 05 04:21:36 2018 +0000
description:
- 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 af7e2e27be2b -r b72a8d33172e sys/arch/x86/x86/procfs_machdep.c
--- a/sys/arch/x86/x86/procfs_machdep.c Mon Mar 05 02:41:19 2018 +0000
+++ b/sys/arch/x86/x86/procfs_machdep.c Mon Mar 05 04:21:36 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_machdep.c,v 1.21 2018/01/10 11:46:02 msaitoh Exp $ */
+/* $NetBSD: procfs_machdep.c,v 1.22 2018/03/05 04:21:36 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.21 2018/01/10 11:46:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.22 2018/03/05 04:21:36 msaitoh 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