~kris/9p

9hist

fecf34ac5afa31f429fed0e944265464cdddbe1b — David du Colombier 32 years ago ddb1c98
Plan 9 from Bell Labs 1994-02-01
3 files changed, 14 insertions(+), 3 deletions(-)

M carrera/kbd.c
M pc/ether8390.c
M pc/l.s
M carrera/kbd.c => carrera/kbd.c +4 -2
@@ 448,8 448,10 @@ kbdinit(void)
	KBDCTL = Kmseena;
	empty();

	mousecmd(0xEA);
	mousecmd(0xF4);
	mousecmd(0xEA);	/* streaming */
	mousecmd(0xE8);	/* set resolution */
	mousecmd(3);
	mousecmd(0xF4);	/* enabled */

	return 1;
}

M pc/ether8390.c => pc/ether8390.c +8 -1
@@ 285,7 285,9 @@ dp8390write(Dp8390 *dp8390, ulong to, void *from, ulong len)
	ulong port = dp8390->dp8390;
	ulong crda;
	uchar cr;
	int s, tries;

	s = splhi();
	/*
	 * Write some data to offset 'to' in the card's memory
	 * using the DP8390 remote DMA facility, reading it at


@@ 336,14 338,19 @@ dp8390write(Dp8390 *dp8390, ulong to, void *from, ulong len)
		outss(dp8390->data, from, len/2);
	else
		outsb(dp8390->data, from, len);
	splx(s);

	/*
	 * Wait for the remote DMA to finish. We'll need
	 * a timeout here if this ever gets called before
	 * we know there really is a chip there.
	 */
	tries = 0;
	while((slowinb(port+Isr) & Rdc) == 0)
			;
		if(tries++ >= 10000000){
			print("dp8390write whoops\n");
			break;
		}

	slowoutb(port+Isr, Rdc);
	slowoutb(port+Cr, cr);

M pc/l.s => pc/l.s +2 -0
@@ 766,6 766,7 @@ _dp8390outb0:
TEXT slowinb(SB), $0
	MOVL	$0x84, DX
	INB
	INB

	MOVL	p+0(FP),DX
	XORL	AX,AX


@@ 775,6 776,7 @@ TEXT slowinb(SB), $0
TEXT slowoutb(SB),$0
	MOVL	$0x84, DX
	INB
	INB

	MOVL	p+0(FP),DX
	MOVL	b+4(FP),AX