From owner-freebsd-hardware@FreeBSD.ORG Mon Dec 29 15:29:28 2003 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE04916A4CE for ; Mon, 29 Dec 2003 15:29:28 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A7AE43D45 for ; Mon, 29 Dec 2003 15:29:26 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 26490 invoked from network); 29 Dec 2003 23:29:23 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 29 Dec 2003 23:29:23 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBTNTJM0083391; Mon, 29 Dec 2003 18:29:20 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 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: Mon, 29 Dec 2003 18:29:22 -0500 (EST) From: John Baldwin To: admin@forkthepenguin.com X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Damian Gerow cc: freebsd-hardware@FreeBSD.org Subject: Re: Kernel Optimizations for Processors X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2003 23:29:28 -0000 On 29-Dec-2003 admin@forkthepenguin.com wrote: > > > On Mon, 29 Dec 2003, John Baldwin wrote: > >> >> On 29-Dec-2003 admin@forkthepenguin.com wrote: >> >> > # NO_F00F_HACK disables the hack that prevents Pentiums (and ONLY >> >> > # Pentiums) from locking up when a LOCK CMPXCHG8B instruction is >> >> > # executed. This option is only needed if I586_CPU is also defined, >> >> > # and should be included for any non-Pentium CPU that defines it. >> >> >> >> 'and ONLY Pentiums' >> > >> > It also says "should be included for any non-Pentium CPU that defines it" >> > but how do you know if the C# defines this? Is this another item that >> > would show up in the "Features" list? I looked at a PI-133 I have and >> > don't see it : >> >> It means that if you have 'cpu I586_CPU' in your kernel config and >> you aren't running a Pentium, then you can define this option. However, >> it won't really buy you much since we only install the F00F hack once >> during bootup and all adding this option will do is just not check for >> it at bootup. > > Cool, thanks for the clarification. I do not have I586_CPU defined in my > kernel conf (only I686_CPU) and had no problems building the kernel. Under > Linux you have to define -march=i586 to build the kernel properly for the > C3. I bring this up because you can specify CPUTYPE in the > /etc/defaults/make.conf. According to the notes in that file, the > following cpus can be defined : > ># Intel x86 architecture: ># (AMD CPUs) k7 k6-2 k6 k5 ># (Intel CPUs) p4 p3 p2 i686 i586/mmx i586 i486 i386 ># Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4 > > Does CPUTYPE affect the -march flag? I ask because gnu apparently supports > the VIA C3 using -march=c3. As a test I set CPUTYPE=c3 and had no problems > building the kernel nor do I see any evidence that CPUTYPE was pulled from > make.conf during the kernel build. Is CPUTYPE only used for application > optimizations? I suspect that adding CPUTYPE=c3 was a misguided assumption > based on the gnu docs (see below). CPUTYPE does affect the -march flag, yes. However, /usr/share/mk/bsd.cpu.mk currently doesn't support the c3 CPU type for i386. If you want to add support for it and submit a patch in a PR, that would be great. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/