From owner-cvs-all Thu May 21 09:07:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA00411 for cvs-all-outgoing; Thu, 21 May 1998 09:07:05 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA00301; Thu, 21 May 1998 09:06:42 -0700 (PDT) (envelope-from dag-erli@ifi.uio.no) Received: from gjallarhorn.ifi.uio.no (2602@gjallarhorn.ifi.uio.no [129.240.65.40]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with ESMTP id SAA13613; Thu, 21 May 1998 18:06:39 +0200 (MET DST) Received: (from dag-erli@localhost) by gjallarhorn.ifi.uio.no ; Thu, 21 May 1998 18:06:37 +0200 (MET DST) Mime-Version: 1.0 To: Peter Wemm Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c References: <199805191940.MAA04923@freefall.freebsd.org> Organization: University of Oslo, Department of Informatics X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-Stop-Spam: http://www.cauce.org From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 21 May 1998 18:06:37 +0200 In-Reply-To: dag-erli@ifi.uio.no's message of "21 May 1998 17:38:08 +0200" Message-ID: Lines: 71 X-Mailer: Gnus v5.5/Emacs 19.34 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id JAB00308 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk dag-erli@ifi.uio.no (Dag-Erling Coidan Smørgrav ) writes: > Peter Wemm 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message