From owner-freebsd-questions Mon May 28 15:48:26 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hops.cs.jhu.edu (hops.cs.jhu.edu [128.220.223.10]) by hub.freebsd.org (Postfix) with ESMTP id CF49337B422 for ; Mon, 28 May 2001 15:48:22 -0700 (PDT) (envelope-from hybrid@hops.cs.jhu.edu) Received: from barley.cs.jhu.edu (barley.cs.jhu.edu [128.220.223.90]) by hops.cs.jhu.edu (8.9.3/8.9.3) with ESMTP id SAA29054 for ; Mon, 28 May 2001 18:46:31 -0400 (EDT) Received: from localhost (hybrid@localhost) by barley.cs.jhu.edu (8.11.1/8.11.1) with ESMTP id f4SMm7D28711 for ; Mon, 28 May 2001 18:48:07 -0400 (EDT) Date: Mon, 28 May 2001 18:48:07 -0400 (EDT) From: Robert LaThanh To: freebsd-questions@freebsd.org Subject: Rebooting CPU via Keyboard Controller Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I just spent about two days trying to figure out why my system would not reset upon issuing a reboot command. That is, it would hang at "Rebooting...". My system is an HP Brio 7113N, Intel Celeron 300a with 256MB RAM. I tried all kinds of things, changing every setting in my BIOS, removing devices (hard drives, NIC), and even whether different versions of FreeBSD could reboot with different BIOS settings -- I used to be running 4.1 and it could reboot fine, then I just did a fresh install of 4.3 and then it couldn't. Kernel option BROKEN_KEYBOARD_RESET didn't help; the keyboard reset code wasn't causing problems, it just wasn't working. Two days of troubleshooting later, I decided to try the the Linux approach of pulsing the keyboard reset line instead of just tapping it once. In src/sys/i386/i386/vm_machdep.c::cpu_reset_real() instead of hitting 0x64 once and waiting, I have it hit 100 times. Here's the simple change I made and my computer now reboots instead of hanging at "Rebooting...": src/sys/i386/i386/vm_machdep.c 485d484 < int i; 505,509c504,505 < for (i=0; i<100; i++) { /* Pulse the keyboard reset line */ < DELAY(50); < outb(IO_KBD + 4, 0xFE); < DELAY(50); < } --- > outb(IO_KBD + 4, 0xFE); > DELAY(500000); /* wait 0.5 sec to see if that did it */ Is there any reason that this shouldn't be implemented in the FreeBSD kernel, I don't see any potential harm it could cause and it may help at least a few, if not many, people with reset problems. Robert LaThanh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message