Subject: port-i386/9236: biosboot_com0 does not use serial console on L400GX+ mobo
To: None <gnats-bugs@gnats.netbsd.org>
From: Jonathan Stone <jonathan@Cuisinart.DSG.Stanford.EDU>
List: netbsd-bugs
Date: 01/18/2000 23:27:41
>Number:         9236
>Category:       port-i386
>Synopsis:       biosboot_com0 does not use serial console on L400GX+ mobo
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer (NetBSD/i386 Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 18 23:27:00 2000
>Last-Modified:
>Originator:     Jonathan Stone
>Organization:
	
>Release:        NetBSD-current 1.4P with kernel source from Dec 12
>Environment:
	
System: NetBSD Cuisinart.DSG.Stanford.EDU 1.4P NetBSD 1.4P (CARDBUS) #28: Sun Dec 12 15:54:19 PST 1999 jonathan@Cuisinart.DSG.Stanford.EDU:/cuisinart/src/NetBSD/src/sys/arch/i386/compile/CARDBUS i386

(This is not the system on which the bug occured!)

>Description:

After installing biosboot_com0 as bootblock, and booting with a serial
console, the kernel does not use serial console on L400GX+ mobo, when
the BIOS is set to use a serial port for BIOS (int13) console I/O.

The defines and comments in sys/arch/i386/stand/biosboot_com0/Makefile
indicate that biosboot_com0

>How-To-Repeat:

Install NetBSD-i386 1.4P on an Intel L440GX+ motherboard.

Build the sys/arch/i386/biosboot_com0 bootblock.  Everything I can see
indicates that bootblock builds with CONSDEV_COM0 as the default
serial port.

Enable the first serial port (what the BIOS calls COM1, and netbsd
calls tty00 or com0) as the BIOS serial console. The BIOS setup menus,
boot prompts, memory tests, PCI option-card BIOS messages (SCSI bios,
etc), then go to the serial console, as well as being displayed
on the VGA screen.

Now, install the biosboot_com0 bootblock into /usr/mdec, and
install that bootblock via (eg)

	/usr/mdec/installboot /usr/mdec/biosboot_com0 -f /dev/rwd0a


Boot the NetBSD bootblocks.  Check that the version string, user,
hostname, and date it prints match when you built biosboot_com0.  (it
did).  Note how console output continues to go to both serial port and
screen, which suggests biosboot_com0 is not using "DIRECT" serial I/O
but still using INT-13 for console i/o.

Either let the bootblock auto-boot /netbsd, or interrupt it and type a
boot command (boot wda0:/netbsd).  

Note how bootblock message about kernel size go to the serial console,
but as soon as the kernel proper takes over, output is on the VGA
screen only.

I had configured /etc/ttys to start a getty on /dev/tty00, and I get a
login prompt, so I know that's OK.

>Fix:

Beats me. My first guess is something is hosed about the environment
in which I built the bootblocks.   The  compiler toolchain I'm using
is close to 1.4.2_ALPHA, so I built the  bootblocks with
	OBJECT_FMT=a.out
but that shouldn't break serial consoles, should  it?

More likely, maybe something about the Intel server-board BIOS serial
I/O is confusing the NetBSD biosboot_com0 bootblocks into deciding to
use INT13 rather than the serial port?
>Audit-Trail:
>Unformatted: