~kris/9p

9hist

26da891455c0ee6afc9120bc5efa57f842d2d373 — David du Colombier 35 years ago 48a0855
Plan 9 from Bell Labs 1991-02-19
2 files changed, 12 insertions(+), 4 deletions(-)

M power/devhotrod.c
M power/trap.c
M power/devhotrod.c => power/devhotrod.c +10 -3
@@ 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;
}

M power/trap.c => power/trap.c +2 -1
@@ 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);
		}