summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-12-23 21:41:42 +0000
committerjhb <jhb@FreeBSD.org>2015-12-23 21:41:42 +0000
commit994c23f093ffc787a9df3aed34ac0192fd33b5cf (patch)
tree947514bb221bd9a1ad294551a0524c73c24648f7 /sys/i386
parentd94d9ab649132948ef671f5a6b8354c0f895812f (diff)
downloadFreeBSD-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/i386')
-rw-r--r--sys/i386/i386/initcpu.c32
-rw-r--r--sys/i386/include/cputypes.h23
2 files changed, 2 insertions, 53 deletions
diff --git a/sys/i386/i386/initcpu.c b/sys/i386/i386/initcpu.c
index a4a49ea..214c6f6 100644
--- a/sys/i386/i386/initcpu.c
+++ b/sys/i386/i386/initcpu.c
@@ -81,39 +81,7 @@ 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 */
-#ifdef CPU_ENABLE_SSE
-u_int cpu_fxsr; /* SSE enabled */
-u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */
-#endif
-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 cyrix_did; /* Device ID of Cyrix CPU */
-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");
#ifdef I486_CPU
/*
diff --git a/sys/i386/include/cputypes.h b/sys/i386/include/cputypes.h
index 718741a..fb0fa47 100644
--- a/sys/i386/include/cputypes.h
+++ b/sys/i386/include/cputypes.h
@@ -30,6 +30,8 @@
#ifndef _MACHINE_CPUTYPES_H_
#define _MACHINE_CPUTYPES_H_
+#include <x86/cputypes.h>
+
/*
* Classes of processor.
*/
@@ -61,25 +63,4 @@
#define CPU_P4 16 /* Intel Pentium 4 */
#define CPU_GEODE1100 17 /* NS Geode SC1100 */
-/*
- * Vendors of processor.
- */
-#define CPU_VENDOR_NSC 0x100b /* NSC */
-#define CPU_VENDOR_IBM 0x1014 /* IBM */
-#define CPU_VENDOR_AMD 0x1022 /* AMD */
-#define CPU_VENDOR_SIS 0x1039 /* SiS */
-#define CPU_VENDOR_UMC 0x1060 /* UMC */
-#define CPU_VENDOR_NEXGEN 0x1074 /* Nexgen */
-#define CPU_VENDOR_CYRIX 0x1078 /* Cyrix */
-#define CPU_VENDOR_IDT 0x111d /* Centaur/IDT/VIA */
-#define CPU_VENDOR_TRANSMETA 0x1279 /* Transmeta */
-#define CPU_VENDOR_INTEL 0x8086 /* Intel */
-#define CPU_VENDOR_RISE 0xdead2bad /* Rise */
-#define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT
-
-#ifndef LOCORE
-extern int cpu;
-extern int cpu_class;
-#endif
-
#endif /* !_MACHINE_CPUTYPES_H_ */
OpenPOWER on IntegriCloud