From owner-freebsd-stable Sun Jul 4 15:28:12 1999 Delivered-To: freebsd-stable@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 2BD9E14FB3 for ; Sun, 4 Jul 1999 15:28:06 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40334>; Mon, 5 Jul 1999 08:10:31 +1000 Date: Mon, 5 Jul 1999 08:27:59 +1000 From: Peter Jeremy Subject: Re: MMX In-reply-to: <377C84BF.33E147F2@cs.strath.ac.uk> To: freebsd-stable@FreeBSD.ORG Message-Id: <99Jul5.081031est.40334@border.alcanet.com.au> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Roger Hardiman wrote: >Here is the almost proper way to determine if a CPU has MMX support. >I say _alomost_ because it uses the CPU-ID instruction. >This instruction is not on 386 machines or some early 486 machines. The Intel 486 manual (that I have at home) includes `official' code for determining what processor (8086 thru pre-CPUID 80486) you are running on. I'd suspect a later version would include testing for the presence of CPUID. I believe the code will run in user-mode. That said, I think the correct approach is a hook to allow a user-mode program to query the kernel (which has already determined what CPU it's running on). I'm not sure whether this should be an extension of an existing syscall, or a sysctl variable. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message