From nobody  Fri Apr  3 08:13:26 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id IAA22349;
          Fri, 3 Apr 1998 08:13:26 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199804031613.IAA22349@hub.freebsd.org>
Date: Fri, 3 Apr 1998 08:13:26 -0800 (PST)
From: pauls@etext.org
To: freebsd-gnats-submit@freebsd.org
Subject: 2.2.6 kernel can't find sio[12] on Iwill motherboard
X-Send-Pr-Version: www-1.0

>Number:         6201
>Category:       kern
>Synopsis:       2.2.6 kernel can't find sio[12] on Iwill motherboard
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr  3 08:20:01 PST 1998
>Closed-Date:    Tue Jun 16 14:49:55 MEST 1998
>Last-Modified:  Tue Jun 16 14:55:25 MEST 1998
>Originator:     Paul Southworth
>Release:        2.2.6
>Organization:
>Environment:
FreeBSD  2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #0: Fri Apr  3 10:56:14 EST 1998     root@:/usr/src/sys/compile/JIZMAK  i386
(GENERIC + flags 0x80 to sio[12])
>Description:
Oops, can't find my serial ports.  PnP is disabled.  Ports are
statically assigned to 0x3f8/irq4 and 0x2e8/irq3, according to law.
Slipped it a RedHat-5.0 boot disk while nobody was looking, and it
found serial ports as expected.  Added 'flags 0x80' and rebuilt
kernel.  No joy.  Here's the poop:

 FreeBSD 2.2.6-RELEASE #0: Fri Apr  3 10:56:14 EST 1998
    root@:/usr/src/sys/compile/JIZMAK
Calibrating clock(s) ... i586 clock: 233914028 Hz, i8254 clock: 1193440 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
CLK_USE_I586_CALIBRATION not specified - using old calibration method
CPU: Pentium (233.86-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x543  Stepping=3
  Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
real memory  = 134217728 (131072K bytes)
Physical memory chunk(s):
0x00001000 - 0x0009ffff, 651264 bytes (159 pages)
0x00269000 - 0x07ffdfff, 131682304 bytes (32149 pages)
avail memory = 128962560 (125940K bytes)
pcibus_setup(1):        mode 1 addr port (0x0cf8) is 0x80000058
pcibus_setup(1a):       mode1res=0x80000000 (0x80000000)
pcibus_check:   device 0 is there (id=71008086)
Probing for devices on PCI bus 0:
        configuration mode 1 allows 32 devices.
chip0 <Intel 82439TX PCI cache memory controller> rev 1 on pci0:0:0
chip1 <Intel 82371AB PCI-ISA bridge> rev 1 on pci0:7:0
chip2 <Intel 82371AB IDE interface> rev 1 on pci0:7:1
        mapreg[20] type=1 addr=0000f000 size=0010.
chip3 <Intel 82371AB USB interface> rev 1 int d irq ?? on pci0:7:2
        mapreg[20] type=1 addr=00006400 size=0020.
chip4 <Intel 82371AB Power management controller> rev 1 on pci0:7:3
vga0 <VGA-compatible display device> rev 211 int a irq 11 on pci0:8:0
        mapreg[10] type=0 addr=e0000000 size=400000.
        mapreg[14] type=0 addr=e0400000 size=10000.
ahc0 <Adaptec 2940 Ultra SCSI host adapter> rev 1 int a irq 9 on pci0:9:0
        mapreg[10] type=1 addr=00006800 size=0100.
        mapreg[14] type=0 addr=e0410000 size=1000.
        reg16: ioaddr=0x6800 size=0x100

[...]

sio0: probe test 5 failed
sio0: probe test 8 failed
sio0 not found at 0x3f8
sio1: probe test 5 failed
sio1: probe test 8 failed
sio1 not found at 0x2f8

Various BIOS fiddling didn't change this problem.

Problem is 'serious' because this system requires a serial console.
>How-To-Repeat:
Boot FreeBSD 2.2.6 with this motherboard (Iwill P55XB2).
>Fix:

>Release-Note:
>Audit-Trail:

From: Paul Southworth <pauls@etext.org>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: kern/6201: 2.2.6 kernel can't find sio[12] on Iwill motherboard
Date: Fri, 3 Apr 1998 11:32:48 -0500 (EST)

 The 3.0 980311 SNAP kernel also does not find the ports.
 

From: Paul Southworth <pauls@etext.org>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: kern/6201: 2.2.6 kernel can't find sio[12] on Iwill motherboard
Date: Fri, 3 Apr 1998 11:59:09 -0500 (EST)

 Hey hey hey, OpenBSD 2.3 (yesterday's snap) can see these serial ports.  
 
Responsible-Changed-From-To: freebsd-bugs->bde 
Responsible-Changed-By: jkh 
Responsible-Changed-When: Fri Apr 3 13:30:19 PST 1998 
Responsible-Changed-Why:  
Bruce is Mr. Serial ports and besides, since he's always been 
the one unwilling to weaken (or at least change) the probe code, 
he should have this one on his plate. :) 

From: Paul Southworth <pauls@etext.org>
To: Bruce Evans <bde@zeta.org.au>
Cc:  Subject: Re: kern/6201
Date: Mon, 6 Apr 1998 09:05:43 -0400 (EDT)

 On Mon, 6 Apr 1998, Bruce Evans wrote:
 
 :> Should I wait for a fix on this, or should I forget it and get a
 :>different motherboard?
 :
 :Well, it's a 1 line change to ignore the error.
 
 Well then I guess I'd like to make that change and find out if the ports
 actually work.  Have you considered #ifdef'ing that fix in there and
 offering a kernel 'option' so that people with lame hardware can make
 their serial ports work, even if that's not the default?
 

From: Paul Southworth <pauls@etext.org>
To: Bruce Evans <bde@zeta.org.au>
Cc:  Subject: Re: kern/6201
Date: Mon, 6 Apr 1998 10:50:24 -0400 (EDT)

 On Tue, 7 Apr 1998, Bruce Evans wrote:
 
 :-current has two option to ignore sio probe errors using device flags
 :which can be set at boot time.  The documented 0x10000 flag only disables
 :test3.  The undocumented 0x40000 flag disables most tests and introduces
 :some bugs.
 
 Hmm, don't want bugs.  Just want a serial console at 9600bps.  Are the
 bugs serious enough to break that if I run the -current sio driver and
 kill those tests?
 
 :Failure of tests 5 and 8 means that some device other than the UART
 :being probed is driving the IRQ.  Perhaps it is just sio2 driving
 :IRQ4 and sio3 driving IRQ3.
 
 If my serial ports are at 0x3f8/irq3 and 0x2e8/irq4, then they are at sio0
 and sio1 by definition, yes?  That's what the BIOS says, and the OpenBSD
 (2.3) and Linux (from RedHat 5.0) kernels both agree with that and can see
 the ports. That's why I was being suspicious about FreeBSD being overly
 strict about something that might not matter very much... (?)
 
 :  The GENERIC configuration disables sio3
 :because it may conflict with some S3 graphics cards, and it disables
 :sio2 for no strong reason.  Perhaps the Iwill has sio2 and sio3 and
 :doesn;t initialize them properly.  FreeBSD only initializes them if
 :they are configured.  They should be configured (and not disabled)
 :if they exist.
 
 Is there any point to enabling sio2 and sio3 at the port/irq locations
 that are the same as sio0 and sio1?  I wouldn't think that would produce
 anything more useful than what I have going already.
 

From: Paul Southworth <pauls@etext.org>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/6201
Date: Wed, 8 Apr 1998 12:10:26 -0400 (EDT)

 Since it doesn't look like there is an easy fix for this problem
 forthcoming (and I need to stay with a main-line release for this server)
 I am going to return the motherboard and get something else.  You can do
 as you wish with the kern/6201 pr; I will not rely on its resolution.
 Gotta get this machine up and running.
 
 Thanks for your assistance.  I appreciate your instructing me in a few of
 the finer points of FreeBSD serial port probing and testing.
 
 --Paul
 
 :>Hmm, don't want bugs.  Just want a serial console at 9600bps.  Are the
 :>bugs serious enough to break that if I run the -current sio driver and
 :>kill those tests?
 :
 :Non-interrupt mode should work (with 16550s) at such a low speed.
 :Don't know, but the bugs in -current are because the flag kills some
 :of the initialization as well as the tests.
 :
 :>:Failure of tests 5 and 8 means that some device other than the UART
 :>:being probed is driving the IRQ.  Perhaps it is just sio2 driving
 :>:IRQ4 and sio3 driving IRQ3.
 :>
 :>If my serial ports are at 0x3f8/irq3 and 0x2e8/irq4, then they are at sio0
 :>and sio1 by definition, yes?  That's what the BIOS says, and the OpenBSD
 :
 :Those are the normal places for the first 2 ports and the defaults for sio0
 :and sio1, but sio0 and sio1 can be almost anywhere.
 :
 :>:  The GENERIC configuration disables sio3
 :>:because it may conflict with some S3 graphics cards, and it disables
 :>:sio2 for no strong reason.  Perhaps the Iwill has sio2 and sio3 and
 :>:doesn;t initialize them properly.  FreeBSD only initializes them if
 :>:they are configured.  They should be configured (and not disabled)
 :>:if they exist.
 :>
 :>Is there any point to enabling sio2 and sio3 at the port/irq locations
 :>that are the same as sio0 and sio1?  I wouldn't think that would produce
 :>anything more useful than what I have going already.
 :
 :No, but they should be enabled at their default port locations or wherever
 :they are since their interrupts might conflict.
 

From: Paul Southworth <pauls@etext.org>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/6201
Date: Wed, 8 Apr 1998 12:20:02 -0400 (EDT)

 Gee whiz.  I should have searched for this earlier...
 
 http://www.freebsd.org/cgi/getmsg.cgi?fetch=880953+883902+/usr/local/www/db/text/1998/freebsd-questions/19980322.freebsd-questions
 
 --Paul
 
State-Changed-From-To: open->closed 
State-Changed-By: bde 
State-Changed-When: Tue Jun 16 14:49:55 MEST 1998 
State-Changed-Why:  
Believed to be fixed in sio.c (-current:1.207, -stable:1.147.2.16), etc. 
>Unformatted:
