From owner-cvs-all Fri Jan 10 10:25:19 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CB8437B401 for ; Fri, 10 Jan 2003 10:25:17 -0800 (PST) Received: from mail.speakeasy.net (mail13.speakeasy.net [216.254.0.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 827D643F6D for ; Fri, 10 Jan 2003 10:25:16 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 14768 invoked from network); 10 Jan 2003 18:25:20 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail13.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 10 Jan 2003 18:25:20 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h0AIPCUT090747; Fri, 10 Jan 2003 13:25:13 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 10 Jan 2003 13:25:19 -0500 (EST) From: John Baldwin To: Attila Nagy Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c Cc: cvs-all@freebsd.org, cvs-committers@freebsd.org, Alexey Dokuchaev Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 10-Jan-2003 Attila Nagy wrote: > Hello, > >> > Well it now distinguish *real* PIII and Celeron (if it's ever possible)? >> The kernel can only tell what the CPU tells it. :) > Don't bite me, but leenuks can do it. > AFAIK this is the magic: > > /* Names for the Pentium II/Celeron processors > detectable only by also checking the cache size. > Dixon is NOT a Celeron. */ > if (c->x86 == 6) { > switch (c->x86_model) { > case 5: > if (l2 == 0) > p = "Celeron (Covington)"; > if (l2 == 256) > p = "Mobile Pentium II (Dixon)"; > break; > > case 6: > if (l2 == 128) > p = "Celeron (Mendocino)"; > break; > > case 8: > if (l2 == 128) > p = "Celeron (Coppermine)"; > break; > } > } > > if ( p ) > strcpy(c->x86_model_id, p); > > > The above is from arch/i386/kernel/setup.c We used to use similar tricks but turned it off b/c it was not deemed to be worth the extra effort. :) The brand index stuff only works on Pentium III's and above btw. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message