PERFORCE change 79246 for review

Peter Wemm peter at FreeBSD.org
Thu Jun 30 06:02:40 GMT 2005


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

Change 79246 by peter at peter_overcee on 2005/06/30 06:02:12

	It helps to initialize the variable.  I don't know what happened
	to the original version.

Affected files ...

.. //depot/projects/hammer/sys/i386/i386/identcpu.c#23 edit

Differences ...

==== //depot/projects/hammer/sys/i386/i386/identcpu.c#23 (text+ko) ====

@@ -172,6 +172,13 @@
 		}
 	}
 
+	/* Detect AMD features (PTE no-execute bit, Long mode etc) */
+	if (strcmp(cpu_vendor, "GenuineIntel") == 0 ||
+	    strcmp(cpu_vendor, "AuthenticAMD") == 0) {
+		do_cpuid(0x80000001, regs);
+		amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff);
+	}
+
 	if (strcmp(cpu_vendor, "GenuineIntel") == 0) {
 		if ((cpu_id & 0xf00) > 0x300) {
 			u_int brand_index;


More information about the p4-projects mailing list