Subject: Re: serial console changes!
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: port-i386
Date: 08/17/1997 14:00:31
Excerpts from netbsd: 15-Aug-97 Re: serial console changes! "Chris G.
Demetriou"@pa. (1216)

> > The "com" devices correspond to the standard port
> > enumeration, don't try to enforce another order in the
> > configuration file.
> 
> This is silly; there's no reason to hard code that information,

The problem is that one has to get the minor device number
right. If I don't miss something, the hardwired "0" in the alpha
port will make /dev/console output go wrong if the console port
has not unit number 0. (Because of the stars in the config files
this is rather black magic for me.)
To overcome this problem, the cn_tab->cn_dev entry should
be filled in at autoconfiguration attach time by the com driver,
when the minor number is known even for starred devices.
To get the major number the cdevsw[] should be scanned.
(How about a centralized  mi function for this?)

> Why not allow people to specify:
> 
> 	"com@0x2f8"
> 
> or something similar?

This is probably better. Preferrably separated to save the need for
atoi().

> I can think of one reason: compatibility with boot blocks and BIOS
> unit numbers.  However, if the boot blocks are so worried about that,
> _they_ can do a translation from address back to unit number, for
> units that they understand.

That was the other reason. I'll look into this translation later - there
are some BIOS variables to get the address for a given number.
The information has still to be passed to the kernel, but this is
another issue.

best regards
Matthias