Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2006 18:28:22 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: C/C++ call to detect cpu?
Message-ID:  <8306445D-4517-41CC-B7FA-E20B420CE7ED@u.washington.edu>
In-Reply-To: <20060121203306.25121.qmail@simone.iecc.com>
References:  <20060121203306.25121.qmail@simone.iecc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 21, 2006, at 12:33 PM, John Levine wrote:

>> Other than 'grep'ing dmesg, is there a way to know the current cpu  
>> such as a
>> struct with the machine's cpu and cpu feature (kinda like a time_t  
>> struct)?
>
> $ sysctl hw.model
> hw.model: AMD Athlon(tm) 64 Processor 3000+
>
> If you want more details write a tiny assembler routine that does a
> CPUID instruction and decode the result.  Intel has a detailed  
> application
> note about it at
> http://developer.intel.ru/design/xeon/applnots/241618.htm
>
> R's,
> John

Erm. Nevermind. I just misunderstood your question =\...
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8306445D-4517-41CC-B7FA-E20B420CE7ED>