Date: Tue, 17 Apr 2007 20:40:06 GMT From: Ariff Abdullah <ariff@FreeBSD.org> To: freebsd-i386@FreeBSD.org Subject: Re: i386/104678: SMP not working on Turion XP Laptop Message-ID: <200704172040.l3HKe6nh010784@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/104678; it has been noted by GNATS.
From: Ariff Abdullah <ariff@FreeBSD.org>
To: bug-followup@FreeBSD.org, bde@zeta.org.au, danolson@visi.com,
infofarmer@FreeBSD.org, rainer.alves@gmail.com, kpitcher@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=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704172040.l3HKe6nh010784>
