diff options
author | jhb <jhb@FreeBSD.org> | 2015-12-23 21:41:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-12-23 21:41:42 +0000 |
commit | 994c23f093ffc787a9df3aed34ac0192fd33b5cf (patch) | |
tree | 947514bb221bd9a1ad294551a0524c73c24648f7 /sys/amd64 | |
parent | d94d9ab649132948ef671f5a6b8354c0f895812f (diff) | |
download | FreeBSD-src-994c23f093ffc787a9df3aed34ac0192fd33b5cf.zip FreeBSD-src-994c23f093ffc787a9df3aed34ac0192fd33b5cf.tar.gz |
Move shared variables from {amd64,i386}/initcpu.c to x86/identcpu.c.
While here, move the common bits of <machine/cputypes.h> to
<x86/cputypes.h> as well.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D4670
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/initcpu.c | 31 | ||||
-rw-r--r-- | sys/amd64/include/cputypes.h | 15 |
2 files changed, 2 insertions, 44 deletions
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index f711b12..15d8171 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -55,37 +55,6 @@ SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, */ static int hw_clflush_disable = -1; -int cpu; /* Are we 386, 386sx, 486, etc? */ -u_int cpu_feature; /* Feature flags */ -u_int cpu_feature2; /* Feature flags */ -u_int amd_feature; /* AMD feature flags */ -u_int amd_feature2; /* AMD feature flags */ -u_int amd_pminfo; /* AMD advanced power management info */ -u_int via_feature_rng; /* VIA RNG features */ -u_int via_feature_xcrypt; /* VIA ACE features */ -u_int cpu_high; /* Highest arg to CPUID */ -u_int cpu_exthigh; /* Highest arg to extended CPUID */ -u_int cpu_id; /* Stepping ID */ -u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ -u_int cpu_procinfo2; /* Multicore info */ -char cpu_vendor[20]; /* CPU Origin code */ -u_int cpu_vendor_id; /* CPU vendor ID */ -u_int cpu_fxsr; /* SSE enabled */ -u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ -u_int cpu_clflush_line_size = 32; -u_int cpu_stdext_feature; -u_int cpu_stdext_feature2; -u_int cpu_max_ext_state_size; -u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ -u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ -u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ -u_int cpu_maxphyaddr; /* Max phys addr width in bits */ - -SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, - &via_feature_rng, 0, "VIA RNG feature available in CPU"); -SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, - &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); - static void init_amd(void) { diff --git a/sys/amd64/include/cputypes.h b/sys/amd64/include/cputypes.h index eeec4e0..5a70462 100644 --- a/sys/amd64/include/cputypes.h +++ b/sys/amd64/include/cputypes.h @@ -30,6 +30,8 @@ #ifndef _MACHINE_CPUTYPES_H_ #define _MACHINE_CPUTYPES_H_ +#include <x86/cputypes.h> + /* * Classes of processor. */ @@ -43,17 +45,4 @@ #define CPU_CLAWHAMMER 1 /* AMD Clawhammer */ #define CPU_SLEDGEHAMMER 2 /* AMD Sledgehammer */ -/* - * Vendors of processor. - */ -#define CPU_VENDOR_AMD 0x1022 /* AMD */ -#define CPU_VENDOR_IDT 0x111d /* Centaur/IDT/VIA */ -#define CPU_VENDOR_INTEL 0x8086 /* Intel */ -#define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT - -#ifndef LOCORE -extern int cpu; -extern int cpu_class; -#endif - #endif /* !_MACHINE_CPUTYPES_H_ */ |