Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/include Add macros for cpuid family/step, etc ...



details:   https://anonhg.NetBSD.org/src/rev/6c5c14169783
branches:  trunk
changeset: 538674:6c5c14169783
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Oct 25 12:00:11 2002 +0000

description:
Add macros for cpuid family/step, etc shifting. Moved here from
machdep.c.

diffstat:

 sys/arch/i386/include/specialreg.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r f3e18cbfc2a5 -r 6c5c14169783 sys/arch/i386/include/specialreg.h
--- a/sys/arch/i386/include/specialreg.h        Fri Oct 25 09:19:29 2002 +0000
+++ b/sys/arch/i386/include/specialreg.h        Fri Oct 25 12:00:11 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: specialreg.h,v 1.23 2002/06/07 04:03:49 gmcgarry Exp $ */
+/*     $NetBSD: specialreg.h,v 1.24 2002/10/25 12:00:11 fvdl Exp $     */
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -133,6 +133,11 @@
 #define CPUID_FLAGS3   "\20\31FXSR\32SSE\33SSE2\34SS\35HTT\36TM\37B30\40B31"
 #define CPUID_MASK3    0xff000000
 
+#define CPUID2FAMILY(cpuid)    (((cpuid) >> 8) & 15)
+#define CPUID2MODEL(cpuid)     (((cpuid) >> 4) & 15)
+#define CPUID2STEPPING(cpuid)  ((cpuid) & 15)
+
+
 /*
  * Model-specific registers for the i386 family
  */



Home | Main Index | Thread Index | Old Index