diff options
author | kato <kato@FreeBSD.org> | 1999-08-20 09:31:18 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1999-08-20 09:31:18 +0000 |
commit | 02a6338c263572537dca788b6a20b81d2ac3bc88 (patch) | |
tree | c618677c8c5caa7b4374a9b85d7d147ce80ea548 /sys | |
parent | 46e13824b3ebe221e9d29446b54d0dc332f4d38f (diff) | |
download | FreeBSD-src-02a6338c263572537dca788b6a20b81d2ac3bc88.zip FreeBSD-src-02a6338c263572537dca788b6a20b81d2ac3bc88.tar.gz |
There may exist two kinds of IBM BlueLightning CPU. One is that 5/2
test does not change undefined flag like Cyrix CPUs. Another is that
5/2 test changes undefined flag like Intel CPUs. Latter one could not
be detected and was recognized 486DX CPU. To solve this,
finishidentcpu() calls identblue() when cpu_vendor is null string
(that is, CPUID instruction is not supported) and cpu == CPU_486.
Tests have been done on IBM BlueLightning CPUs, i486SX and i486DX.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/identcpu.c | 16 | ||||
-rw-r--r-- | sys/i386/i386/identcpu.c | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/sys/amd64/amd64/identcpu.c b/sys/amd64/amd64/identcpu.c index 9ed2869..ba53f4e 100644 --- a/sys/amd64/amd64/identcpu.c +++ b/sys/amd64/amd64/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.70 1999/07/06 12:42:26 peter Exp $ + * $Id: identcpu.c,v 1.71 1999/07/06 13:23:56 peter Exp $ */ #include "opt_cpu.h" @@ -856,6 +856,20 @@ finishidentcpu(void) break; } } + } else if (cpu == CPU_486 && *cpu_vendor == '\0') { + /* + * There are BlueLightning CPUs that do not change + * undefined flags by dividing 5 by 2. In this case, + * the CPU identification routine in locore.s leaves + * cpu_vendor null string and puts CPU_486 into the + * cpu. + */ + isblue = identblue(); + if (isblue == IDENTBLUE_IBMCPU) { + strcpy(cpu_vendor, "IBM"); + cpu = CPU_BLUE; + return; + } } } diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c index 9ed2869..ba53f4e 100644 --- a/sys/i386/i386/identcpu.c +++ b/sys/i386/i386/identcpu.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp - * $Id: identcpu.c,v 1.70 1999/07/06 12:42:26 peter Exp $ + * $Id: identcpu.c,v 1.71 1999/07/06 13:23:56 peter Exp $ */ #include "opt_cpu.h" @@ -856,6 +856,20 @@ finishidentcpu(void) break; } } + } else if (cpu == CPU_486 && *cpu_vendor == '\0') { + /* + * There are BlueLightning CPUs that do not change + * undefined flags by dividing 5 by 2. In this case, + * the CPU identification routine in locore.s leaves + * cpu_vendor null string and puts CPU_486 into the + * cpu. + */ + isblue = identblue(); + if (isblue == IDENTBLUE_IBMCPU) { + strcpy(cpu_vendor, "IBM"); + cpu = CPU_BLUE; + return; + } } } |