diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 97ce839b67d..9f13eb6f931 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/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/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 19a6ac7117c..b9efaf61324 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/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/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index 19a6ac7117c..b9efaf61324 100644 --- a/sys/amd64/amd64/locore.s +++ b/sys/amd64/amd64/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/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 9fa39687685..71c58c36744 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/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[]; diff --git a/sys/i386/i386/initcpu.c b/sys/i386/i386/initcpu.c index 97ce839b67d..9f13eb6f931 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 19a6ac7117c..b9efaf61324 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 9fa39687685..71c58c36744 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[];