svn commit: r187598 - in head/sys: amd64/amd64 i386/i386

Jung-uk Kim jkim at FreeBSD.org
Thu Jan 22 13:04:47 PST 2009


Author: jkim
Date: Thu Jan 22 21:04:46 2009
New Revision: 187598
URL: http://svn.freebsd.org/changeset/base/187598

Log:
  VIA Nano processor has a special MSR (CENT_HARDWARECTRL3) bit 32 to determine
  whether TSC is P-state invariant or not.  In fact, this MSR is writable but
  we just leave it at the BIOS default for now.

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/i386/i386/identcpu.c

Modified: head/sys/amd64/amd64/identcpu.c
==============================================================================
--- head/sys/amd64/amd64/identcpu.c	Thu Jan 22 20:29:07 2009	(r187597)
+++ head/sys/amd64/amd64/identcpu.c	Thu Jan 22 21:04:46 2009	(r187598)
@@ -392,7 +392,8 @@ printcpuinfo(void)
 				break;
 			case CPU_VENDOR_CENTAUR:
 				if (AMD64_CPU_FAMILY(cpu_id) == 0x6 &&
-				    AMD64_CPU_MODEL(cpu_id) >= 0xf)
+				    AMD64_CPU_MODEL(cpu_id) >= 0xf &&
+				    (rdmsr(0x1203) & 0x100000000ULL) == 0)
 					tsc_is_invariant = 1;
 				break;
 			}

Modified: head/sys/i386/i386/identcpu.c
==============================================================================
--- head/sys/i386/i386/identcpu.c	Thu Jan 22 20:29:07 2009	(r187597)
+++ head/sys/i386/i386/identcpu.c	Thu Jan 22 21:04:46 2009	(r187598)
@@ -887,7 +887,8 @@ printcpuinfo(void)
 				break;
 			case CPU_VENDOR_CENTAUR:
 				if (I386_CPU_FAMILY(cpu_id) == 0x6 &&
-				    I386_CPU_MODEL(cpu_id) >= 0xf)
+				    I386_CPU_MODEL(cpu_id) >= 0xf &&
+				    (rdmsr(0x1203) & 0x100000000ULL) == 0)
 					tsc_is_invariant = 1;
 				break;
 			}


More information about the svn-src-all mailing list