Subject: Possible cause/fix of pmax (3100, 2100) boot problems
To: None <mellon@vix.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 04/29/1995 02:30:23
After grovelling through the boot code, I *think* I understand
the bug that  can cause 3100s booted on a live ethernet to crash.
cpu_startup() is calling initcpu(), which does an spl0().
On real pmaxes (2100s, 3100s), this really does enable all interrupts.
(other models of Decstation have turbochannel slots to worry about.)
Moreover this is done before configure() is called.


So an interrupt could conceivably occur and be routed to leintr()
before leprobe() ever gets called.  The following fix may work around
this problem. If someone with still-working kernel source finds
this makes a positive difference on a [23]100, please let me know.

I think a better fix is to not enable interrupts until configure()
is done, but I'm hesitant to ask anyone to try that without testing
it myself, which I can't do right now.

*** if_le.c	Thu Apr 20 03:17:36 1995
--- if_le.c.TMP	Sat Apr 29 02:26:32 1995
***************
*** 539,546 ****
  	le = &le_softc[unit];
  	ler1 = le->sc_r1;
  	stat = ler1->ler1_rdp;
! 	if (!(stat & LE_INTR)) {
! 		printf("le%d: spurrious interrupt\n", unit);
  		return;
  	}
  	if (stat & LE_SERR) {
--- 539,546 ----
  	le = &le_softc[unit];
  	ler1 = le->sc_r1;
  	stat = ler1->ler1_rdp;
! 	if (!stat || !(stat & LE_INTR)) {
! 		printf("le%d: spurious interrupt\n", unit);
  		return;
  	}
  	if (stat & LE_SERR) {