Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2005 06:02:38 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 79246 for review
Message-ID:  <200506300602.j5U62cBJ084220@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=79246

Change 79246 by peter@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506300602.j5U62cBJ084220>