hw.cpufamily vs ASP vs machine.h
hw.cpufamily vs ASP vs machine.h
- Subject: hw.cpufamily vs ASP vs machine.h
- From: Stephane <email@hidden>
- Date: Tue, 27 Feb 2007 19:32:25 +0100
I'm trying to find a solution to get the CPU Type on a Mac as it's
displayed in Apple System Profiler.
A long time ago, I was using the mach APIs and host_processor_info to
get the cpu type and subtype. I'm afraid this does not return good
results on Intel Mac. On an iMac Core Duo, the subtype is said to be
4 and it does not match any reasonable value in machine.h.
I had a look at some IOKit source code that gets this info by looking
at the cpu device_type but this has changed on Intel Mac. The "cpu"
type does not exist anymore and the "processor" type does not return
any valuable information at all for me.
I had a quick look at the sample code on the ADC website and it's
using the Gestalt API and the constants in Carbon don't seem to be up-
to-date.
I looked at the sysctl hw.cpufamily which is highlighted in mach/
machine.h (on Intel Mac only AFAIK) but I have some troubles with this:
On a Xserve Xeon, the returned value is:
hw.cpufamily: 1114597871
Intel Core 2.
Is the Xeon supposed to be a Core 2?
fillinzeblanks:~ stephane$ sysctl hw.cpufamily
hw.cpufamily: 1114597871
fillinzeblanks:~ stephane$ system_profiler
Hardware:
Hardware Overview:
Machine Name: Xserve
Machine Model: Xserve1,1
Processor Name: Dual-Core Intel Xeon
#define CPUFAMILY_INTEL_6_15 0x426f69ef /* Intel Core 2 */
Any suggestion?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden