From owner-freebsd-bugs@FreeBSD.ORG Tue Jul 29 11:30:11 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8BBC37B401 for ; Tue, 29 Jul 2003 11:30:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A67043FA3 for ; Tue, 29 Jul 2003 11:30:10 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6TIUAUp096033 for ; Tue, 29 Jul 2003 11:30:10 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6TIUAnv096032; Tue, 29 Jul 2003 11:30:10 -0700 (PDT) Resent-Date: Tue, 29 Jul 2003 11:30:10 -0700 (PDT) Resent-Message-Id: <200307291830.h6TIUAnv096032@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cyrill Shevchuk Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4E7B37B401 for ; Tue, 29 Jul 2003 11:21:51 -0700 (PDT) Received: from holmes.peterlink.ru (holmes.peterlink.ru [195.242.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EA9C43FAF for ; Tue, 29 Jul 2003 11:21:50 -0700 (PDT) (envelope-from cyrill@peterlink.ru) Received: from stapleton.peterlink.ru (stapleton.peterlink.ru [195.242.2.5]) by holmes.peterlink.ru (8.12.6/8.12.6) with ESMTP id h6TILn3W068335 for ; Tue, 29 Jul 2003 22:21:49 +0400 (MSD) Received: from buratino.peterlink.ru (cyrill@buratino.peterlink.ru [195.242.2.70])h6TIKxZT002935 for ; Tue, 29 Jul 2003 22:20:59 +0400 (MSD) Received: from localhost (cyrill@localhost) by buratino.peterlink.ru (8.9.1/8.9.1) with SMTP id WAA07418 for ; Tue, 29 Jul 2003 22:20:58 +0400 (MSD) Message-Id: Date: Tue, 29 Jul 2003 22:20:58 +0400 (MSD) From: Cyrill Shevchuk To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/55018: [patch] Digiboard PC/Xem fails to initialize when using digi module (BIOS boot failed (0x00 != 0x4447)) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Cyrill Shevchuk List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2003 18:30:12 -0000 >Number: 55018 >Category: kern >Synopsis: [patch] Digiboard PC/Xem fails to initialize when using digi module (BIOS boot failed (0x00 != 0x4447)) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 29 11:30:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Cyrill Shevchuk >Release: FreeBSD 5.1-RELEASE i386 >Organization: Peterlink ISP >Environment: FreeBSD parazit.peterlink.ru 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun 5 02:55:42 GMT 2003 root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: Module digi.ko can't initialize Digiboard PC/Xem ISA multiport serial card on old Pentium-100MHz machine. Error message during boot or manual module loading: digi0: BIOS boot failed (0x00 != 0x4447) >How-To-Repeat: 1. Apply following patch to enable verbose init process: --- sys/dev/digi/digi.c.orig Tue Jul 29 09:36:38 2003 +++ sys/dev/digi/digi.c Sun Jul 27 14:21:35 2003 @@ -108,7 +108,7 @@ static struct con_bios *con_bios_list; devclass_t digi_devclass; static char driver_name[] = "digi"; -unsigned digi_debug = 0; +unsigned digi_debug = 1; static struct speedtab digispeedtab[] = { { 0, 0}, /* old (sysV-like) Bx codes */ 2. Place these lines in /etc/make.conf: .if ${.CURDIR} == /usr/src/sys/modules/digi/digi CFLAGS+= -DDEBUG .endif 3. Recompile digi.ko module and load it: # cd /usr/src/sys/modules/digi # make cleandir && make obj && make depend && make # cp digi/digi.ko /boot/kernel # kldload digi digi0: probing on isa bus digi0: isa? port 0x104 mem 0xd0000 digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: Probe returns -10 digi0: probing on isa bus digi0: isa? port 0x104 mem 0xd0000 digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: Probe returns -10 digi0 at port 0x104-0x107 iomem 0xd0000-0xd7fff on isa0 digi0: attaching digi0: Checking card type digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: internal memory segment 0x0 digi0: got reset after 0 iterations digi0: short memory test digi0: 1st memory test ok digi0: 2nd memory test ok digi0: 3rd memory test ok digi0: Got init reset after 0 us digi0: BIOS uploaded digi0: BIOS started after 0 us digi0: BIOS boot failed (0x00 != 0x4447) digi1: probing on isa bus digi1: 0x534: Invalid i/o address digi1: probing on isa bus digi1: probing on isa bus digi1: 0xf00: Invalid i/o address digi1: probing on isa bus digi1: 0x330: Invalid i/o address digi1: probing on isa bus digi1: io address not given digi1: probing on isa bus digi1: 0x061: Invalid i/o address digi1: probing on isa bus digi1: io address not given >Fix: Period given to digiboard bios to run is too small. In current version of sys/dev/digi/digi.c it is 2 * hz ticks, actually it takes my card a little longer to initialize (logged with default hz=100 value): digi0: probing on isa bus digi0: isa? port 0x104 mem 0xd0000 digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: Probe returns -10 digi0: probing on isa bus digi0: isa? port 0x104 mem 0xd0000 digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: Probe returns -10 digi0 at port 0x104-0x107 iomem 0xd0000-0xd7fff on isa0 digi0: attaching digi0: Checking card type digi0: got reset after 0 iterations digi0: board type is 0xf5 digi0: internal memory segment 0x0 digi0: got reset after 0 iterations digi0: short memory test digi0: 1st memory test ok digi0: 2nd memory test ok digi0: 3rd memory test ok digi0: Got init reset after 0 us digi0: BIOS uploaded digi0: BIOS started after 0 us digi0: BIOS booted after 215 iterations digi0: Loading FEP/OS digi0: FEP/OS loaded digi0: FEP/OS started after 3 iterations digi0: Digiboard PC/Xem, 64 ports found digi1: probing on isa bus digi1: 0x534: Invalid i/o address digi1: probing on isa bus digi1: probing on isa bus digi1: 0xf00: Invalid i/o address digi1: probing on isa bus digi1: 0x330: Invalid i/o address digi1: probing on isa bus digi1: io address not given digi1: probing on isa bus digi1: 0x061: Invalid i/o address digi1: probing on isa bus digi1: io address not given Suggested patch to sys/dev/digi/digi.c (version 1.34): --- sys/dev/digi/digi.c.orig Tue Jul 29 09:40:24 2003 +++ sys/dev/digi/digi.c Tue Jul 29 09:40:36 2003 @@ -378,7 +378,7 @@ DLOG(DIGIDB_INIT, (sc->dev, "BIOS started after %d us\n", i)); for (i = 0; vW(ptr) != *(u_short *)"GD"; i++) { - if (i > 2*hz) { + if (i > 5*hz) { log(LOG_ERR, "digi%d: BIOS boot failed " "(0x%02x != 0x%02x)\n", sc->res.unit, vW(ptr), *(u_short *)"GD"); >Release-Note: >Audit-Trail: >Unformatted: