diff options
author | dm <dm@cvs.openbsd.org> | 1996-12-05 18:08:12 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1996-12-05 18:08:12 +0000 |
commit | 5c988ed986aeb81c1890289158196a98c9af6730 (patch) | |
tree | f92e54b9638b593e12a9776a8c2a82a5e256600d /sys/arch | |
parent | bfd3ead469ed2a9ad79516eadd6f19b0cc2c8a20 (diff) |
NetBSD PR#2910: Recognize Pentium Pro machines
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/locore.s | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/i386/include/cputypes.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index a452254f62b..752c612d51b 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -445,6 +445,9 @@ try586: /* Use the `cpuid' instruction. */ cmpl $5,%eax jb is486 # less than a Pentium movl $CPU_586,RELOC(_cpu) + je 3f # Pentium + movl $CPU_686,RELOC(_cpu) # else Pentium Pro +3: xorl %eax,%eax xorl %edx,%edx diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 7907d06aedc..0743c49c7ae 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.28 1996/11/28 23:37:36 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.29 1996/12/05 18:08:06 dm Exp $ */ /* $NetBSD: machdep.c,v 1.202 1996/05/18 15:54:59 christos Exp $ */ /*- @@ -408,6 +408,7 @@ struct cpu_nameclass i386_cpus[] = { { "i486DX", CPUCLASS_486 }, /* CPU_486 */ { "Pentium", CPUCLASS_586 }, /* CPU_586 */ { "Cx486DLC", CPUCLASS_486 }, /* CPU_486DLC (Cyrix) */ + { "Pentium Pro",CPUCLASS_686 }, /* CPU_686 */ }; void @@ -437,6 +438,9 @@ identifycpu() case CPUCLASS_586: strcat(cpu_model, "586"); break; + case CPUCLASS_686: + strcat(cpu_model, "686"); + break; default: strcat(cpu_model, "unknown"); /* will panic below... */ break; @@ -444,7 +448,7 @@ identifycpu() strcat(cpu_model, "-class CPU)"); printf("%s", cpu_model); #if defined(I586_CPU) - if (cpu_class == CPUCLASS_586) { + if (cpu_class >= CPUCLASS_586) { calibrate_cyclecounter(); printf(" %d MHz", pentium_mhz); } @@ -460,6 +464,7 @@ identifycpu() #error No CPU classes configured. #endif #ifndef I586_CPU + case CPUCLASS_686: case CPUCLASS_586: printf("NOTICE: this kernel does not support Pentium CPU class\n"); #ifdef I486_CPU diff --git a/sys/arch/i386/include/cputypes.h b/sys/arch/i386/include/cputypes.h index ae439c0c57e..fb8f3576ee9 100644 --- a/sys/arch/i386/include/cputypes.h +++ b/sys/arch/i386/include/cputypes.h @@ -34,6 +34,7 @@ #define CPUCLASS_386 0 #define CPUCLASS_486 1 #define CPUCLASS_586 2 +#define CPUCLASS_686 3 /* * Kinds of Processor @@ -45,3 +46,4 @@ #define CPU_486 3 /* Intel 80486DX */ #define CPU_586 4 /* Intel P.....m (I hate lawyers; it's TM) */ #define CPU_486DLC 5 /* Cyrix 486DLC */ +#define CPU_686 6 /* Intel P.....m Pro */ |