~kris/9p

9hist

cc5860356e27da189a21c545cacb4027c5bb1dfe — David du Colombier 33 years ago 3500ea9
Plan 9 from Bell Labs 1993-02-16
5 files changed, 13 insertions(+), 15 deletions(-)

M pc/ether2000.c
M pc/trap.c
M port/devcons.c
M port/proc.c
M ss/segment.h
M pc/ether2000.c => pc/ether2000.c +3 -1
@@ 40,7 40,9 @@ reset(Ctlr *ctlr)
		 * Reset the board. This is done by doing a read
		 * followed by a write to the Reset address.
		 */
		outb(ctlr->card.io+Reset, inb(ctlr->card.io+Reset));
		buf[0] = inb(ctlr->card.io+Reset);
		delay(2);
		outb(ctlr->card.io+Reset, buf[0]);

		/*
		 * Init the (possible) chip, then use the (possible)

M pc/trap.c => pc/trap.c +1 -1
@@ 215,9 215,9 @@ trap(Ureg *ur)
	 */
	c = v&~0x7;
	if(c==Int0vec || c==Int1vec){
		outb(Int0ctl, EOI);
		if(c == Int1vec)
			outb(Int1ctl, EOI);
		outb(Int0ctl, EOI);
		if(v != Uart0vec)
			uartintr0(ur);
	}

M port/devcons.c => port/devcons.c +7 -2
@@ 184,8 184,13 @@ pprint(char *fmt, ...)
		return 0;

	c = u->p->fgrp->fd[2];
	if(c==0 || (c->mode!=OWRITE && c->mode!=ORDWR))
	if(c == 0 || (c->mode!=OWRITE && c->mode!=ORDWR))
		return 0;

	/* Can't afford to take an error in notify */
	if(waserror())
		return 0;

	n = sprint(buf, "%s %d: ", u->p->text, u->p->pid);
	n = doprint(buf+n, buf+sizeof(buf), fmt, (&fmt+1)) - buf;



@@ 194,7 199,7 @@ pprint(char *fmt, ...)
	lock(c);
	c->offset += n;
	unlock(c);

	poperror();
	return n;
}


M port/proc.c => port/proc.c +1 -1
@@ 454,11 454,11 @@ postnote(Proc *p, int dolock, char *n, int flag)
		for(d = *l; d; d = d->rendhash) {
			if(d == p) {
				*l = p->rendhash;
				ready(p);
				break;
			}
			l = &d->rendhash;
		}
		ready(p);
	}
	unlock(p->pgrp);
	return ret;

M ss/segment.h => ss/segment.h +1 -10
@@ 2,16 2,7 @@
 * Attach segment types
 */

typedef struct Physseg Physseg;
struct Physseg
{
	ulong	attr;			/* Segment attributes */
	char	*name;			/* Attach name */
	ulong	pa;			/* Physical address */
	ulong	size;			/* Maximum segment size in pages */
	Page	*(*pgalloc)(Segment*, ulong);	/* Allocation if we need it */
	void	(*pgfree)(Page*);
}physseg[] = {
Physseg physseg[] = {
	{ SG_SHARED,	"shared",	0,	SEGMAXSIZE,	0, 	0 },
	{ SG_PHYSICAL,	"kmem",		KZERO,	SEGMAXSIZE,	0,	0 },
	{ SG_BSS,	"memory",	0,	SEGMAXSIZE,	0,	0 },