Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2003 13:25:19 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Attila Nagy <bra@fsn.hu>
Cc:        cvs-all@freebsd.org, cvs-committers@freebsd.org, Alexey Dokuchaev <danfe@nsu.ru>
Subject:   Re: cvs commit: src/sys/i386/i386 identcpu.c
Message-ID:  <XFMail.20030110132519.jhb@FreeBSD.org>
In-Reply-To: <Pine.LNX.4.50.0301101857320.510-100000@scribble.fsn.hu>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org>  <><  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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030110132519.jhb>