Module Name: src
Committed By: maxv
Date: Fri Mar 30 19:51:53 UTC 2018
Modified Files:
src/sys/arch/x86/include: cpu.h
src/sys/arch/x86/x86: identcpu.c
Log Message:
Retrieve cpuid.7:%edx.
To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/x86/x86/identcpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.89 src/sys/arch/x86/include/cpu.h:1.90
--- src/sys/arch/x86/include/cpu.h:1.89 Thu Jan 18 07:25:34 2018
+++ src/sys/arch/x86/include/cpu.h Fri Mar 30 19:51:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.89 2018/01/18 07:25:34 maxv Exp $ */
+/* $NetBSD: cpu.h,v 1.90 2018/03/30 19:51:53 maxv Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -167,7 +167,7 @@ struct cpu_info {
uint32_t ci_max_ext_cpuid; /* cpuid.80000000:%eax */
volatile uint32_t ci_lapic_counter;
- uint32_t ci_feat_val[7]; /* X86 CPUID feature bits */
+ uint32_t ci_feat_val[8]; /* X86 CPUID feature bits */
/* [0] basic features cpuid.1:%edx
* [1] basic features cpuid.1:%ecx (CPUID2_xxx bits)
* [2] extended features cpuid:80000001:%edx
@@ -175,6 +175,7 @@ struct cpu_info {
* [4] VIA padlock features
* [5] structured extended features cpuid.7:%ebx
* [6] structured extended features cpuid.7:%ecx
+ * [7] structured extended features cpuid.7:%edx
*/
const struct cpu_functions *ci_func; /* start/stop functions */
Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.70 src/sys/arch/x86/x86/identcpu.c:1.71
--- src/sys/arch/x86/x86/identcpu.c:1.70 Mon Mar 12 07:12:54 2018
+++ src/sys/arch/x86/x86/identcpu.c Fri Mar 30 19:51:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.70 2018/03/12 07:12:54 msaitoh Exp $ */
+/* $NetBSD: identcpu.c,v 1.71 2018/03/30 19:51:53 maxv Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.70 2018/03/12 07:12:54 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.71 2018/03/30 19:51:53 maxv Exp $");
#include "opt_xen.h"
@@ -883,6 +883,7 @@ cpu_probe(struct cpu_info *ci)
x86_cpuid(7, descs);
ci->ci_feat_val[5] = descs[1]; /* %ebx */
ci->ci_feat_val[6] = descs[2]; /* %ecx */
+ ci->ci_feat_val[7] = descs[3]; /* %edx */
}
cpu_probe_intel(ci);