Why does FBSD always assume it's on an 8080 CPU?

Chris H. chris# at 1command.com
Sat Jan 27 03:09:16 UTC 2007


> Context switching.
> We already preserve the "core" CPU state and the FPU state between
> context switches. Adding MMX into the mix means preserving an MMX
> state (since it can clobber the FPU state) and so forth.
>
> jmc

Quoting Dimitry Andric <dimitry at andric.com>:

> Chris H. wrote:
>> I've noticed building kernels, that since v. >= 5 that during
>> the phase 2/3 all the lines echoed to the screen contain:
>> -mno-mmx -mno-3dnow -mno-sse -mno-sse2 ...
>
> See /usr/share/examples/etc/make.conf.
>
>
>> As Pentium have been the "norm" for many years now, why aren't
>> these /assumed/?
>
> Because i486 is still the lowest common denominator, at least for 6.x.
>
>
>> Default? hmmm... not as far as I can tell. Anyway, I would *greatly*
>> appreciate any insight on this issue. Do I need to pollute my make.conf
>> file to achive a Pentium kernel?
>
> Yes.  Is this so horrible?
>

Hello Kris, John, Dimitry, and thank you for your taking the time to
respond and the "wake-up call" (in regards to searching the list first) ;)

Based on your responses and my research in that area:
----------------------------------------------------------------------
Yes, it's supposed to be that way.  Certain parts of the FreeBSD
system cannot use MMX or SSE instructions (e.g. the boot loader) but
it's okay since they are absolutely not performance critical.

Kris

######################################################################
The kernel will "support" MMX and SSE -- that is, any programs (root
or userland) which use MMX/SSE will work just fine.  That is: any
programs built with gcc can indeed support MMX and SSE operations.

The kernel itself _will not_ use any SSE or MMX operations when built.
This is because these optimisations are known to break the FreeBSD
kernel.  This applies to all i386 architectures, and probably 64-bit
architectures too (not sure).

Chad
----------------------------------------------------------------------
Can I (pre || a)ssume that given my CPU echoes the following:

CPU: AMD Athlon(tm) XP (1102.51-MHz 686-class CPU)
Origin = "AuthenticAMD"  Id = 0x680  Stepping = 0
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
AMD Features=0xc0400800<SYSCALL,MMX+,3DNow+,3DNow>

That I simply build world/kernel with an clean (empty) make.conf
and add the following during port(s) building to attain optimum results
given my CPU for this current biuld?

CPUTYPE?=pentium4

COPTFLAGS= -march=pentium4 -mmmx -m3dnow -m3dnow+ -msse -msse2

Sorry, I'm new to Athlon. Does it show? <blush>

Again, apologies for spamming this list, and thank you
(and everyone else) very much for all your time.

--Chris


-- 
panic: kernel trap (ignored)



-----------------------------------------------------------------
FreeBSD 5.4-RELEASE-p12 (SMP - 900x2) Tue Mar 7 19:37:23 PST 2006
/////////////////////////////////////////////////////////////////



More information about the freebsd-stable mailing list