diff options
author | jhb <jhb@FreeBSD.org> | 2003-01-08 01:20:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-01-08 01:20:05 +0000 |
commit | 47dd2b5659fde33fa7fdcf59f85ef8bbc783d89a (patch) | |
tree | 73c1f85c72aba81d3927bacbbab1e6358ac4724f /sys/i386 | |
parent | 054271d4c0f927ebd75e9046bb022a3d7fc2b08f (diff) | |
download | FreeBSD-src-47dd2b5659fde33fa7fdcf59f85ef8bbc783d89a.zip FreeBSD-src-47dd2b5659fde33fa7fdcf59f85ef8bbc783d89a.tar.gz |
Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid with
%eax of 1 and set it in identify_cpu().
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/initcpu.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/locore.s | 1 | ||||
-rw-r--r-- | sys/i386/include/md_var.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/sys/i386/i386/initcpu.c b/sys/i386/i386/initcpu.c index 97ce839..9f13eb6 100644 --- a/sys/i386/i386/initcpu.c +++ b/sys/i386/i386/initcpu.c @@ -82,6 +82,7 @@ int cpu = 0; /* Are we 386, 386sx, 486, etc? */ u_int cpu_id = 0; /* Stepping ID */ u_int cpu_feature = 0; /* Feature flags */ u_int cpu_high = 0; /* Highest arg to CPUID */ +u_int cpuid_cpuinfo = 0; /* HyperThreading Info / Brand Index / CLFUSH */ #ifdef CPU_ENABLE_SSE u_int cpu_fxsr = 0; /* SSE enabled */ #endif diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 19a6ac7..b9efaf6 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -720,6 +720,7 @@ trycpuid: /* Use the `cpuid' instruction. */ movl $1,%eax cpuid # cpuid 1 movl %eax,R(cpu_id) # store cpu_id + movl %ebx,R(cpuid_cpuinfo) # store cpuid_cpuinfo movl %edx,R(cpu_feature) # store cpu_feature rorl $8,%eax # extract family type andl $15,%eax diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 9fa3968..71c58c3 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -44,6 +44,7 @@ extern int (*copyin_vector)(const void *udaddr, void *kaddr, size_t len); extern int (*copyout_vector)(const void *kaddr, void *udaddr, size_t len); extern u_int cpu_feature; extern u_int cpu_high; +extern u_int cpuid_cpuinfo; extern u_int cpu_id; extern u_int cpu_fxsr; extern char cpu_vendor[]; |