From owner-freebsd-hackers Thu Nov 7 17:59:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B831437B401 for ; Thu, 7 Nov 2002 17:59:48 -0800 (PST) Received: from web10408.mail.yahoo.com (web10408.mail.yahoo.com [216.136.130.110]) by mx1.FreeBSD.org (Postfix) with SMTP id 70F5943E42 for ; Thu, 7 Nov 2002 17:59:48 -0800 (PST) (envelope-from opolyakov@yahoo.com) Message-ID: <20021108015948.32855.qmail@web10408.mail.yahoo.com> Received: from [67.112.212.200] by web10408.mail.yahoo.com via HTTP; Thu, 07 Nov 2002 17:59:48 PST Date: Thu, 7 Nov 2002 17:59:48 -0800 (PST) From: Oleg Polyakov Subject: Re: cpu class & features To: freebsd-hackers@FreeBSD.ORG Cc: sam@pcuf.fi MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 > 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 (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