From owner-freebsd-hackers Tue Aug 27 2:46:35 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B47FC37B400 for ; Tue, 27 Aug 2002 02:46:32 -0700 (PDT) Received: from mail012.syd.optusnet.com.au (mail012.syd.optusnet.com.au [210.49.20.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA41343E42 for ; Tue, 27 Aug 2002 02:46:31 -0700 (PDT) (envelope-from simon@synatech.com.au) Received: from co3021625-a.mckinn1.vic.optushome.com.au (c17681.mckinn1.vic.optusnet.com.au [210.49.221.35]) by mail012.syd.optusnet.com.au (8.11.1/8.11.1) with ESMTP id g7R9kUK15527 for ; Tue, 27 Aug 2002 19:46:30 +1000 Received: by co3021625-a.mckinn1.vic.optushome.com.au (Postfix, from userid 1001) id EFD6C14A59; Tue, 27 Aug 2002 19:46:29 +1000 (EST) Date: Tue, 27 Aug 2002 19:46:29 +1000 From: Simon Lai To: freebsd-hackers@freebsd.org Subject: implementing Via LongHaul technology Message-ID: <20020827194629.A6743@pobox.com.> Reply-To: simon@synatech.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Via uses a technology called LongHaul in its low power CPUs, to save power and reduce operating temperatures. Its activated through MSRs, but has some particular timing requirements. An example code fragment from the programmers manual for this technology is mov [_temp],eax ;copy RevisionID[3:0] and [_temp],0fh ;mask RevisionID[3:0] shl [_temp],4 ;save revkey and eax,0fe0fff0fh ; reset longhaul[24:20] to 0 or eax,ebx or eax, 00000200h ; set EnableSoftVID [9] or eax,[_temp] ;set revkey wrmsr hlt hlt From the section accompanying this code - "Once the enable SoftVID bit [9] is set, the processor's VID pins will drive the value in [24:20] on the next AUTOHALT/StopGrant transition. The duration should be >=1ms to ensure the CPU's internal PLL is resynchronized. For AUTOHALT, this means interrupts must be disabled except for the timer tick, which should be reset to >= 1ms. Care must be taken to avoid other system events that could interfere with this operation. A few examples are snooping, NMI, INIT, SMI, FLUSH." Can someone point to code that already does a similar thing, timing wise and disabling interrupts. Initially I would be happy just to force the processor into a particular mode on boot, for testing purposes, but would like to eventually implement a dynamic tuning algorithm related to idle time. Simon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message