Subject: Something wrong with 1.6.2 wscons ?
To: None <port-vax@NetBSD.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-vax
Date: 07/16/2004 18:23:57
Hello,

After failing to incorporate what would end up being my version of LCSPX
driver into 1.6.2 i decided to try out ragge's version instead. I
changed sys/arch/vax/conf/files.vax and sys/arch/vax/vax/conf.c
accordingly (to match 2.0) and i changed lcspx.c the way smg.c
interfaces to wscons - that means different cfattach declaration, one
extra cdev_decl(wsdisplay), removed cdewsw line and different way of
calling makedev() - 4 changes total to make it compile on 1.6.2. 

The result is kernel panic:
...
in pid 0 (swapper) at   
panic: Segv in kernel mode: pc 800a5842 addr 0           
trap+0x226:     cmpl    r1, $12
db> x/i 800a5842
wsdisplay_common_attach+0x80:   pushl   *wsdisplay_console_conf+0xc 
...

It's a printf that causes the panic: in sys/dev/wscons/wsdisplay.c
function wsdisplay_common_attach(), copied by hand

printf(": console (%s, %s emulation)",
        wsdisplay_console_conf.scrdata->name,
        wsdisplay_console_conf.wsemul->name);

If i comment it out (that printf call) it doesn't panic but kernel just
stops before it gets to SCSI driver and doesn't print out anything .. or
do anything else useful, it just sits idle. if lcspx_attach isn't called
(say because i exit early in lcspx_match) kernel gets past SCSI testing
and to login prompt without any problems.

Was there something seriously wrong with wscons stuff in 1.6.2 ? I can't
imagine this being the case, i mean, somebody would have surely noticed
it ... IIRC identical backport (adpoted for initial LCG testing ...
quite some time ago :) worked just fine on 1.6/1.6.1.

Seeing how this is the second driver in a row that panics (just like the
one based on HW accel LCG that i started working on) in the same place i
can't think of any other explanation - either i missed something
important in other files (something that has to be changed outside just
files.vax and conf.c) or there is something wrong with wscons.

I can test stuff that i'd like to implement without wscons working but
this is really irritating. 1.6.2 kernel runs just fine if lcspx_attach
isn't called for whatever reason.

Any suggestions (other than moving to -current or using 1.6/1.6.1 if
they work fine) ? I want to know what's wrong with *this* kernel.

Blaz Antonic
-- 
Hi! I'm a signature virus!
Copy me into your signature to help me spread!