[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: i386/1361: system running 2.7-stable hangs for 30 minutes when serial console is set during boot



The following reply was made to PR i386/1361; it has been noted by GNATS.

From: Martin Portmann <map@infinitum.ch>
To: "'gnats@cvs.openbsd.org'" <gnats@cvs.openbsd.org>
Cc: "'dadams@sleethal.com'" <dadams@sleethal.com>,
   "'Frank Cusack'" <fcusack@fcusack.com>, "'josh'" <dorqus@bsdfreek.com>
Subject: Re: i386/1361: system running 2.7-stable hangs for 30 minutes whe
	n  serial console is set during boot
Date: Wed, 18 Oct 2000 03:58:44 +0200

 The following patch againts 2.7 stable should solve this PR. 
 Problem is that BIOS blocks about 0.5s with every character if 
 DTR is not asserted. Patch discards character if DTR is not high.
 
 Index: bioscons.c
 ===================================================================
 RCS file: /cvs/src/sys/arch/i386/stand/libsa/bioscons.c,v
 retrieving revision 1.17
 diff -c -r1.17 bioscons.c
 *** bioscons.c  1999/08/25 00:54:19     1.17
 --- bioscons.c  2000/10/18 01:44:41
 ***************
 *** 225,230 ****
 --- 225,237 ----
   {
         register int rv;
 
 +       /* check online (DTR) */
 +       __asm __volatile(DOINT(0x14) : "=a" (rv) :
 +           "0" (0x300), "d" (minor(dev&0x7f)) : "%ecx", "cc" );
 +       if ( !(rv & 0x20) )
 +               return;
 +
 +       /* send character */
         __asm __volatile(DOINT(0x14) : "=a" (rv) :
             "d" (minor(dev)), "0" (c | 0x100) : "%ecx", "cc" );
   }
 
    ------------------------------------------------------------
    Martin Portmann                         Phone +41-41-7832720
    infinitum AG, Switzerland                 Fax +41-41-7832721
    Software Solutions                          www.infinitum.ch
 
    "Time is the best teacher, unfortunately it kills all its 
     students"