i386/104678: SMP not working on Turion XP Laptop
Ariff Abdullah
ariff at FreeBSD.org
Tue Apr 17 20:40:06 UTC 2007
The following reply was made to PR i386/104678; it has been noted by GNATS.
From: Ariff Abdullah <ariff at FreeBSD.org>
To: bug-followup at FreeBSD.org, bde at zeta.org.au, danolson at visi.com,
infofarmer at FreeBSD.org, rainer.alves at gmail.com, kpitcher at KeithPitcher.com
Cc:
Subject: Re: i386/104678: SMP not working on Turion XP Laptop
Date: Wed, 18 Apr 2007 04:24:47 +0800
This is a multi-part message in MIME format.
--Multipart=_Wed__18_Apr_2007_04_24_47_+0800_ZOU6ztcwU2=L/5G=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Forget those ridiculous workaround, train wreck idle_cpu, etc. Please
try this patch (attached) instead.
--
Ariff Abdullah
FreeBSD
... Recording in stereo is obviously too advanced
and confusing for us idiot ***** users :P ........
--Multipart=_Wed__18_Apr_2007_04_24_47_+0800_ZOU6ztcwU2=L/5G=
Content-Type: text/x-diff;
name="turionX2_c1e.diff"
Content-Disposition: attachment;
filename="turionX2_c1e.diff"
Content-Transfer-Encoding: 7bit
Index: src/sys/amd64/amd64/identcpu.c
===================================================================
RCS file: /home/ncvs/src/sys/amd64/amd64/identcpu.c,v
retrieving revision 1.153
diff -u -r1.153 identcpu.c
--- src/sys/amd64/amd64/identcpu.c 26 Mar 2007 18:03:29 -0000 1.153
+++ src/sys/amd64/amd64/identcpu.c 17 Apr 2007 20:13:35 -0000
@@ -357,9 +357,16 @@
if (cpu_feature & CPUID_HTT)
htt = (cpu_procinfo & CPUID_HTT_CORES) >> 16;
if (strcmp(cpu_vendor, "AuthenticAMD") == 0 &&
- (amd_feature2 & AMDID2_CMP))
+ (amd_feature2 & AMDID2_CMP)) {
cmp = (cpu_procinfo2 & AMDID_CMP_CORES) + 1;
- else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
+ /*
+ * Disable C1E on Turion64 X2 family
+ * to keep apic timer alive.
+ */
+ if (cmp > 1 && (cpu_id & ~0xf) == 0x40f80)
+ wrmsr(0xc0010055,
+ rdmsr(0xc0010055) & ~0x10000000);
+ } else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
(cpu_high >= 4)) {
cpuid_count(4, 0, regs);
if ((regs[0] & 0x1f) != 0)
Index: src/sys/i386/i386/identcpu.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/identcpu.c,v
retrieving revision 1.176
diff -u -r1.176 identcpu.c
--- src/sys/i386/i386/identcpu.c 6 Apr 2007 18:15:02 -0000 1.176
+++ src/sys/i386/i386/identcpu.c 17 Apr 2007 20:13:35 -0000
@@ -863,9 +863,16 @@
if (cpu_feature & CPUID_HTT)
htt = (cpu_procinfo & CPUID_HTT_CORES) >> 16;
if (strcmp(cpu_vendor, "AuthenticAMD") == 0 &&
- (amd_feature2 & AMDID2_CMP))
+ (amd_feature2 & AMDID2_CMP)) {
cmp = (cpu_procinfo2 & AMDID_CMP_CORES) + 1;
- else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
+ /*
+ * Disable C1E on Turion64 X2 family
+ * to keep apic timer alive.
+ */
+ if (cmp > 1 && (cpu_id & ~0xf) == 0x40f80)
+ wrmsr(0xc0010055,
+ rdmsr(0xc0010055) & ~0x10000000);
+ } else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
(cpu_high >= 4)) {
cpuid_count(4, 0, regs);
if ((regs[0] & 0x1f) != 0)
--Multipart=_Wed__18_Apr_2007_04_24_47_+0800_ZOU6ztcwU2=L/5G=--
More information about the freebsd-i386
mailing list