Subject: dcm+kernel problems
To: None <port-hp300@netbsd.org>
From: Jarkko Teppo <jarkko.teppo@nfp.fi>
List: port-hp300
Date: 02/24/1999 10:46:56
Hello all!

I have a problem with my 380 and a 98xxx (forgot the number) 4-port serial
mux.
Everything works well on the precompiled generic kernel, but I'm getting
flooded with messages like:

dcm0 port 0: dcmparam: cflag 4b00 mode 30 speed 9600 uperch 1041

When I compile the GENERIC kernel with:
/usr/sbin/config GENERIC
cd ../compile/GENERIC
make depend && make

And Voila! After booting I no longer get those mysterious debug-messages. Oh
yes, the kernel crashes also.

Looking at the code: (in dev/dcm.c int dcmparam(tp,t))
#ifdef DEBUG
 if (dcmdebug & DDB_PARAM)
  printf("%s port %d: dcmparam: cflag %x mode %x speed %d uperch %d\n",
         sc->sc_dev.dv_xname, port, cflag, mode, tp->t_ospeed,
         DCM_USPERCH(tp->t_ospeed));
#endif

Ok, I need to define DEBUG, look back at the GENERIC-file and it's there.
<newbie mode on>
Is there some sort of a trick in here or am I just lost in the woods ?
<no credibility to turn newbie mode off>

The kernels that I've compiled stay up until the dcm-card gets an interrupt
as in:
#cat /etc/motd >/dev/tty00
trap: bad kernel read access at 0xa6
trap type 8, code = 0x525, v = 0xa6
kernel program counter = 0xb9b56
kernel: MMU fault trap
pid = 5, pc = 00B9B56,  ps = 2504, sfc = 1, dfc =1
registers:
<snip>
db> trace
_Debugger(2504, 628d08, cc8a6, cc48b,1) + 6
_panic(cc48b, 1,1,0,3) + 40
_trap(8,525,a6) + 236
faultstkadj(0,0,0,5,7) + 0
_dcmintr(2001e00,0,0,4,2029904) + 1d6
_intr_dispatch(74) + 7e
_intrhand(?)
_lockmgr(2029904,4,0,2024800) + a
_vm_map_lookup(628f2c,40000,3,628f20,628f1c,628f18,628f14,628f10,628f0c) +
176

_vm_fault(2029900,40000,3,0) + 38
_trap(9,481,40030) + 56e
faultstkadj() + 0

I *think* I understand some of that up to the _intrhand() point, but what is
faultstkadj(...) ? Does the problem occur there (before the trap) or in
_dcmintr(...) ?

Any help appreciated!

ps. I also built a gdb-kernel but it's around 9megs and after half an hour
of loading I sort of gave up.. sigh

--
Jarkko Teppo
jarkko.teppo(at)nfp.fi