summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include/cpu.h
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-12-17 08:54:52 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-12-17 08:54:52 +0000
commitffed5272586c29a3919800adfa0b003f444c7fec (patch)
treeebcafcaa27d56a515c4a77e663ef296175b4f33a /sys/arch/i386/include/cpu.h
parent286718b01f4f5f3294c108d99ff58707f550dc95 (diff)
New CPU detection code, from NetBSD, with some machdep changes from myself.
Add I686_CPU to your configs if you have a PPro...
Diffstat (limited to 'sys/arch/i386/include/cpu.h')
-rw-r--r--sys/arch/i386/include/cpu.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index 15506252a04..33527023919 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.18 1997/12/09 03:36:41 deraadt Exp $ */
+/* $OpenBSD: cpu.h,v 1.19 1997/12/17 08:54:51 downsj Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -96,7 +96,7 @@ int want_resched; /* resched() was called */
#define DELAY(x) delay(x)
void delay __P((int));
-#ifdef I586_CPU
+#if defined(I586_CPU) || defined(I686_CPU)
/*
* High resolution clock support (Pentium only)
*/
@@ -129,18 +129,38 @@ void delay __P((int));
*/
#include <machine/cputypes.h>
-struct cpu_nameclass {
- char *cpu_name;
- int cpu_class;
+struct cpu_nocpuid_nameclass {
+ int cpu_vendor;
+ const char *cpu_vendorname;
+ const char *cpu_name;
+ int cpu_class;
+ void (*cpu_setup) __P((const char *));
+};
+
+struct cpu_cpuid_nameclass {
+ const char *cpu_id;
+ int cpu_vendor;
+ const char *cpu_vendorname;
+ struct cpu_cpuid_family {
+ int cpu_class;
+ const char *cpu_models[CPU_MAXMODEL+2];
+ void (*cpu_setup) __P((const char *));
+ } cpu_family[CPU_MAXFAMILY - CPU_MINFAMILY + 1];
};
#ifdef _KERNEL
extern int cpu;
extern int cpu_class;
-extern struct cpu_nameclass i386_cpus[];
-#ifdef I586_CPU
+extern int cpu_feature;
+extern int cpuid_level;
+extern struct cpu_nocpuid_nameclass i386_nocpuid_cpus[];
+extern struct cpu_cpuid_nameclass i386_cpuid_cpus[];
+
+#if defined(I586_CPU) || defined(I686_CPU)
extern int pentium_mhz;
+#endif
+#ifdef I586_CPU
/* F00F bug fix stuff for pentium cpu */
extern int cpu_f00f_bug;
void fix_f00f __P((void));