Subject: Re: cn_tab and consdev redirection from serial terminal to Graphics Card (69030)
To: None <>
From: Valeriy E. Ushakov <>
List: tech-kern
Date: 11/14/2003 14:11:13

On Fri, Nov 14, 2003 at 16:15:36 +0900, Toru Nishimura wrote:

> >   /*
> >    * XXX: console attachment needs rethinking
> >    */
> >   if (isconsole) {
> It's wrong to call wsdisplay_cnattach() there.  There is a reason
> why ctfb_common_init() exists.   It should encapsulate whole
> hardware initialization and WSCONS display subsystem binding
> (I donno why ctfb_hw_setup(sc) exists separately).  The point
> is this can be called in two ways.
> 1. If the graphics display was console, ABCcnattach() must be called
> -before- configure() device emulation is started.  Later configure()
> calls ctfb_pci_attach().  This time the device must notice console
> binding has been already done.  It's the sole reason why isconsole
> variable exists.
> 2. If the display was -not- console, your ctfb_pci_attach() would be
> called for the very first time initialization.  In this case
> malloc() API is available.

I have really nothing to add here to what Toru said, but I'd like to
note that

1. igsfb(4) was originally written for sparc, that has a very
   different approach to attaching console (hence all the XXX).

2. you should have used -current code, that was rewritten to support
   NetBSD/netwinder and so is structured in a way that Toru outlines

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen