From owner-freebsd-current@FreeBSD.ORG Fri Jun 26 19:35:18 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0881065670; Fri, 26 Jun 2009 19:35:18 +0000 (UTC) (envelope-from ianjhart@ntlworld.com) Received: from mtaout03-winn.ispmail.ntl.com (mtaout03-winn.ispmail.ntl.com [81.103.221.49]) by mx1.freebsd.org (Postfix) with ESMTP id CB99F8FC28; Fri, 26 Jun 2009 19:35:17 +0000 (UTC) (envelope-from ianjhart@ntlworld.com) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090626193512.TEUT5579.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Fri, 26 Jun 2009 20:35:12 +0100 Received: from cpc1-cove3-0-0-cust909.sol2.cable.ntl.com ([86.20.31.142]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090626193511.MSUQ2093.aamtaout03-winn.ispmail.ntl.com@cpc1-cove3-0-0-cust909.sol2.cable.ntl.com>; Fri, 26 Jun 2009 20:35:11 +0100 X-Virus-Scanned: amavisd-new at cpc2-cove3-0-0-cust311.sol2.cable.ntl.com Received: from localhost (localhost [127.0.0.1]) by cpc1-cove3-0-0-cust909.sol2.cable.ntl.com (8.14.3/8.14.3) with ESMTP id n5QJYx7h011606; Fri, 26 Jun 2009 20:35:00 +0100 (BST) (envelope-from ianjhart@cpc1-cove3-0-0-cust909.sol2.cable.ntl.com) Received: from gamma.private.lan (gamma.private.lan [192.168.0.12]) by webmail (Horde Framework) with HTTP; Fri, 26 Jun 2009 20:34:59 +0100 Message-ID: <20090626203459.20716tepaezxqggs@webmail> Date: Fri, 26 Jun 2009 20:34:59 +0100 From: Ian J Hart To: Stanislav Sedov References: <20090626123727.18824c9jkz72dw8w@10.248.192.16> <20090626212244.783465ae.stas@FreeBSD.org> In-Reply-To: <20090626212244.783465ae.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-7.2 X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on cpc1-cove3-0-0-cust909.sol2.cable.ntl.com X-Cloudmark-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=NLZqzBF-AAAA:8 a=zd2uoN0lAAAA:8 a=2QeAq8OYa2l4WNnCNf8A:9 a=O0ftUThWSCJRjlR_vzEA:7 a=RYb6dFYQa1_8dI4rzIXRIeqCidoA:4 a=SV7veod9ZcQA:10 a=_dQi-Dcv4p4A:10 Cc: freebsd-current@freebsd.org, Ian J Hart Subject: Re: AMD errata 169 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 19:35:19 -0000 Quoting Stanislav Sedov : > Content-Type: text/plain; charset=US-ASCII > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > On Fri, 26 Jun 2009 12:37:27 +0100 > Ian J Hart mentioned: > >> I know I asked this before but I figure the long post may have put >> some people off. >> >> #169 >> http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25759.pdf >> >> I'd like to eliminate this as a cause of my problem >> >> It appears I can read the value. >> >> #kldload cpuctl >> #cpucontrol -m 0xc001001f /dev/cpuctl0 >> MSR 0xc001001f: 0x00400000 0x00100008 >> >> #cpucontrol -m 0xc001001f=0x0040000000100008 /dev/cpuctl0 >> >> Causes an nfe0 watchdog timeout and a powerdown failed, so that's >> clearly a dumb thing to do. >> >> Would I be better off asking somewhere else? > > It looks like it is my fault in fact. Due to the bug in cpuctl > code the value written to MSR registers always was zero. Can you, > please, try with the following patch? Thanks! > > Index: sys/dev/cpuctl/cpuctl.c > =================================================================== > --- sys/dev/cpuctl/cpuctl.c (revision 195052) > +++ sys/dev/cpuctl/cpuctl.c (working copy) > @@ -222,14 +222,17 @@ > * Explicitly clear cpuid data to avoid returning stale > * info > */ > - data->data = 0; > DPRINTF("[cpuctl,%d]: operating on MSR %#0x for %d cpu\n", __LINE__, > data->msr, cpu); > oldcpu = td->td_oncpu; > is_bound = cpu_sched_is_bound(td); > set_cpu(cpu, td); > - ret = cmd == CPUCTL_RDMSR ? rdmsr_safe(data->msr, &data->data) : > - wrmsr_safe(data->msr, data->data); > + if (cmd == CPUCTL_RDMSR) { > + data->data = 0; > + ret = rdmsr_safe(data->msr, &data->data); > + } else { > + ret = wrmsr_safe(data->msr, data->data); > + } > restore_cpu(oldcpu, is_bound, td); > return (ret); > } > @@ -368,7 +371,7 @@ > /* > * Perform update. > */ > - wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)args->data); > + wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ptr); > > /* > * Serialize instruction flow. > > -- > Stanislav Sedov > ST4096-RIPE > I only have cheesy KVM access. If it locks I'll have to wait until Monday to power cycle, so I might wait until Sunday night. OTOH I just opened a bottle of wine, so anything could happen. Cheers! Looking at the Block diagram for the motherboard (Tyan S2895) in looks like the PCI-X slots have their own tunnel chip and it's the PCI-Express slots which run through the northbridge chips, so it's looking unlikely that this is the cause of the card errors In any case I learned something and found a bug. That's why they call me the bugmeister. Actually that's just me. Hey, this wine is good... Thanks again -- ian j hart -- ian j hart ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.