Subject: Re: Dumb question - switching consoles
To: None <port-sparc@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 09/04/2004 00:37:27
["R. Tyler Ballance" <tyler@ekkobsd.org>, top-posting]
> I've asked this in IRC a couple times, and the best answer I could
> get was that the console driver on architechures that use something
> other than PS/2 keyboards.

"A verb, Senator!  We need a verb!"  (Your sentence ends with "and the
best answer I could get was that <noun phrase>.", making about as much
grammatical sense as "...and the best answer I could get was that my
overripe apple.".)

[Sean Hafeez <sahafeez@zaphodb.org>]
>> Hows do I switch consoles on a SS20 running current?  Whats the key
>> combo?  I could not google it..

If by "switch consoles" you mean flipping between emulated terminals on
the console - the thing NetBSD/i386 by default uses ctl-alt-F# for - it
simply doesn't exist on NetBSD/sparc.  Indeed, if I didn't have some
i386 experience, I wouldn't even know what you're talking about; this
is not something the SPARC culture in general has.  It could in
principle be done, but it would be significantly more expensive to
implement (as compared to the i386 version).  The i386 implementation
depends on the hardware having "text mode" and "graphics mode", and
always being in text mode when using one of the emulated terminals -
programs that use graphics mode are required to assist the process for
it to work.  As the only common such program is the X server, this is
tolerable.  But NetBSD/sparc machines' framebuffers simply don't have
this text/graphics mode distinction; the hardware can be though of as
always being in graphics mode, with characters drawn as small graphics.
It would mean either keeping a separate image of the characters that
should be on the screen and saving/restoring that, or saving/restoring
the whole graphics framebuffer.  The former would work but would
violate least surprise, in that users would expect to get back what
they had, and that's not what they'd get if they'd run something that
drew non-text.  The latter would work but would make emulated terminals
much more RAM-expensive. Either one requires hackery in the drivers to
support programs talking to non-current virtual displays.

If by "switch consoles" you mean switching between framebuffer console
and serial console, this cannot be done at run time; you need to, at
the very least, reboot.  (In principle it could be done, but as far as
I know the console interface isn't designed in a way that makes it
easy.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B