From owner-freebsd-arch@FreeBSD.ORG Wed Nov 14 20:12:22 2007 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EB3316A419 for ; Wed, 14 Nov 2007 20:12:22 +0000 (UTC) (envelope-from billy@nlcc.us) Received: from mail1.wildblue.net (mail1.wildblue.net [216.126.204.45]) by mx1.freebsd.org (Postfix) with ESMTP id 06EAF13C46B for ; Wed, 14 Nov 2007 20:12:21 +0000 (UTC) (envelope-from billy@nlcc.us) Received: from ibm.nlcc.us (67-54-202-48.cust.wildblue.net [67.54.202.48]) by mail1.wildblue.net (Postfix) with ESMTP id C198A36CDC6 for ; Wed, 14 Nov 2007 12:53:16 -0700 (MST) Received: (qmail 81068 invoked by uid 89); 14 Nov 2007 19:53:05 -0000 Received: from unknown (HELO ?192.168.0.33?) (billy@192.168.0.33) by ibm.nlcc.us with ESMTPA; 14 Nov 2007 19:53:05 -0000 Message-ID: <473B521D.7050202@nlcc.us> Date: Wed, 14 Nov 2007 13:53:01 -0600 From: Billy Newsom User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: reBoot code: can we detect if there is an AT keyboard controller? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2007 20:12:22 -0000 AFAIK, the FreeBSD kernel still relies on a 90s codebase for rebooting... It uses the keyboard controller reset method to do a warm reboot. I have had trouble with this method over the years... a Pentium Pro and more recently a Mac Pro with no keyboard controller. I have speculated that Mac laptops and blade servers would also lack the KBC. If Intel continues their progress of dropping deprecated hardware, the KBC could disappear in the next 3 to 5 years. So could there be some intelligent software code to check the presence of this device, and if not present, use the alternate reboot? The ACPI reboot sequence, for example, works for FreeBSD 6.2 and later, on my Mac Pro quad Xeon, amd64. Unfortunately, although the kernel detects the presence of a KBC during boot, it doesn't seem that this information gets stored as a global variable for later use. (I made this assertion a few times at freebsd-stable.) It seems like the logical course is to only reboot the keyboard controller if such a thing exists!! Looking back at my notes and my previous research, it appears that the code is around where you can find the cpu_reset code near... /* "good night, sweet prince .... " */ Setting hw.acpi.handle_reboot=1 must bypass that. Could we force the use of this tunable when it's obvious that the KBC is missing? Billy