Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 Retrieve cpuid.7:%edx.



details:   https://anonhg.NetBSD.org/src/rev/9406d7f4f091
branches:  trunk
changeset: 831446:9406d7f4f091
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Mar 30 19:51:53 2018 +0000

description:
Retrieve cpuid.7:%edx.

diffstat:

 sys/arch/x86/include/cpu.h  |  5 +++--
 sys/arch/x86/x86/identcpu.c |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r bac7d9f1670a -r 9406d7f4f091 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h        Fri Mar 30 19:49:49 2018 +0000
+++ b/sys/arch/x86/include/cpu.h        Fri Mar 30 19:51:53 2018 +0000
@@ -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 @@
        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 @@
                         * [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 */
diff -r bac7d9f1670a -r 9406d7f4f091 sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c       Fri Mar 30 19:49:49 2018 +0000
+++ b/sys/arch/x86/x86/identcpu.c       Fri Mar 30 19:51:53 2018 +0000
@@ -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 @@
                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);



Home | Main Index | Thread Index | Old Index