Date: Mon, 29 Dec 2003 17:14:25 -0600 From: Josh Tolbert <hemi@puresimplicity.net> To: admin@forkthepenguin.com Cc: freebsd-hardware@freebsd.org Subject: Re: Kernel Optimizations for Processors Message-ID: <20031229231425.GA33560@just.puresimplicity.net> In-Reply-To: <Pine.BSI.4.58L.0312291403360.20196@vp4.netgate.net> References: <XFMail.20031229165953.jhb@FreeBSD.org> <Pine.BSI.4.58L.0312291403360.20196@vp4.netgate.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 29, 2003 at 02:15:15PM -0800, 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). > > http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options > > Chris Hi Chris, Take a look at /usr/share/mk/bsd.cpu.mk to see how CPUTYPE affects compiler flags. Thanks, Josh -- Josh Tolbert hemi@puresimplicity.net || http://www.puresimplicity.net/~hemi/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031229231425.GA33560>