Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid with
%eax of 1 and set it in identify_cpu().
This commit is contained in:
parent
caaaa8bb36
commit
fa896b7280
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
|
Loading…
Reference in New Issue
Block a user