Subject: Re: DS3100 ethernet spl problem fixed
To: None <port-pmax@NetBSD.ORG>
From: Arne H. Juul <arnej@pvv.unit.no>
List: port-pmax
Date: 01/03/1996 00:49:31
Thanks to everyone (especially Jason Thorpe) for information
and explanations.  The current splmalloc() discussion should
probably be moved to tech-kern since it's no longer very pmax
specific, so I'll send my thoughts on the generic issue there.

However, with the current agreement of what splimp() is actually
supposed to do at the moment in NetBSD, this should be the
"really correct" fix on the DS3100.  Ted/Jonathan: would one of you
check this into the tree?

  -  Arne H. J.

--- machdep.c.orig	Wed Jan  3 00:26:33 1996
+++ machdep.c	Wed Jan  3 00:29:14 1996
@@ -178,7 +178,8 @@
 #ifdef DS5000_240
 int	kn03_intr();
 #endif
-extern	int Mach_spl0(), Mach_spl1(), Mach_spl2(), Mach_spl3(), splhigh();
+extern	int Mach_spl0(), Mach_spl012(), Mach_spl1(), Mach_spl2(),
+            Mach_spl3(), splhigh();
 int	(*Mach_splbio)() = splhigh;
 int	(*Mach_splnet)() = splhigh;
 int	(*Mach_spltty)() = splhigh;
@@ -402,7 +403,7 @@
 		Mach_splbio = Mach_spl0;
 		Mach_splnet = Mach_spl1;
 		Mach_spltty = Mach_spl2;
-		Mach_splimp = Mach_spl2;
+		Mach_splimp = Mach_spl012;
 		Mach_splclock = Mach_spl3;
 		Mach_splstatclock = Mach_spl3;
 		Mach_clock_addr = (volatile struct chiptime *)
--- locore.S.orig	Wed Jan  3 00:26:38 1996
+++ locore.S	Wed Jan  3 00:26:41 1996
@@ -1951,6 +1951,15 @@
 	and	v0, v0, (MACH_INT_MASK | MACH_SR_INT_ENA_CUR)
 END(splsoftnet)
 
+LEAF(Mach_spl012)
+	mfc0	v0, MACH_COP_0_STATUS_REG	# read status register
+	li	t0, ~(MACH_INT_MASK_0|MACH_INT_MASK_1|MACH_INT_MASK_2|MACH_SOFT_INT_MASK_1|MACH_SOFT_INT_MASK_0)
+	and	t0, t0, v0
+	mtc0	t0, MACH_COP_0_STATUS_REG	# save it
+	j	ra
+	and	v0, v0, (MACH_INT_MASK | MACH_SR_INT_ENA_CUR)
+END(Mach_spl012)
+
 LEAF(Mach_spl0)
 	mfc0	v0, MACH_COP_0_STATUS_REG	# read status register
 	li	t0, ~(MACH_INT_MASK_0|MACH_SOFT_INT_MASK_1|MACH_SOFT_INT_MASK_0)