From owner-freebsd-i386@FreeBSD.ORG Tue Jan 27 12:21:02 2004 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8054B16A4CE; Tue, 27 Jan 2004 12:21:02 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4385243D76; Tue, 27 Jan 2004 12:20:20 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i0RKKJFR022973; Tue, 27 Jan 2004 12:20:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i0RKKJVf022972; Tue, 27 Jan 2004 12:20:19 -0800 (PST) (envelope-from gnats) Resent-Date: Tue, 27 Jan 2004 12:20:19 -0800 (PST) Resent-Message-Id: <200401272020.i0RKKJVf022972@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Cc: "X-Backup:msg.NYjB"@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adrian Steinmann Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 568AC16A4CE for ; Tue, 27 Jan 2004 12:16:14 -0800 (PST) Received: from oneplusone.ch (oneplusone.ch [212.55.208.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 481C843D62 for ; Tue, 27 Jan 2004 12:16:04 -0800 (PST) (envelope-from ast@marabu.ch) Received: from oneplusone.ch (localhost [127.0.0.1]) by oneplusone.ch (8.12.9p1/8.12.9) with ESMTP id i0RKG3i3093384 for ; Tue, 27 Jan 2004 21:16:03 +0100 (MET) (envelope-from ast@marabu.ch) Received: (from uucp@localhost) by oneplusone.ch (8.12.9p1/8.12.9/Submit) with UUCP id i0RKG3Pr093383 for FreeBSD-gnats-submit@freebsd.org; Tue, 27 Jan 2004 21:16:03 +0100 (MET) (envelope-from ast@marabu.ch) Received: from marabu.marabu.ch (marabu.marabu.ch [192.168.21.3]) by nano.marabu.ch (8.12.9/8.12.9) with ESMTP id i0RKCBux087327 for ; Tue, 27 Jan 2004 21:12:11 +0100 (MET) (envelope-from ast@marabu.marabu.ch) Received: by marabu.marabu.ch (8.7.5/20001028-ast-8.3) id VAA15195; Tue, 27 Jan 2004 21:12:11 +0100 (CET) Received: from pico.marabu.ch (pico.marabu.ch [192.168.21.120]) by nano.marabu.ch (8.12.9/8.12.9) with ESMTP id i0RK7vux087042; Tue, 27 Jan 2004 21:07:58 +0100 (MET) (envelope-from ast@pico.marabu.ch) Received: from pico.marabu.ch (localhost.marabu.ch [127.0.0.1]) by pico.marabu.ch (8.12.10/8.12.10) with ESMTP id i0RK7vPi000726; Tue, 27 Jan 2004 21:07:57 +0100 (CET) (envelope-from ast@pico.marabu.ch) Received: (from ast@localhost) by pico.marabu.ch (8.12.10/8.12.10/Submit) id i0RK7vpC000725; Tue, 27 Jan 2004 21:07:57 +0100 (CET) (envelope-from ast) Message-Id: <200401272007.i0RK7vpC000725@pico.marabu.ch> Date: Tue, 27 Jan 2004 21:07:57 +0100 (CET) From: Adrian Steinmann To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: X-Backup: msg.NYjB cc: phk@phk.freebsd.dk Subject: i386/62003: make /boot/loader "reboot" code same as reboot() syscall X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Adrian Steinmann List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 20:21:02 -0000 >Number: 62003 >Category: i386 >Synopsis: make /boot/loader "reboot" code same as reboot() syscall >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jan 27 12:20:19 PST 2004 >Closed-Date: >Last-Modified: >Originator: Adrian Steinmann >Release: FreeBSD 5.2-RELEASE i386 >Organization: Webgroup Consulting AG >Environment: System: FreeBSD pico.marabu.ch 5.2-RELEASE FreeBSD 5.2-RELEASE #5: Mon Jan 26 09:37:10 CET 2004 root@pico.marabu.ch:/r/obj/usr/src/sys/PIC i386 >Description: On Soekris net4501 and net4801 with comBIOS 1.22, reboot from loader may hang. This was fixed by a change in btx.s: revision 1.33 near line 293: - ljmp $0xffff,$0x0 # reboot the machine + ljmp $0xf000,$0xfff0 # reboot the machine Nevertheless, it would be more consistant to also apply the patch for loader main.c below where the same logic as for the syscall reboot() This would also follow the recommendation found Frank van Gilluwe, 1st ed., Addison Wesley 1994, ISBN 0-201-62277-7, p91ff, where he says that using INT19 or jumping to BIOS boot f000:ffff are "misconceptions" and that software control (keyboard reset) should be used whenever possible. This was discussed at length in soekris-tech mailing list mid-november 2003 (right before the 5.2 code freeze). >How-To-Repeat: Remove patch rev 1.33 from btx.s and test reboot on soekris with comBIOS from loader -> hang. Add patch below -> ok. >Fix: Index: main.c =================================================================== RCS file: /usr/cvs/src/sys/boot/i386/loader/main.c,v retrieving revision 1.28 diff -u -r1.28 main.c --- main.c 25 Aug 2003 23:28:32 -0000 1.28 +++ main.c 27 Jan 2004 19:43:43 -0000 @@ -36,6 +36,7 @@ #include #include #include +#include #include "bootstrap.h" #include "libi386/libi386.h" @@ -243,6 +244,13 @@ (devsw[i]->dv_cleanup)(); printf("Rebooting...\n"); + +#if !defined(BROKEN_KEYBOARD_RESET) + isa_outb(IO_KBD + 4, 0xFE); + delay(1000000); + printf("Keyboard reset failed; exiting...\n"); +#endif + delay(1000000); __exit(0); } >Release-Note: >Audit-Trail: >Unformatted: