From owner-freebsd-ports@FreeBSD.ORG Fri Jan 25 06:07:02 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E351216A41A for ; Fri, 25 Jan 2008 06:07:02 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id A008313C4F8 for ; Fri, 25 Jan 2008 06:07:02 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1JIHiO-0007dY-Cv; Fri, 25 Jan 2008 09:07:00 +0300 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id 4A38D7D301F; Fri, 25 Jan 2008 09:06:59 +0300 (MSK) Date: Fri, 25 Jan 2008 09:06:59 +0300 From: Stanislav Sedov To: Markus Strobl Message-ID: <20080125060659.GE82888@dracon.ht-systems.ru> References: <20080120215901.171800@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080120215901.171800@gmx.net> Organization: The FreeBSD Project X-Voice: +7 916 849 20 23 X-XMPP: ssedov@jabber.ru X-Yahoo: stanislav_sedov X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-University: MEPhI X-Mailer: carrier-pigeon X-Operating-System: FreeBSD quasar.ht-systems.ru 7.0-BETA2 FreeBSD 7.0-BETA2 Cc: ports@freebsd.org Subject: Re: FreeBSD Port: devcpu-0.8.2_1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2008 06:07:03 -0000 On Sun, Jan 20, 2008 at 10:59:01PM +0100 Markus Strobl mentioned: > Hi Stanislav, > > few days ago, i write you a mail over my problem with the devcpu kernelmodul. I want to set a msr for undervolting a amd x2 cpu. > Now I use the following patch for cpu.c: > > --- workO/devcpu-0.8.2/cpu/cpu.c 2007-07-20 00:30:18.000000000 +0200 > +++ work/devcpu-0.8.2/cpu/cpu.c 2008-01-18 23:59:32.000000000 +0100 > @@ -230,7 +230,8 @@ > ("[cpu,%d]: bad cpu number %d", __LINE__, cpu)); > > /* Explicitly clear cpuid data to avoid returning stale info */ > - data->data = 0; > + if (cmd == CPU_RDMSR) > + data->data = 0; > > DPRINTF("[cpu,%d]: operating on MSR %#0x for %d cpu\n", __LINE__, \ > data->msr, cpu); > > > Undervolting with a amd X2 cpu works now fine :-). Committed! Thanks a lot for this patch! I'm wondering, how I missed that before... WRMSR ioctl was totally broken. -- Stanislav Sedov ST4096-RIPE