From owner-cvs-all Fri Jan 10 2: 6: 9 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 4FC0437B401; Fri, 10 Jan 2003 02:06:08 -0800 (PST) Received: from mail.nsu.ru (mx.nsu.ru [193.124.215.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id E544E43F5F; Fri, 10 Jan 2003 02:06:05 -0800 (PST) (envelope-from danfe@regency.nsu.ru) Received: from drweb by mail.nsu.ru with drweb-scanned (Exim 3.20 #1) id 18Ww36-0005BM-00; Fri, 10 Jan 2003 16:06:00 +0600 Received: from regency.nsu.ru ([193.124.210.26]) by mail.nsu.ru with esmtp (Exim 3.20 #1) id 18Ww35-0005Aw-00; Fri, 10 Jan 2003 16:05:59 +0600 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.12.6/8.12.6) with ESMTP id h0AA8YH7050481; Fri, 10 Jan 2003 16:08:34 +0600 (NOVT) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.12.6/8.12.6/Submit) id h0AA8Ynf050396; Fri, 10 Jan 2003 16:08:34 +0600 (NOVT) Date: Fri, 10 Jan 2003 16:08:34 +0600 From: Alexey Dokuchaev To: John Baldwin Cc: cvs-all@freebsd.org, cvs-committers@freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 identcpu.c Message-ID: <20030110100834.GA42366@regency.nsu.ru> References: <200301081641.h08Gfncx056060@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Envelope-To: jhb@freebsd.org, cvs-all@freebsd.org, cvs-committers@freebsd.org 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 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)? ./danfe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message