Date: 21 May 1998 18:06:37 +0200 From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) To: Peter Wemm <peter@FreeBSD.ORG> Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c Message-ID: <xzpu36jzjzm.fsf@gjallarhorn.ifi.uio.no> In-Reply-To: dag-erli@ifi.uio.no's message of "21 May 1998 17:38:08 %2B0200" References: <199805191940.MAA04923@freefall.freebsd.org> <xzpvhqzzlb3.fsf@gjallarhorn.ifi.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
dag-erli@ifi.uio.no (Dag-Erling Coidan Smørgrav ) writes: > Peter Wemm <peter@FreeBSD.ORG> writes: > > peter 1998/05/19 12:40:46 PDT > > > > Modified files: > > sys/i386/i386 identcpu.c > Are there any plans to make FreeBSD correctly identify PII processors? Answering myself: "Yes, here's a patch against -current that hopefully does this:" Index: src/sys/i386/i386/identcpu.c =================================================================== RCS file: /c/ncvs/src/sys/i386/i386/identcpu.c,v retrieving revision 1.46 diff -u -r1.46 identcpu.c --- identcpu.c 1998/05/19 19:40:45 1.46 +++ identcpu.c 1998/05/21 15:58:17 @@ -94,6 +94,7 @@ { "Cyrix 6x86MX", CPUCLASS_686 }, /* CPU_M2 */ { "NexGen 586", CPUCLASS_386 }, /* CPU_NX586 (XXX) */ { "Cyrix 486S/DX", CPUCLASS_486 }, /* CPU_CY486DX */ + { "Pentium II", CPUCLASS_686 }, /* CPU_PII */ }; static void @@ -154,7 +155,20 @@ #endif break; case 0x600: - strcat(cpu_model, "Pentium Pro"); + /* Check the particular flavor of 686 */ + if ((cpu_id & 0xf0) == 0) + strcat(cpu_model, "Pentium Pro A-step"); + else if ((cpu_id & 0xf0) == 1) + strcat(cpu_model, "Pentium Pro"); + else if ((cpu_id & 0xf0) == 3) { + strcat(cpu_model, "Pentium II"); + cpu = CPU_PII; + } + else if ((cpu_id & 0xf0) == 5) { + strcat(cpu_model, "Pentium II (0.25 µm)"); + cpu = CPU_PII; + } + else strcat(cpu_model, "Unknown 80686"); break; default: strcat(cpu_model, "unknown"); Index: src/sys/i386/include/cputypes.h =================================================================== RCS file: /c/ncvs/src/sys/i386/include/cputypes.h,v retrieving revision 1.10 diff -u -r1.10 cputypes.h --- cputypes.h 1997/10/28 11:43:50 1.10 +++ cputypes.h 1998/05/21 15:41:22 @@ -56,6 +56,7 @@ #define CPU_M2 11 /* Cyrix M2 (aka enhanced 6x86 with MMX */ #define CPU_NX586 12 /* NexGen (now AMD) 586 */ #define CPU_CY486DX 13 /* Cyrix 486S/DX/DX2/DX4 */ +#define CPU_PII 14 /* Intel Pentium II */ #ifndef LOCORE struct cpu_nameclass { I can't test this right now, so could somebody please try it out and give me some feedback? -- Noone else has a .sig like this one.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpu36jzjzm.fsf>