diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index baf1b4c8b091..fc373274ee91 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.55 1995/09/15 02:13:18 davidg Exp $ + * $Id: locore.s,v 1.56 1995/09/16 21:31:55 pst Exp $ */ /* @@ -450,10 +450,17 @@ got_common_bi_size: /* less than Pentium; must be 486 */ movl $CPU_486,_cpu-KERNBASE - jmp 2f - -1: movl $CPU_586,_cpu-KERNBASE + jmp 3f +1: + /* a Pentium? */ + cmpl $5,%eax + jne 2f + movl $CPU_586,_cpu-KERNBASE + jmp 3f 2: + /* Greater than Pentium...call it a Pentium Pro */ + movl $CPU_686,_cpu-KERNBASE +3: /* * Finished with old stack; load new %esp now instead of later so @@ -760,7 +767,7 @@ reloc_gdt: * enable write protection and alignment checking on i486 cpus and * above. */ -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class je 1f movl %cr0,%eax /* get control word */ diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s index baf1b4c8b091..fc373274ee91 100644 --- a/sys/amd64/amd64/locore.s +++ b/sys/amd64/amd64/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.55 1995/09/15 02:13:18 davidg Exp $ + * $Id: locore.s,v 1.56 1995/09/16 21:31:55 pst Exp $ */ /* @@ -450,10 +450,17 @@ got_common_bi_size: /* less than Pentium; must be 486 */ movl $CPU_486,_cpu-KERNBASE - jmp 2f - -1: movl $CPU_586,_cpu-KERNBASE + jmp 3f +1: + /* a Pentium? */ + cmpl $5,%eax + jne 2f + movl $CPU_586,_cpu-KERNBASE + jmp 3f 2: + /* Greater than Pentium...call it a Pentium Pro */ + movl $CPU_686,_cpu-KERNBASE +3: /* * Finished with old stack; load new %esp now instead of later so @@ -760,7 +767,7 @@ reloc_gdt: * enable write protection and alignment checking on i486 cpus and * above. */ -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class je 1f movl %cr0,%eax /* get control word */ diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index f703c5f9d1c5..0a1b14dd6bbf 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.161 1995/12/19 14:30:26 davidg Exp $ + * $Id: machdep.c,v 1.162 1995/12/22 18:17:34 bde Exp $ */ #include "npx.h" @@ -479,6 +479,7 @@ static struct cpu_nameclass i386_cpus[] = { { "i486DX", CPUCLASS_486 }, /* CPU_486 */ { "Pentium", CPUCLASS_586 }, /* CPU_586 */ { "Cy486DLC", CPUCLASS_486 }, /* CPU_486DLC */ + { "Pentium Pro", CPUCLASS_686 }, /* CPU_686 */ }; static void @@ -494,12 +495,12 @@ identifycpu() panic("startup: bad cpu id"); } -#if defined(I586_CPU) - if(cpu_class == CPUCLASS_586) { +#if defined(I586_CPU) || defined(I686_CPU) + if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) { calibrate_cyclecounter(); } #endif -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) if (!strcmp(cpu_vendor,"GenuineIntel")) { if ((cpu_id & 0xf00) > 3) { cpu_model[0] = '\0'; @@ -512,14 +513,20 @@ identifycpu() strcpy(cpu_model, "Dual "); break; } - if ((cpu_id & 0xf00) == 0x400) { + + switch (cpu_id & 0xf00) { + case 0x400: strcat(cpu_model, "i486 "); -#if defined(I586_CPU) - } else if ((cpu_id & 0xf00) == 0x500) { + break; + case 0x500: strcat(cpu_model, "Pentium"); /* nb no space */ -#endif - } else { - strcat(cpu_model, "unknown "); + break; + case 0x600: + strcat(cpu_model, "Pentium Pro"); + break; + default: + strcat(cpu_model, "unknown"); + break; } switch (cpu_id & 0xff0) { @@ -540,18 +547,7 @@ identifycpu() break; case 0x480: strcat(cpu_model, "DX4"); break; -#if defined(I586_CPU) - case 0x510: - case 0x520: - /* - * We used to do all sorts of nonsense here - * to print out iCOMP numbers. Since these - * are meaningless except to Intel - * marketroids, there seems to be little - * sense in doing so. - */ break; -#endif } } } @@ -578,12 +574,20 @@ identifycpu() ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) % 100); printf("586"); break; +#endif +#if defined(I686_CPU) + case CPUCLASS_686: + printf("%d.%02d-MHz ", + ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) / 100, + ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) % 100); + printf("686"); + break; #endif default: printf("unknown"); /* will panic below... */ } printf("-class CPU)\n"); -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) if(*cpu_vendor) printf(" Origin = \"%s\"",cpu_vendor); if(cpu_id) @@ -606,7 +610,7 @@ identifycpu() */ switch (cpu_class) { case CPUCLASS_286: /* a 286 should not make it this far, anyway */ -#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) +#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU) #error This kernel is not configured for one of the supported CPUs #endif #if !defined(I386_CPU) @@ -617,6 +621,9 @@ identifycpu() #endif #if !defined(I586_CPU) case CPUCLASS_586: +#endif +#if !defined(I686_CPU) + case CPUCLASS_586: #endif panic("CPU class not configured"); default: diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 901369edd545..3150bbf117bb 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.26 1995/12/10 03:11:32 bde Exp $ + * $Id: support.s,v 1.27 1995/12/23 16:46:31 davidg Exp $ */ #include "assym.s" /* system definitions */ @@ -355,7 +355,7 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */ #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 3f #endif @@ -546,10 +546,10 @@ ENTRY(suword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f /* we only have to set the right segment selector */ -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -588,10 +588,10 @@ ENTRY(susword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -631,10 +631,10 @@ ENTRY(subyte) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ movl %edx,%eax shrl $IDXSHIFT,%edx diff --git a/sys/amd64/amd64/support.s b/sys/amd64/amd64/support.s index 901369edd545..3150bbf117bb 100644 --- a/sys/amd64/amd64/support.s +++ b/sys/amd64/amd64/support.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.26 1995/12/10 03:11:32 bde Exp $ + * $Id: support.s,v 1.27 1995/12/23 16:46:31 davidg Exp $ */ #include "assym.s" /* system definitions */ @@ -355,7 +355,7 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */ #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 3f #endif @@ -546,10 +546,10 @@ ENTRY(suword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f /* we only have to set the right segment selector */ -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -588,10 +588,10 @@ ENTRY(susword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -631,10 +631,10 @@ ENTRY(subyte) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ movl %edx,%eax shrl $IDXSHIFT,%edx diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 65668d12cb65..b7c6a2a9ee7e 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $ + * $Id: clock.c,v 1.42 1995/12/20 20:57:33 wollman Exp $ */ /* @@ -93,7 +93,7 @@ int adjkerntz = 0; /* offset from CMOS clock */ int disable_rtc_set = 0; /* disable resettodr() if != 0 */ u_int idelayed; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; long long i586_ctr_bias; long long i586_last_tick; @@ -280,7 +280,7 @@ getit(void) return ((high << 8) | low); } -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Figure out how fast the cyclecounter runs. This must be run with * clock interrupts disabled, but with the timer/counter programmed @@ -569,7 +569,7 @@ cpu_initclocks() /* XXX */ (inthand2_t *)clkintr, &clk_imask, /* unit */ 0); INTREN(IRQ0); -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Finish setting up anti-jitter measures. */ diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h index 542e62894c8d..1f63bfe6059c 100644 --- a/sys/amd64/include/clock.h +++ b/sys/amd64/include/clock.h @@ -3,13 +3,13 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $Id: clock.h,v 1.6 1995/11/29 19:57:16 wollman Exp $ + * $Id: clock.h,v 1.7 1995/12/10 13:38:07 phk Exp $ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) #define I586_CYCLECTR(x) \ __asm __volatile(".byte 0x0f, 0x31" : "=A" (x)) @@ -54,7 +54,7 @@ */ extern int adjkerntz; extern int disable_rtc_set; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) extern unsigned i586_ctr_rate; /* fixed point */ extern long long i586_last_tick; extern long long i586_ctr_bias; @@ -63,11 +63,11 @@ extern int timer0_max_count; extern u_int timer0_overflow_threshold; extern u_int timer0_prescaler_count; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) void calibrate_cyclecounter __P((void)); #endif -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) static __inline u_long cpu_thisticklen(u_long dflt) { diff --git a/sys/amd64/include/cputypes.h b/sys/amd64/include/cputypes.h index 52d8e2051224..0c5667ba8294 100644 --- a/sys/amd64/include/cputypes.h +++ b/sys/amd64/include/cputypes.h @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cputypes.h,v 1.2 1993/11/07 17:42:49 wollman Exp $ + * $Id: cputypes.h,v 1.3 1994/09/04 19:59:23 pst Exp $ */ #ifndef _MACHINE_CPUTYPES_H_ @@ -38,6 +38,7 @@ #define CPUCLASS_386 1 #define CPUCLASS_486 2 #define CPUCLASS_586 3 +#define CPUCLASS_686 4 /* * Kinds of Processor @@ -50,5 +51,6 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 6 /* Cyrix 486DLC */ +#define CPU_686 7 /* Pentium Pro */ #endif /* _MACHINE_CPUTYPES_H_ */ diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 65668d12cb65..b7c6a2a9ee7e 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $ + * $Id: clock.c,v 1.42 1995/12/20 20:57:33 wollman Exp $ */ /* @@ -93,7 +93,7 @@ int adjkerntz = 0; /* offset from CMOS clock */ int disable_rtc_set = 0; /* disable resettodr() if != 0 */ u_int idelayed; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; long long i586_ctr_bias; long long i586_last_tick; @@ -280,7 +280,7 @@ getit(void) return ((high << 8) | low); } -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Figure out how fast the cyclecounter runs. This must be run with * clock interrupts disabled, but with the timer/counter programmed @@ -569,7 +569,7 @@ cpu_initclocks() /* XXX */ (inthand2_t *)clkintr, &clk_imask, /* unit */ 0); INTREN(IRQ0); -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Finish setting up anti-jitter measures. */ diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index baf1b4c8b091..fc373274ee91 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $Id: locore.s,v 1.55 1995/09/15 02:13:18 davidg Exp $ + * $Id: locore.s,v 1.56 1995/09/16 21:31:55 pst Exp $ */ /* @@ -450,10 +450,17 @@ got_common_bi_size: /* less than Pentium; must be 486 */ movl $CPU_486,_cpu-KERNBASE - jmp 2f - -1: movl $CPU_586,_cpu-KERNBASE + jmp 3f +1: + /* a Pentium? */ + cmpl $5,%eax + jne 2f + movl $CPU_586,_cpu-KERNBASE + jmp 3f 2: + /* Greater than Pentium...call it a Pentium Pro */ + movl $CPU_686,_cpu-KERNBASE +3: /* * Finished with old stack; load new %esp now instead of later so @@ -760,7 +767,7 @@ reloc_gdt: * enable write protection and alignment checking on i486 cpus and * above. */ -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class je 1f movl %cr0,%eax /* get control word */ diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index f703c5f9d1c5..0a1b14dd6bbf 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.161 1995/12/19 14:30:26 davidg Exp $ + * $Id: machdep.c,v 1.162 1995/12/22 18:17:34 bde Exp $ */ #include "npx.h" @@ -479,6 +479,7 @@ static struct cpu_nameclass i386_cpus[] = { { "i486DX", CPUCLASS_486 }, /* CPU_486 */ { "Pentium", CPUCLASS_586 }, /* CPU_586 */ { "Cy486DLC", CPUCLASS_486 }, /* CPU_486DLC */ + { "Pentium Pro", CPUCLASS_686 }, /* CPU_686 */ }; static void @@ -494,12 +495,12 @@ identifycpu() panic("startup: bad cpu id"); } -#if defined(I586_CPU) - if(cpu_class == CPUCLASS_586) { +#if defined(I586_CPU) || defined(I686_CPU) + if (cpu_class == CPUCLASS_586 || cpu_class == CPUCLASS_686) { calibrate_cyclecounter(); } #endif -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) if (!strcmp(cpu_vendor,"GenuineIntel")) { if ((cpu_id & 0xf00) > 3) { cpu_model[0] = '\0'; @@ -512,14 +513,20 @@ identifycpu() strcpy(cpu_model, "Dual "); break; } - if ((cpu_id & 0xf00) == 0x400) { + + switch (cpu_id & 0xf00) { + case 0x400: strcat(cpu_model, "i486 "); -#if defined(I586_CPU) - } else if ((cpu_id & 0xf00) == 0x500) { + break; + case 0x500: strcat(cpu_model, "Pentium"); /* nb no space */ -#endif - } else { - strcat(cpu_model, "unknown "); + break; + case 0x600: + strcat(cpu_model, "Pentium Pro"); + break; + default: + strcat(cpu_model, "unknown"); + break; } switch (cpu_id & 0xff0) { @@ -540,18 +547,7 @@ identifycpu() break; case 0x480: strcat(cpu_model, "DX4"); break; -#if defined(I586_CPU) - case 0x510: - case 0x520: - /* - * We used to do all sorts of nonsense here - * to print out iCOMP numbers. Since these - * are meaningless except to Intel - * marketroids, there seems to be little - * sense in doing so. - */ break; -#endif } } } @@ -578,12 +574,20 @@ identifycpu() ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) % 100); printf("586"); break; +#endif +#if defined(I686_CPU) + case CPUCLASS_686: + printf("%d.%02d-MHz ", + ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) / 100, + ((100 * i586_ctr_rate) >> I586_CTR_RATE_SHIFT) % 100); + printf("686"); + break; #endif default: printf("unknown"); /* will panic below... */ } printf("-class CPU)\n"); -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) if(*cpu_vendor) printf(" Origin = \"%s\"",cpu_vendor); if(cpu_id) @@ -606,7 +610,7 @@ identifycpu() */ switch (cpu_class) { case CPUCLASS_286: /* a 286 should not make it this far, anyway */ -#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) +#if !defined(I386_CPU) && !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU) #error This kernel is not configured for one of the supported CPUs #endif #if !defined(I386_CPU) @@ -617,6 +621,9 @@ identifycpu() #endif #if !defined(I586_CPU) case CPUCLASS_586: +#endif +#if !defined(I686_CPU) + case CPUCLASS_586: #endif panic("CPU class not configured"); default: diff --git a/sys/i386/i386/microtime.s b/sys/i386/i386/microtime.s index 44b7e97ec26e..ab644adf21a5 100644 --- a/sys/i386/i386/microtime.s +++ b/sys/i386/i386/microtime.s @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: Steve McCanne's microtime code - * $Id: microtime.s,v 1.10 1995/10/14 04:53:49 bde Exp $ + * $Id: microtime.s,v 1.11 1995/11/29 19:57:03 wollman Exp $ */ #include @@ -44,7 +44,7 @@ ENTRY(microtime) -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) movl _i586_ctr_rate, %ecx testl %ecx, %ecx jne pentium_microtime @@ -175,7 +175,7 @@ common_microtime: ret -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) ALIGN_TEXT pentium_microtime: cli diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 901369edd545..3150bbf117bb 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.26 1995/12/10 03:11:32 bde Exp $ + * $Id: support.s,v 1.27 1995/12/23 16:46:31 davidg Exp $ */ #include "assym.s" /* system definitions */ @@ -355,7 +355,7 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */ #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 3f #endif @@ -546,10 +546,10 @@ ENTRY(suword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f /* we only have to set the right segment selector */ -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -588,10 +588,10 @@ ENTRY(susword) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ /* XXX - page boundary crossing is still not handled */ movl %edx,%eax @@ -631,10 +631,10 @@ ENTRY(subyte) #if defined(I386_CPU) -#if defined(I486_CPU) || defined(I586_CPU) +#if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f -#endif /* I486_CPU || I586_CPU */ +#endif /* I486_CPU || I586_CPU || I686_CPU */ movl %edx,%eax shrl $IDXSHIFT,%edx diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 65668d12cb65..b7c6a2a9ee7e 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $ + * $Id: clock.c,v 1.42 1995/12/20 20:57:33 wollman Exp $ */ /* @@ -93,7 +93,7 @@ int adjkerntz = 0; /* offset from CMOS clock */ int disable_rtc_set = 0; /* disable resettodr() if != 0 */ u_int idelayed; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; long long i586_ctr_bias; long long i586_last_tick; @@ -280,7 +280,7 @@ getit(void) return ((high << 8) | low); } -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Figure out how fast the cyclecounter runs. This must be run with * clock interrupts disabled, but with the timer/counter programmed @@ -569,7 +569,7 @@ cpu_initclocks() /* XXX */ (inthand2_t *)clkintr, &clk_imask, /* unit */ 0); INTREN(IRQ0); -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Finish setting up anti-jitter measures. */ diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 542e62894c8d..1f63bfe6059c 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -3,13 +3,13 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $Id: clock.h,v 1.6 1995/11/29 19:57:16 wollman Exp $ + * $Id: clock.h,v 1.7 1995/12/10 13:38:07 phk Exp $ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) #define I586_CYCLECTR(x) \ __asm __volatile(".byte 0x0f, 0x31" : "=A" (x)) @@ -54,7 +54,7 @@ */ extern int adjkerntz; extern int disable_rtc_set; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) extern unsigned i586_ctr_rate; /* fixed point */ extern long long i586_last_tick; extern long long i586_ctr_bias; @@ -63,11 +63,11 @@ extern int timer0_max_count; extern u_int timer0_overflow_threshold; extern u_int timer0_prescaler_count; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) void calibrate_cyclecounter __P((void)); #endif -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) static __inline u_long cpu_thisticklen(u_long dflt) { diff --git a/sys/i386/include/cputypes.h b/sys/i386/include/cputypes.h index 52d8e2051224..0c5667ba8294 100644 --- a/sys/i386/include/cputypes.h +++ b/sys/i386/include/cputypes.h @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: cputypes.h,v 1.2 1993/11/07 17:42:49 wollman Exp $ + * $Id: cputypes.h,v 1.3 1994/09/04 19:59:23 pst Exp $ */ #ifndef _MACHINE_CPUTYPES_H_ @@ -38,6 +38,7 @@ #define CPUCLASS_386 1 #define CPUCLASS_486 2 #define CPUCLASS_586 3 +#define CPUCLASS_686 4 /* * Kinds of Processor @@ -50,5 +51,6 @@ #define CPU_486 4 /* Intel 80486DX */ #define CPU_586 5 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 6 /* Cyrix 486DLC */ +#define CPU_686 7 /* Pentium Pro */ #endif /* _MACHINE_CPUTYPES_H_ */ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 65668d12cb65..b7c6a2a9ee7e 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $ + * $Id: clock.c,v 1.42 1995/12/20 20:57:33 wollman Exp $ */ /* @@ -93,7 +93,7 @@ int adjkerntz = 0; /* offset from CMOS clock */ int disable_rtc_set = 0; /* disable resettodr() if != 0 */ u_int idelayed; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; long long i586_ctr_bias; long long i586_last_tick; @@ -280,7 +280,7 @@ getit(void) return ((high << 8) | low); } -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Figure out how fast the cyclecounter runs. This must be run with * clock interrupts disabled, but with the timer/counter programmed @@ -569,7 +569,7 @@ cpu_initclocks() /* XXX */ (inthand2_t *)clkintr, &clk_imask, /* unit */ 0); INTREN(IRQ0); -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Finish setting up anti-jitter measures. */ diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 65668d12cb65..b7c6a2a9ee7e 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.41 1995/12/14 23:01:51 bde Exp $ + * $Id: clock.c,v 1.42 1995/12/20 20:57:33 wollman Exp $ */ /* @@ -93,7 +93,7 @@ int adjkerntz = 0; /* offset from CMOS clock */ int disable_rtc_set = 0; /* disable resettodr() if != 0 */ u_int idelayed; -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) unsigned i586_ctr_rate; long long i586_ctr_bias; long long i586_last_tick; @@ -280,7 +280,7 @@ getit(void) return ((high << 8) | low); } -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Figure out how fast the cyclecounter runs. This must be run with * clock interrupts disabled, but with the timer/counter programmed @@ -569,7 +569,7 @@ cpu_initclocks() /* XXX */ (inthand2_t *)clkintr, &clk_imask, /* unit */ 0); INTREN(IRQ0); -#ifdef I586_CPU +#if defined(I586_CPU) || defined(I686_CPU) /* * Finish setting up anti-jitter measures. */