Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2003 11:40:48 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alexey Dokuchaev <danfe@nsu.ru>
Cc:        cvs-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/i386/i386 identcpu.c
Message-ID:  <XFMail.20030110114048.jhb@FreeBSD.org>
In-Reply-To: <20030110100834.GA42366@regency.nsu.ru>

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

On 10-Jan-2003 Alexey Dokuchaev wrote:
> On Wed, Jan 08, 2003 at 01:42:04PM -0500, John Baldwin wrote:
>> 
>> On 08-Jan-2003 John Baldwin wrote:
>> > jhb         2003/01/08 08:41:49 PST
>> > 
>> >   Modified files:
>> >     sys/i386/i386        identcpu.c 
>> >   Log:
>> >   - Use cpu_exthigh instead of executing cpuid again to retrieve it for the
>> >     print_AMD_foo() functions.
>> >   - Add a brand name table for the brand index provided on Intel CPU's in
>> >     %ebx after cpuid 1.
>> >   - For Intel CPUs, if we don't get a processor name from the extended cpuid
>> >     then use the brand index in cpuid_cpuinfo to pick a name from the brand
>> >     table and copy that name into cpu_brand.
>> >   - Replace the duplicated code to use the extended cpuid to replace
>> >     cpu_model with the processor name in the AMD and Transmeta sections of
>> >     printcpuinfo() with generic code that replaces cpu_model with
>> >     cpu_brand if cpu_brand is not an empty string.  We also trim leading
>> >     spaces from cpu_brand prior to doing this since at least some processor
>> >     names (notably those of Intel CPUs) have leading spaces in the name.
>> >   - Give print_AMD_features() its own private regs[] array since
>> >     printcpuinfo() doesn't use the one it has anymore.
>> 
>> Looks like:
>> 
>> > dmesg | grep CPU:
>> CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2399.93-MHz 686-class CPU)
>> 
>> > sysctl hw.model
>> hw.model: Intel(R) Pentium(R) 4 CPU 2.40GHz
>> 
>> Or on a Pentium III (uses index into table for name):
>> 
>> > dmesg | grep CPU:
>> CPU: Intel Pentium III (696.97-MHz 686-class CPU)
> 
> Well it now distinguish *real* PIII and Celeron (if it's ever possible)?

The kernel can only tell what the CPU tells it. :)

-- 

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.20030110114048.jhb>