From 26da891455c0ee6afc9120bc5efa57f842d2d373 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 19 Feb 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-02-19 --- power/devhotrod.c | 13 ++++++++++--- power/trap.c | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/power/devhotrod.c b/power/devhotrod.c index 283cef9e7bf460d78f2318997cf48a0c1f831460..3b1228b8fa07016e650103b198d27c9acb5cd527 100644 --- a/power/devhotrod.c +++ b/power/devhotrod.c @@ -91,7 +91,6 @@ hotrodreset(void) hp->wq = (HotQ*)(&hp->addr->hostrp); hp->vec = Vmevec+i; setvmevec(hp->vec, hotrodintr); -setvmevec(0xFF, hotrodintr); } wbflush(); delay(20); @@ -179,6 +178,15 @@ hotrodopen(Chan *c, int omode) hotsend(hp, &((User*)(u->p->upage->pa|KZERO))->khot); delay(100); print("reset\n"); + + /* + * Issue test + */ + mp = &u->khot; + mp->cmd = TEST; + hotsend(hp, &((User*)(u->p->upage->pa|KZERO))->khot); + delay(100); + print("tested\n"); } c->mode = openmode(omode); c->flag |= COPEN; @@ -338,10 +346,9 @@ hotrodintr(int vec) print("hotrod%d interrupt\n", vec - Vmevec); hp = &hotrod[vec - Vmevec]; -hp=&hotrod[0]; if(hp < hotrod || hp > &hotrod[Nhotrod]){ print("bad hotrod vec\n"); return; } - hp->addr->csr3 &= ~INT_VME; + hp->addr->lcsr3 &= ~INT_VME; } diff --git a/power/trap.c b/power/trap.c index 4b9b0f4524bea12bc884d0c12caf51195bc2c786..59ccbb3f5f8935de6962f66ab71705a45246b01a 100644 --- a/power/trap.c +++ b/power/trap.c @@ -179,6 +179,7 @@ intr(Ureg *ur) uchar pend, npend; long v; ulong cause; + static int bogies; cause = ur->cause&(INTR5|INTR4|INTR3|INTR2|INTR1); if(cause & (INTR2|INTR4)){ @@ -273,7 +274,7 @@ intr(Ureg *ur) /* * if nothing else, assume bus error */ - if(!any){ + if(!any && bogies++<100){ print("bogus intr lvl 5 pend %lux on %d\n", npend, m->machno); delay(100); }