Subject: Re: Boot crash 3100-current
To: William O Ferry <WOFerry+@CMU.EDU>
From: Michael L. Hitch <mhitch@lightning.oscs.montana.edu>
List: port-pmax
Date: 10/04/1998 11:46:52
On Oct  1, 11:50pm, William O Ferry wrote:
> Since it sounds like libc is fixed for the pmax, I re-suped last night
> and built another kernel on my 3100.  Unfortunately I can't tell if it
> helped the swap problem 'cuz the new kernel won't even get that far. 
> Here's what I get:
...
> Beginning old-style SCSI device autoconfiguration
> 
> [at this point the system locks with the hard drive light on]

  This was caused by removing the direct calls to the interrupt handlers
for the DC, SII, and LANCE drivers on the 3100.  They were replaced by
calling the handlers indirect through the "tc_slot" table supposedly
filled in when each of the devices was attached.  Unfortunately, the
table of "slots" for the "ibus" on the 3100 uses ia_cookie for the 
device interrupt "priority" instead of the "slot number" like the
TuboChannel devices.  The ibus interrupt handler was using the device
"slot" as the index, so was calling the wrong interrupt handler.  The
ibus attach table puts the "slot" number into ia_slot, which is what the
following fix does.  I'm not certin if the correct fix is to use 'ia_slot'
instead of 'ia_cookie', or to modify the attach table so that 'ia_cookie'
contains the slot number for the interrupt handler.

Michael

diff -u /c/src/sys/arch/pmax/dev/dc_ds.c sys/arch/pmax/dev/dc_ds.c
--- /c/src/sys/arch/pmax/dev/dc_ds.c	Sun Apr 19 05:11:46 1998
+++ sys/arch/pmax/dev/dc_ds.c	Sat Oct  3 19:42:05 1998
@@ -102,6 +102,6 @@
 			0x0,
 			0, DCCOMM_PORT);
 
-	ibus_intr_establish((void*)iba->ia_cookie, IPL_TTY, dcintr, sc);
+	ibus_intr_establish((void*)iba->ia_slot, IPL_TTY, dcintr, sc);
 	printf("\n");
 }
diff -u /c/src/sys/arch/pmax/dev/sii_ds.c sys/arch/pmax/dev/sii_ds.c
--- /c/src/sys/arch/pmax/dev/sii_ds.c	Sun Apr 19 05:11:46 1998
+++ sys/arch/pmax/dev/sii_ds.c	Sat Oct  3 19:42:05 1998
@@ -114,7 +114,7 @@
 	siiattach(sc);
 
 	/* tie pseudo-slot to device */
-	ibus_intr_establish((void*)ia->ia_cookie, IPL_BIO, siiintr, sc);
+	ibus_intr_establish((void*)ia->ia_slot, IPL_BIO, siiintr, sc);
 	printf("\n");
 }
 
diff -u /c/src/sys/dev/tc/if_le_ibus.c sys/dev/tc/if_le_ibus.c
--- /c/src/sys/dev/tc/if_le_ibus.c	Wed Jul 22 05:17:57 1998
+++ sys/dev/tc/if_le_ibus.c	Sat Oct  3 19:41:40 1998
@@ -120,7 +120,7 @@
 	dec_le_common_attach(&lesc->sc_am7990, cp);
 
 	/* XXX more thought about ia->ia_cookie */
-	ibus_intr_establish((void*)ia->ia_cookie, TC_IPL_NET,
+	ibus_intr_establish((void*)ia->ia_slot, TC_IPL_NET,
 			  am7990_intr, sc);
 }
 

-- 
Michael L. Hitch			mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA