Subject: Re: Checking for CPU feature from userland
To: Adrien Dessemond <adrien.dessemond@softhome.net>
From: Jason Beegan <jtb@kurwenal.com>
List: port-i386
Date: 04/22/2001 23:39:04
There's an interesting (but dated) Dr. Dobb's Journal article on
detecting Intel processors at
	   
	   http://www.rcollins.org/ddj/Sep96/Sep96.html


- Jason

> 
> Date:    Mon, 23 Apr 2001 00:24:27 +0200
> To:      David Brownlee <abs@netbsd.org>
> cc:      port-i386@netbsd.org
> From:    Adrien Dessemond <adrien.dessemond@softhome.net>
> Subject: Re: Checking for CPU feature from userland
> 
> Return-Path: jtb
> Delivery-Date: Sun Apr 22 23:29:40 2001
> Return-Path: <jtb>
> Delivered-To: jasontd@indigo.ie
> Delivered-To: port-i386@netbsd.org
> X-Sender: adrien.dessemond@pop.softhome.net
> X-Mailer: QUALCOMM Windows Eudora Version 5.1
> In-Reply-To: <Pine.NEB.4.30.0104222247100.5058-100000@graviton.mono.org>
> References: <200104220823.f3M8NEb26083@sigmet.ghs.com>
> Mime-Version: 1.0
> Status:  U
> X-UIDL:  987978322.70089.relay06.indigo.ie
> Sender:  port-i386-owner@netbsd.org
> Precedence: list
> 
> At 23:49 22/04/2001, you wrote:
> >On Sun, 22 Apr 2001, Ross Harvey wrote:
> >
> >> > The "cpuid" instruction is not available on all x86 CPUs and it is not
> >> > easy to use.
> >>
> >> It's certainly difficult to use, yes. But being unavailable on old cpu's
> >> is not a problem, since it _is_ present on any chip that has mmx. You can
> >> just preset the output bits and catch any generated traps. But I guess you
> >> knew all of that.
> >> 
> 
> There were some tricks to detect which CPU you have
> (even if does not support CPUID). If you search around
> for very old dos stuff, I think you could get some detection
> routines. As far as I can remember, I have a book that
> explains how detect the CPU type even if it does not support
> CPUID... I can search for it and post there the code guidelines...
> 
> For people who are interested in, Intel has released (it is not
> new but very useful to know) some of its x86 processors specifications.
> You can find the documentation splitted in 3 PDF files : 
> Basic Architecture (document 243190), Instruction Set Reference
> (document 243191) and System Programming Guide (document 243192),
> this is the update for the pentium III CPU.
> 
> Hope that helps
> 
> 
> 
> 
>