Subject: Re: Selection of the root partition
To: Michael Lorenz <macallan@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 04/23/2007 20:42:32
On Mon, Apr 23, 2007 at 02:20:54PM -0400, Michael Lorenz wrote:
> 
> While we're at it - how does x86 select the console device? On OF we 
> just ask the firmware again but as far as I remember there is no such 
> facility in a PC's BIOS.

Initial input and output is done via bios calls [1] [2].
/boot has a config table (set by installboot and passed in by bootxx) that
can specify the console device, or the 'consdev' command can set it.
If a serial port is selected /boot usually accesses the uart directly
(not through the bios).
As well as the 'standard' com devices, the ioaddr can be explicitly set.
Also setting the baud rate to zero will use the rate set by the bios.

I don't know of any way of telling that the bios is redirecting console
output to a serial port, but is there isn't a vga console and you don't
configure /boot to use a serial port, you lose bigtime.

	David

[1] Output can be redirected to a serial port by some BIOS.

[2] the mbr bootsel code needs that AT key codes, not ascii values, so
can't work on a serial console (unless the bios converts escape sequences
to F1 etc).

-- 
David Laight: david@l8s.co.uk