Port-pmax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pmax problems



Hi,

Someone mentioned the pmax problems and I took a look using gxemul.  I used
the gxemul -t feature and addr2line -f to trawl through the call trace...
In the middle of it was

[ warning: LOW reference: vaddr=0x00000000, exception TLBL, pc=0x8012bf1c (no symbol) ]

which I tracked down to lk201_init working on callouts before the subsystem was
initialised via callout_startup.


consinit -> dec_3max_cons_init -> dzkbd_cnattach -> lk201_init

The use of *attach routines is somewhat icky.

The "LOW reference" and subsequent boot problems seems to be fixed with the
attached patch - I've no idea what the intention of the callout was.  The
change seems to come from here:


http://mail-index.netbsd.org/port-pmax/2014/12/21/msg000170.html

Nick

Index: sys/dev/dec/lk201_ws.c
===================================================================
RCS file: /cvsroot/src/sys/dev/dec/lk201_ws.c,v
retrieving revision 1.9
diff -u -p -r1.9 lk201_ws.c
--- sys/dev/dec/lk201_ws.c	2 Jan 2015 21:32:26 -0000	1.9
+++ sys/dev/dec/lk201_ws.c	13 Jun 2016 07:57:24 -0000
@@ -43,8 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v
 
 void lk201_identify(void *);
 
-static callout_t lkkbd_id;
-
 static const char *lkkbd_descr[] = {
 	"no keyboard",
 	"LK-201 keyboard",
@@ -82,20 +80,6 @@ lk201_init(struct lk201_state *lks)
 	send(lks, LK_LED_ALL);
 	lks->leds_state = 0;
 
-	callout_init(&lkkbd_id, 0);
-	callout_setfunc(&lkkbd_id, lk201_identify, lks);
-	callout_schedule(&lkkbd_id, 0);
-
-	return (0);
-}
-
-void
-lk201_identify(void *v)
-{
-	struct lk201_state *lks = v;
-	int i;
-
-	callout_destroy(&lkkbd_id);
 	/*
 	 * Swallow all the keyboard acknowledges from lk201_init().
 	 * There should be 14 of them - one per LK_CMD_MODE command.
@@ -133,6 +117,8 @@ lk201_identify(void *v)
 	lks->waitack = 0;
 
 	printf("lkkbd0: %s\n", lkkbd_descr[lks->kbdtype]);
+
+	return 0;
 }
 
 int


Home | Main Index | Thread Index | Old Index