From tk@ef80.jnx.de  Sun Aug 24 11:18:10 2003
Return-Path: <tk@ef80.jnx.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1EE7C16A4C0
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 11:18:10 -0700 (PDT)
Received: from webmail.tiscali.de (relay1.tiscali.de [62.26.116.129])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 22FD543FDD
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 11:18:08 -0700 (PDT)
	(envelope-from tk@ef80.jnx.de)
Received: from Haby.thorstenK.nu (213.54.46.165) by webmail.tiscali.de (6.7.019)
        id 3F2FB429004FD47E for FreeBSD-gnats-submit@freebsd.org; Sun, 24 Aug 2003 20:18:06 +0200
Received: from ef80.jnx.de (ef80.thorstenK.nu [10.0.0.42])
	by Haby.thorstenK.nu (8.12.9/8.12.9) with ESMTP id h7OII4ZN009274
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 20:18:05 +0200 (CEST)
	(envelope-from tk@ef80.jnx.de)
Received: from ef80.jnx.de (localhost.jnx.de [127.0.0.1])
	by ef80.jnx.de (8.12.9/8.12.9) with ESMTP id h7OII9ej000761
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Aug 2003 20:18:09 +0200 (CEST)
	(envelope-from tk@ef80.jnx.de)
Received: (from tk@localhost)
	by ef80.jnx.de (8.12.9/8.12.9/Submit) id h7OII7Gj000760;
	Sun, 24 Aug 2003 20:18:07 +0200 (CEST)
Message-Id: <200308241818.h7OII7Gj000760@ef80.jnx.de>
Date: Sun, 24 Aug 2003 20:18:07 +0200 (CEST)
From: Thorsten Kuehnemann <Thorsten.Kuehnemann@Hamburg.de>
Reply-To: Thorsten Kuehnemann <Thorsten.Kuehnemann@Hamburg.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: partly configured serial port freezes system
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55930
>Category:       i386
>Synopsis:       partly configured serial port freezes system
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    remko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 24 11:20:11 PDT 2003
>Closed-Date:    Sat Apr 01 20:31:57 GMT 2006
>Last-Modified:  Sat Apr 01 20:31:57 GMT 2006
>Originator:     Thorsten Kuehnemann
>Release:        FreeBSD 5.1-RELEASE-p2 i386
>Organization:
private
>Environment:
Booting FreeBSD while BIOS serial ports are configured to "auto"
System: FreeBSD ef80.jnx.de 5.1-RELEASE-p2 FreeBSD 5.1-RELEASE-p2 #0: Wed Aug 20 13:41:44 CEST 2003 tk@ef80.jnx.de:/home/usr/obj/home/usr/src/sys/GENERIC-DEBUG i386

	The kernel is GENERIC but the line
	"makeoptions     DEBUG=-g"
	was made active in GENERIC-DEBUG.

	Pentium1-233 on a Shuttle HOT565-Board with Award BIOS.


>Description:
	While booting the machine freezes while or right after
        displaying the loginprompt at the console.

        These are the problematic kernel messages:

	kernel: sio0: configured irq 4 not in bitmap of probed irqs 0
	kernel: sio0: port may not be enabled
	kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
	kernel: sio0: type 8250 or not responding
	kernel: sio1: configured irq 3 not in bitmap of probed irqs 0
	kernel: sio1: port may not be enabled

        In the BIOS the configuration of the serial lines was set to
        "Auto".

	
>How-To-Repeat:
	Try to boot FreeBSD with a partly or unconfigured serial ports.
	If the mentioned error messages are found, you will get a
	freeze (earlier or later).
>Fix:

        After enabling the serial ports in BIOS giving an I/O and
	IRQ the problem disappears and the kernel messages are:

	kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
	kernel: sio0: type 16550A
	kernel: sio1 at port 0x2f8-0x2ff irq 3 on isa0
	kernel: sio1: type 16550A

        You will find a dozen PR's containing the text
	      "sio0: configured irq "
	with hang or panic problems.

        I have had two different machines with the same problem
	solved by configuring the serial ports in the BIOS.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: bde 
State-Changed-When: Mon May 10 23:52:00 PDT 2004 
State-Changed-Why:  
This is most likely caused by setting the device flag 0x10 on the 
unconfigured sio0 port.  The device flag 0x10 is more than a hint; it 
forces the last sio port with this bit set to be the preferred serial 
console (if there is a serial console), and the probe is forced to 
succeed for the preferred serial console (whether or not this is the 
actual console).  If the preferred serial console is the actual console, 
then the system tends to hang printing the first boot message to it. 
Otherwise the system tends to hang later if the port is accessed from 
userland. 

Unfortunately, setting the device flag 0x10 on sio0 is the default. 
The problem is rarely seen because an sio0 port at address 0x3F8 
used to be standard hardware, so it took unconfiguring this port to 
cause the problem. 

This problem is indicated by the "type 8250 or not responding" message. 
The "configured irq N not in bitmap" message is normal for ports that 
are detected to be not there.  This message should not be printed if 
the probe fails (except when booting with -v so that the reasons for 
the failure are printed). 

Related problem: the preferred serial console is documented to be the 
first port (in config file order) with 0x10 set in its flags, but it 
actually the last such port (in unit number order). 

See also PR 33963. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=55930 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: remko 
State-Changed-When: Sun Mar 19 17:43:54 UTC 2006 
State-Changed-Why:  
Is this still a problem on recent FreeBSD versions? 
like 5.4 and 6.0 (or perhaps even the latest BETA releases 
from 5.5 and/or 6.1). 


Responsible-Changed-From-To: freebsd-i386->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Sun Mar 19 17:43:54 UTC 2006 
Responsible-Changed-Why:  
Grab the PR so that i can keep track of the feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55930 
State-Changed-From-To: feedback->closed 
State-Changed-By: remko 
State-Changed-When: Sat Apr 1 20:31:42 UTC 2006 
State-Changed-Why:  
Feedback timeout. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55930 
>Unformatted:
