Intel Xeon Processor kernel compile CPU type.

Garrett Cooper yanefbsd at gmail.com
Fri Feb 20 16:55:57 PST 2009


On Fri, Feb 20, 2009 at 3:45 PM, Howard Leadmon <howard at leadmon.net> wrote:
> Good, so nocona is really the right one to specify.   Good to know I have
> been doing it correctly on my x64 machines, and heck nice document/defines
> there, I'll keep that in my notes so I know how to find stuff like that in
> the future..
>
>
> ---
> Howard Leadmon
>
>
>> -----Original Message-----
>> From: Roland Smith [mailto:rsmith at xs4all.nl]
>> Sent: Friday, February 20, 2009 1:59 PM
>> To: Howard Leadmon
>> Cc: 'Oliver Pinter'; freebsd-amd64 at freebsd.org
>> Subject: Re: Intel Xeon Processor kernel compile CPU type.
>>
>> On Fri, Feb 20, 2009 at 09:05:46AM -0500, Howard Leadmon wrote:
>> >  I knew HAMMER was the only type for making your kernel, but what
>> CPUTYPE's
>> > are OK for 64bit?
>> <snip>
>> > CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.20-MHz K8-class CPU)
>> >   Origin = "GenuineIntel"  Id = 0xf48  Stepping = 8
>> >
>> >
>> Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,M
>> CA
>> > ,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>> >   Features2=0x649d<SSE3,RSVD2,MON,DS_CPL,EST,CNXT-ID,CX16,xTPR>
>> >   AMD Features=0x20100800<SYSCALL,NX,LM>
>> >   AMD Features2=0x1<LAHF>
>> >   Cores per package: 2
>> >   Logical CPUs per core: 2
>> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
>> >
>> >  So should this stuff be set to nocona, core2, or what??
>>
>> Have a look at /usr/share/mk/bsd.cpu.mk. If you are using the amd64
>> architecture, you can use CPUTYPE=prescott or CPUTYPE=core2, but both
>> will be converted to CPUTYPE=nocona. That's probably because that is the
>> latest variant that the gcc in base understands.

I know it's already been said, but Intel recommends (with the compiler
version that we have) to use prescott for i686 and nocona for amd64
because it best matches the caching / instruction scheduling for the
Core 2 CPU's.

If we actually move to gcc 4.3+ they have improved support for -march=core2.

HTH,
-Garrett


More information about the freebsd-amd64 mailing list