Subject: Re: console device selection
To: Jared D. McNeill <jmcneill@invisible.ca>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/05/2006 16:36:18
--ni93GHxFvA+th69W
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Sep 02, 2006 at 08:57:28AM -0300, Jared D. McNeill wrote:
> On 2-Sep-06, at 3:32 AM, Garrett D'Amore wrote:
> >Given this, how do folks feel about having wscons have this framework
> >for selecting console devices?  It would mean tweaking a bunch of
> >console devices.  But it would solve/cleanup the problem.  As we are
> >getting more and more devices that can be console devices, it seems =20
> >like
> >we need a unified way to select amongst them, especially as many of
> >these devices are potentially on expansion busses.
>=20
> Yes, please. This has been a pet peeve of mine for a long time.
>=20
> One comment about struct cons_device:
>=20
>     int (*initialize)(void);
>=20
> This will need to take parameters. MD code may need to pass bus tags/=20
> handles to an MI driver (as is the case for vga), or in a more =20
> extreme case (igsfb_pci) it also needs a pci_chipset_tag_t, and the =20
> PCI bus/device/function numbers of the device. Not sure what other =20
> devices might need..

I don't think that's at this level of abstraction. The md code would be=20
the thing that registers a potential console, and when its init is called,=
=20
it can make specific calls into known MI frame buffer code. Or known MD=20
frame buffer code. :-)

Setting up the console (at this level) usually is tricky. Serial ports=20
usually had two sets of interfaces, one a normal character device and the=
=20
other the console interface. I exect video consoles have the same.

Take care,

Bill

--ni93GHxFvA+th69W
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFE/gnyWz+3JHUci9cRArrNAJ4qnac2HmsINqgzED+FI02tZvF+8gCfeuuS
rg7Y9lsqE4iyO2yqse/j9L4=
=UcXA
-----END PGP SIGNATURE-----

--ni93GHxFvA+th69W--