Subject: Re: serial consoles and BIOS console redirection
To: David Laight <david@l8s.co.uk>
From: Eric Schnoebelen <eric@cirr.com>
List: port-i386
Date: 10/28/2002 17:10:09
David Laight writes:
- > 	Is there any way to convince everything to share the
- > same console port?  I hate the idea of having to use two
- > terminal server ports to manage one box.
- 
- IIRC the netbsd boot code doesn't actually use BIOS calls
- to output data to the serial ports!  Although it does grab
- the IO addresses from bios memory.

	The `stock' (ie, non-com port enhanced) boot blocks use
the BIOS IO calls to do all their output. (I think it's int10,
but I could be wrong.)  Both reading the code, and using the
boot blocks on the serial console redirected system indicates
this.

- Even if the bios doesn't advertise the serial port it is using,
- there is definitely scope for letting the boot code pick
- a serial port given the IO base address.

	I've looked into doing something like this, but I don't
know enough about the IBM-PC-clone BIOS to figure out how to
make it happen.  I'd love to make it happen though!

- Not looked where the kernel gets its 'console' from (yet).
- (in my list 'cos it would be handy to have output/input
- to/from COM1 and VGA/ps2 keyboard at the same time)

	The 1.6 implementation constructs a "bootinfo" structure
that gets passed to the kernel as part of it's argument vector.
The console part of the bootinfo structure (bootconsole)
indicates the console type ("com", "pc") and optionally port
("0", "1", "2", etc.)  I believe it also includes the IO vectors
for the serial console.

--
Eric Schnoebelen		eric@cirr.com		 http://www.cirr.com
          Programming is the art of debugging a blank sheet of paper.