Subject: Re: Checking for CPU feature from userland
To: Matthias Scheler <tron@zhadum.de>
From: Bang Jun-Young <bjy@mogua.org>
List: port-i386
Date: 04/22/2001 15:12:13
Matthias Scheler wrote:
> during system startup the kernel reports detailed information about
> the CPU and its features:
> 
> cpu0: Intel Pentium III (Coppermine) (686-class), 701.63 MHz
> cpu0: I-cache 16K 32b/line 4-way, D-cache 16K 32b/line 2/4-way
> cpu0: L2 cache 256K 32b/line 8-way
> cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
> cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX,FXSR,XMM>
> 
> How can I query this information from an userland program to check if
> it can use MMX?

FYI, some time ago I wrote a (very) simple cpuid utility which 
displays processor specific information obtained with 'cpuid' 
instruction, available at:

	http://kldp.org/~bangjy/cpuid/

It was tested with Windows, Linux, FreeBSD, and NetBSD. 

Hope it will help,

Jun-Young

--
Bang Jun-Young <bjy@mogua.org>