Subject: Re: MI console detection
To: Martin Husemann <martin@duskware.de>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 10/31/2002 13:14:30
martin@duskware.de said:
> See for example the recently added sys/dev/pci/machfb driver. It has
> to decide at attach time if it is going to be the output part of the
> console.
> [...]
In i386 land and alphas, the md consinit code calls some driver
specific XXXcnattach() functions for the devices it has decided
to put the console on.
The drivers keep some information (in static variables - this
is OK because one can savely assume that there is only one
console) about the fact and base addresses if needed.
So the driver does know at probe/attach time whether the console
device is referred to, can skip probes, reuse existing mappings
etc.
In the pcdisplay/pcivga/isavga text mode case it is a bit complex
(at least on i386, alpha is better) because the early cnattach call
doesn't know what type of hardware it is, a PCI VGA card van be attached
as isavga or dumb pcdisplay etc. -- that's what the vga_is_console()
call deals with.
So I'd say that no additional framework is needed.
best regards
Matthias