Module Name:    src
Committed By:   jmcneill
Date:           Sat Feb 19 13:34:38 UTC 2011

Modified Files:
        src/usr.sbin/cpuctl/arch: i386.c

Log Message:
fix printing of padlock features


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/cpuctl/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.23 src/usr.sbin/cpuctl/arch/i386.c:1.24
--- src/usr.sbin/cpuctl/arch/i386.c:1.23	Wed Dec 15 17:09:07 2010
+++ src/usr.sbin/cpuctl/arch/i386.c	Sat Feb 19 13:34:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $	*/
+/*	$NetBSD: i386.c,v 1.24 2011/02/19 13:34:38 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.23 2010/12/15 17:09:07 cegger Exp $");
+__RCSID("$NetBSD: i386.c,v 1.24 2011/02/19 13:34:38 jmcneill Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -742,7 +742,7 @@
 		ci->ci_feat_val[2] |= descs[3];
 	}
 
-	if (model < 0x9)
+	if (model < 0x9 || (model == 0x9 && stepping < 3))
 		return;
 
 	/* Nehemiah or Esther */
@@ -753,11 +753,7 @@
 
 	x86_cpuid(0xc0000001, descs);
 	lfunc = descs[3];
-	if (model > 0x9 || stepping >= 8) {	/* ACE */
-		if (lfunc & CPUID_VIA_HAS_ACE) {
-			ci->ci_feat_val[4] = lfunc;
-		}
-	}
+	ci->ci_feat_val[4] = lfunc;
 }
 
 static const char *
@@ -1414,9 +1410,9 @@
 		feature_str[2] = CPUID_INTEL_EXT_FLAGS;
 		feature_str[3] = CPUID_INTEL_FLAGS4;
 		break;
-	case CPUVENDOR_CYRIX:
+	case CPUVENDOR_IDT:
 		feature_str[4] = CPUID_FLAGS_PADLOCK;
-		/* FALLTHRU */
+		break;
 	default:
 		break;
 	}

Reply via email to