Date: Thu, 7 Nov 2002 17:59:48 -0800 (PST) From: Oleg Polyakov <opolyakov@yahoo.com> To: freebsd-hackers@FreeBSD.ORG Cc: sam@pcuf.fi Subject: Re: cpu class & features Message-ID: <20021108015948.32855.qmail@web10408.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
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, sam@pcuf.fi __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021108015948.32855.qmail>