Subject: Err, what console am I using anyway? :-)
To: NetBSD/Sparc64 Mailing-list <port-sparc64@netbsd.org>
From: ali \(Anders Lindgren\) <dat94ali@ludat.lth.se>
List: port-sparc64
Date: 12/12/2002 19:40:27
I am about to upgrade my Ultra1 (the 143MHz SBus model) from
1.5ZC to 1.6 (err, the rumours about X not working in 1.6 isn't
true for these old cgsix machines right?) and consequently,
I started looking through my existing config. Now I am confused. :-)

I was certain my U1 was using some kind of framebuffer raster console,
but in the config-file, "rasterconsole" is commented as broken on
UltraSPARC and disabled. I was pretty sure pcons wasn't being used,
so I checked dmesg which as expected has a line saying
"pcons at mainbus0 not configured". Increasingly confused, I resorted to
start digging in the sources. In dev/kd.c, I found the console output
"console is keyboard/display" that shows up in dmesg, and it says it's
using prom_printf (but not pcons?) for console output. As you can see I
am not completely familiar with the layering of devices in the tty layers.
From consinit.c etc. it appears as if pcons is used early during boot and
then discarded for a prom_printf+zstty2 combo, but I really have no
idea. I haven't found anything that looks like it's replacing pcons, and
pcons is never configured according to dmesg.

So what console device am I really using? :-) Is it possible to use
the prom for console IO after the kernel has assumed control over
interrupt handling and MMU mappings? It looks like prom_printf is being
used for the console output -- does reading from the prom works too
or does it need to read the zstty2 lines directly? Just trying to
understand how it works.. :-)


-- 
/ali
:wq