Subject: Re: console device selection
To: Martin Husemann <>
From: Bill Studenmund <>
List: tech-kern
Date: 09/06/2006 08:47:15
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=
> > the thing that registers a potential console, and when its init is call=
> > it can make specific calls into known MI frame buffer code. Or known MD=
> > frame buffer code. :-)
> 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=
a name, which is probably good, and the current implementation has a=20
dynamic priority/preference. The latter is how switching to serial console=
works on a number of platforms; the video returns a fixed preference, and=
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=
knows that for a console, it has an init routine and a probe routine. Thus=

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=
and video routine that. Well, frame buffer routines. Thus "known."

Take care,


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

Version: GnuPG v1.4.3 (NetBSD)