From owner-freebsd-hackers@FreeBSD.ORG Tue May 20 18:31:18 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787E9106566B for ; Tue, 20 May 2008 18:31:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 52A948FC12 for ; Tue, 20 May 2008 18:31:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (server.baldwin.cx [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id B1E591A4D7C; Tue, 20 May 2008 11:31:17 -0700 (PDT) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m4KIV7sg052536; Tue, 20 May 2008 14:31:09 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Andriy Gapon Date: Tue, 20 May 2008 11:24:23 -0400 User-Agent: KMail/1.9.7 References: <1210616585.00069210.1210605002@10.7.7.3> <1211246591.00072455.1211234402@10.7.7.3> <4832D432.2050907@icyb.net.ua> In-Reply-To: <4832D432.2050907@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805201124.23850.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 20 May 2008 14:31:09 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/7182/Tue May 20 12:09:32 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, RW Subject: Re: i386 cpu_reset_real: code/comment mismatch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 18:31:18 -0000 On Tuesday 20 May 2008 09:37:54 am Andriy Gapon wrote: > on 20/05/2008 00:51 John Baldwin said the following: > > So, the comment is correct and not the code. Curiously enough, OpenSolaris > > does the same thing (it writes 0x2 followed by 0x6), but it has some sort of > > comment which implies that you have to do a write to set or clear bit 1 > > before setting bit 2. Linux only uses 0xcf9 on a specific x86 machine (View > > workstation or some such) in which case it just does a single write of 0x6. > > I'll test locally to make sure 0x4 and 0x6 both work and if so I will commit > > the fix. > > And this code is most likely never reached in majority of the cases, > reset via keyboard controller should just work. Except on boxes where it doesn't (and hence why I added it). > BTW, I understand that there is a difference between hard and soft reset > in terms of hardware signals being asserted, but I don't quite > understand general consequences. I.e. what is a practical difference > between hard and soft reset? I've no idea. It may be that we should just always do a hard reset as that is in effect what both Solaris and Linux do. I'll probably just change it to do that. -- John Baldwin