Subject: Re: console device selection
To: Martin Husemann <martin@duskware.de>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/06/2006 08:47:15
--ZGiS0Q5IWpPtfppv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 06, 2006 at 11:19:32AM +0200, Martin Husemann wrote:
> On Tue, Sep 05, 2006 at 04:36:18PM -0700, Bill Studenmund wrote:
> > 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 call=
ed,=20
> > it can make specific calls into known MI frame buffer code. Or known MD=
=20
> > frame buffer code. :-)
>=20
> I am not sure for what value of "known" this should work - could you
> elaborate?

We already have a console selection framework that does most of what=20
Garrett mentioned. The differences I saw were that Garrett suggests having=
=20
a name, which is probably good, and the current implementation has a=20
dynamic priority/preference. The latter is how switching to serial console=
=20
works on a number of platforms; the video returns a fixed preference, and=
=20
the serial driver's preference changes between something below the video=20
(when video console's selected) and something above the video (serial=20
console selected). All we need to do is add a probe routine and we're set.

I assumed the end console selection code is MD as only MD code can know=20
what console we should boot with. We are of course discussing the step=20
where MD code tells MI code what to do with the console.

Getting back to your question, Jared suggested adding parameters to the=20
init routines in console selection. I believe that's wrong. The console=20
selection code doesn't know what kind of console it's looking at, it just=
=20
knows that for a console, it has an init routine and a probe routine. Thus=
=20
"unknown."

Each probe routine and init routine however can call whatever code it=20
wants. I think it'd make sense for us to have pci framebuffer helper=20
routines, and for the video console to pass information in to them. The=20
video console knows it is a video console, thus it can video routine this=
=20
and video routine that. Well, frame buffer routines. Thus "known."

Take care,

Bill

--ZGiS0Q5IWpPtfppv
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFE/u2DWz+3JHUci9cRAnRAAKCSHfNKrVwYBMD8dNDMd2Zy9U1G1gCeOkmL
C3wv0og3/SefBHaOvrMDmU0=
=mMgB
-----END PGP SIGNATURE-----

--ZGiS0Q5IWpPtfppv--