Subject: wsdisplay, early consoles etc.
To: None <tech-kern@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 10/26/2006 13:36:47
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I'd like to make the following addition to wsdisplay.c - a version of 
wsdisplay_cnattach() that can be overridden exactly once. The reason to 
do that is this - macppc has been hardcoded to use ofb as console for 
ages but we do have a few accelerated framebuffer drivers now ( like 
machfb, voodoofb, radeonfb, chipsfb ) which all work on macppc. The 
problem is that macppc relies on having a rasops-based console more or 
less from kernel startup.
In my opinion it would be a good idea to have a generic framebuffer 
console attach as early as possible and later allow some 
hardware-specific driver to override it. This would nicely solve 
several headaches - we wouldn't have to decide which driver to attach 
on startup before autoconf. Specific drivers wouldn't have to implement 
xxx_cnattach() methods. And drivers would be plug-compatible between at 
least sparc64 and macppc ( sparc64 uses OF output until a driver takes 
over ).
The same could be useful on i386 and the like as well - cnattach vga 
for early startup, then - maybe - let a framebuffer driver take over 
for an accelerated high-resolution console.
I have these changes in my local source tree for ages now, they seem to 
be unproblematic.

Besides that - we should come up with a generic interface to let a 
driver find out if it's supposed to become the system console or not. 
On OpenFirmware machines that's easy - just check /choosen/stdout - but 
it's ugly to have OF-dependencies in drivers that reside in 
sys/dev/pci. Maybe we should just have the MD autoconf code attach 
properties for:
- - console
- - display mode
- - font
- - whatever I can't think of right now

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRUDyL8pnzkX8Yg2nAQJeYQf/YgENeiRFVAgEdcdGi7iwHN2Met/60IKj
Zvny5u1CPfRs4/TarEuJ1Y4YyOHAR/rWJn//lzonrO//G0543orVX5XOTy5zbZIl
h8RfmlEICVK8s+4/RXNzDISgvtsgW7SzSApTYVTN/UvAKSRPBt0fk5r3IjlYiDE6
Zm9Skz1gvOMA3bzVDMDfjy8VfPEbh8nVILrHeImjtO2Kn84yvTo5cOn0FQqgknHH
2PhWJet/g0rvuXxHL0WgUn+Dsvb5rsAECl/rhJyFDBZZEp4rHH5/SBLnbPtjvvs6
SjpZXIvcUGsRVYNj908g1jpfhvTCfoLfqzs1IZL/yXwI2b0KpUOuNQ==
=XEYM
-----END PGP SIGNATURE-----