From owner-freebsd-stable Wed Mar 19 22:17:25 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B568937B401 for ; Wed, 19 Mar 2003 22:17:22 -0800 (PST) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEF0743F85 for ; Wed, 19 Mar 2003 22:17:21 -0800 (PST) (envelope-from kwsn@earthlink.net) Received: from sdn-ap-004caburbp0276.dialsprint.net ([63.184.33.22] helo=[172.16.0.1]) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18vtMc-0005r9-00 for freebsd-stable@freebsd.org; Wed, 19 Mar 2003 22:17:19 -0800 Subject: Athlon SSE hack not working on recent XPs [PATCH] From: Jon Kuster Reply-To: kwsn@earthlink.net To: freebsd-stable@freebsd.org Content-Type: text/plain Organization: Message-Id: <1048141037.87958.28.camel@jonnyv.kwsn.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 19 Mar 2003 23:17:17 -0700 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I recently got an AthlonXP 2100+ - one of the Thoroughbred-b versions. I have both CPU_ATHLON_SSE_HACK and CPU_ENABLE_SSE in my kernel, but SSE wasn't being enabled. After a little investigation, it turns out that the cpu_id that the hack checks has been bumped and so the check fails. The included patch fixes the problem on my system. Thanks, Jon Kuster I'm not subscribed, so please cc: me. HW info: XP2100+ on an ECS K7S5A with most recent BIOS revision. FreeBSD jonnyv.kwsn.net 4.8-RC FreeBSD 4.8-RC #3: Wed Mar 19 00:20:19 MST 2003 root@jonnyv.kwsn.net:/usr/obj/usr/src/sys/JONNYV i386 and the patch itself: --- initcpu.c-orig Wed Mar 19 03:17:46 2003 +++ initcpu.c Wed Mar 19 00:18:34 2003 @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: /repoman/r/ncvs/src/sys/i386/i386/initcpu.c,v 1.19.2.8 2003/01/22 20:14:52 jhb Exp $ + * $FreeBSD: src/sys/i386/i386/initcpu.c,v 1.19.2.8 2003/01/22 20:14:52 jhb Exp $ */ #include "opt_cpu.h" @@ -578,7 +578,8 @@ */ if ((cpu_feature & CPUID_XMM) == 0 && ((cpu_id & ~0xf) == 0x660 || - (cpu_id & ~0xf) == 0x670)) { + (cpu_id & ~0xf) == 0x670 || + (cpu_id & ~0xf) == 0x680)) { u_int regs[4]; wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000); do_cpuid(1, regs); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message