PERFORCE change 49650 for review

Peter Wemm peter at FreeBSD.org
Wed Mar 24 18:12:44 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=49650

Change 49650 by peter at peter_wannabe on 2004/03/24 18:12:07

	dig up bits for cpuid1.ecx.  There has got to be a better way.

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/identcpu.c#24 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/identcpu.c#24 (text+ko) ====

@@ -73,6 +73,7 @@
 static void print_AMD_info(void);
 static void print_AMD_assoc(int i);
 
+int	cpu_feature2;		/* XXX change cpu_feature to long? */
 int	cpu_class;
 u_int	cpu_exthigh;		/* Highest arg to extended CPUID */
 char machine[] = "amd64";
@@ -218,6 +219,44 @@
 			"\040PBE"	/* Pending Break Enable */
 			);
 
+			if (cpu_feature2 != 0) {
+				printf("\n  Features2=0x%b", cpu_feature2,
+				"\020"
+				"\001SSE3"	/* SSE3 */
+				"\002<b1>"
+				"\003RSVD2>"	/* "Reserved" bit 2 */
+				"\004MON"	/* MONITOR/MWAIT Instructions */
+				"\005DS_CPL"	/* CPL Qualified Debug Store */
+				"\006<b5>"	/* Machine specific registers */
+				"\007<b6>"	/* Physical address extension */
+				"\010EST"	/* Enhanced SpeedStep */
+				"\011TM2"	/* Thermal Monitor 2 */
+				"\012<b9>"
+				"\013CNTX-ID"	/* L1 context ID available */
+				"\014<b11>"
+				"\015<b12>"
+				"\016CX16"	/* CMPXCHG16B Instruction */
+				"\017<b14>"
+				"\020<b15>"
+				"\021<b16>"
+				"\022<b17>"
+				"\023<b18>"
+				"\024<b19>"
+				"\025<b20>"
+				"\026<b21>"
+				"\027<b22>"
+				"\030<b23>"
+				"\031<b24>"
+				"\032<b25>"
+				"\033<b26>"
+				"\034<b27>"
+				"\035<b28>"
+				"\036<b29>"
+				"\037<b30>"
+				"\040<b31>"
+				);
+			}
+
 			/*
 			 * If this CPU supports hyperthreading then mention
 			 * the number of logical CPU's it contains.
@@ -283,6 +322,7 @@
 	cpu_id = regs[0];
 	cpu_procinfo = regs[1];
 	cpu_feature = regs[3];
+	cpu_feature2 = regs[2];
 
 	/* XXX */
 	cpu = CPU_CLAWHAMMER;


More information about the p4-projects mailing list