There is a way how FreeBSD kernel do it - /sys/i386/i386/identcpu.c and some
other files in that directory.

Also there is a port/package - /usr/ports/misc/cpuid

>I'm writing an application that needs info on the machine cpu >architecture,
>the cpu class, and the cpu features.
>
>The machine cpu architecture seems to be available through
>sysctl CTL_HW HW_MACHINE_ARCH. However, I can't find any mention
>of what string values this returns. Is there a list of possible current
>values somewhere?
>
>For cpu class, I can't seem to find anything. The include file
><machine/cputypes.h> has the kind of info I'm looking for defined (for >i386),
but I can't seem to find if it is available for userland >programs.
>
>CPU features seem to be defined in <machine/specialreg.h> (for i386), >but I
can't find if they are available for userland programs either. I >suppose they
could be parsed from dmesg, but that would be a pretty >hacky way of doing it.
Is there any better way?
>
>Any help would be appreciated.
>
>Sam, [EMAIL PROTECTED] 

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to