From owner-cvs-all Wed Jan 8 10:42: 0 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 8FE8D37B405 for ; Wed, 8 Jan 2003 10:41:58 -0800 (PST) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49CC543EE1 for ; Wed, 8 Jan 2003 10:41:57 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 6786 invoked from network); 8 Jan 2003 18:42:02 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 8 Jan 2003 18:42:02 -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 h08IftUT083876; Wed, 8 Jan 2003 13:41:55 -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: <200301081641.h08Gfncx056060@repoman.freebsd.org> Date: Wed, 08 Jan 2003 13:42:04 -0500 (EST) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/sys/i386/i386 identcpu.c Cc: 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 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) The AMD and Transmeta code already did something similar, this just makes it common and sticks it in one place. It also trims leading spaces which the old AMD and Transmeta code didn't do. Not sure that matters for AMD and Transmeta though. -- 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