~kris/9p

9hist

9ff60ccc127f83cc6708661cb3edc5c111dc089c — David du Colombier 32 years ago da10b6d
Plan 9 from Bell Labs 1994-07-15
7 files changed, 21 insertions(+), 28 deletions(-)

M boot/userpasswd.c
M pc/clock.c
M pc/devvga.c
M pc/ether509.c
M pc/ether8390.c
M pc/fns.h
M pc/trap.c
M boot/userpasswd.c => boot/userpasswd.c +0 -8
@@ 34,14 34,6 @@ userpasswd(int islocal, Method *mp)
		msg = checkkey(mp, username, hostkey);
		if(msg == 0)
			break;
		/* try the old key algorithm till everyone has switched */
		opasstokey(hostkey, password);
		msg = checkkey(mp, username, hostkey);
		if(msg == 0){
			print("You have an old style key.  Once you are up, please run 'aux/passwd'\n");
			print("and retype your key to convert.\n");
			break;
		}
		fprint(2, "?%s\n", msg);
		outin("user", username, sizeof(username));
	}

M pc/clock.c => pc/clock.c +1 -1
@@ 54,9 54,9 @@ clock(Ureg *ur, void *arg)

	m->ticks++;

	uartclock();
	checkalarms();
	hardclock();
	uartclock();

	/*
	 *  process time accounting

M pc/devvga.c => pc/devvga.c +4 -5
@@ 24,7 24,6 @@ Bitmap	gscreen;

/* vga screen */
static	Lock	screenlock;
static	Lock	loadlock;
static	ulong	colormap[256][3];
Lock pallettelock;



@@ 758,7 757,7 @@ screenload(Rectangle r, uchar *data, int tl, int l, int dolock)

	if(dolock && hwgc == 0)
		cursorlock(r);
	lock(&loadlock);
	lock(&pallettelock);

	q = byteaddr(&gscreen, r.min);
	mx = 7>>gscreen.ldepth;


@@ 838,7 837,7 @@ screenload(Rectangle r, uchar *data, int tl, int l, int dolock)
			data += l;
		}

	unlock(&loadlock);
	unlock(&pallettelock);
	if(dolock && hwgc == 0)
		cursorunlock();
}


@@ 914,7 913,7 @@ screenunload(Rectangle r, uchar *data, int tl, int l, int dolock)

	if(dolock && hwgc == 0)
		cursorlock(r);
	lock(&loadlock);
	lock(&pallettelock);

	q = byteaddr(&gscreen, r.min);
	mx = 7>>gscreen.ldepth;


@@ 994,7 993,7 @@ screenunload(Rectangle r, uchar *data, int tl, int l, int dolock)
			data += l;
		}

	unlock(&loadlock);
	unlock(&pallettelock);
	if(dolock && hwgc == 0)
		cursorunlock();
}

M pc/ether509.c => pc/ether509.c +1 -1
@@ 185,7 185,7 @@ receive(Ether *ether)
			/*
			 * Copy the packet to whoever wants it.
			 */
			etherrloop(ether, &ether->rpkt, len);
			etherrloop(ether, &ether->rpkt, len, 1);
		}

		/*

M pc/ether8390.c => pc/ether8390.c +1 -1
@@ 455,7 455,7 @@ receive(Ether *ether)
			/*
			 * Copy the packet to whoever wants it.
			 */
			etherrloop(ether, &ether->rpkt, len);
			etherrloop(ether, &ether->rpkt, len, 1);
		}

		/*

M pc/fns.h => pc/fns.h +1 -0
@@ 85,6 85,7 @@ void	touser(void*);
void	trapinit(void);
int	tas(void*);
void	uartclock(void);
void	uartpoll(void);
void	vgainit(void);
int	x86(void);


M pc/trap.c => pc/trap.c +13 -12
@@ 222,11 222,10 @@ char *excname[] =
[13]	"general protection violation",
};


/*
 *  All traps come here.  It is slower to have all traps call trap() rather than
 *  directly vectoring the handler.  However, this avoids a lot of code duplication
 *  and possible bugs.
 *  and possible bugs.  trap is called splhi().
 */
void
trap(Ureg *ur)


@@ 297,9 296,11 @@ trap(Ureg *ur)
		h = h->next;
	} while(h);

	/* check user since syscall does its own notifying */
	/*
	 *  check user since syscall does its own notifying
	 */
	splhi();
	if(user && (up->procctl || up->nnote))
	if(v != Syscallvec && user && (up->procctl || up->nnote))
		notify(ur);
}



@@ 374,7 375,7 @@ dumpstack(void)
#include "../port/systab.h"

/*
 *  syscall is called spllo()
 *  syscall is called splhi()
 */
void
syscall(Ureg *ur, void *arg)


@@ 385,6 386,7 @@ syscall(Ureg *ur, void *arg)

	USED(arg);


	up->insyscall = 1;
	up->pc = ur->pc;
	up->dbgreg = ur;


@@ 396,15 398,17 @@ syscall(Ureg *ur, void *arg)
	if(up->scallnr == RFORK && up->fpstate == FPactive){
		/*
		 *  so that the child starts out with the
		 *  same registers as the parent
		 *  same registers as the parent.
		 *  this must be atomic relative to this CPU, hence
		 *  the spl's.
		 */
		splhi();
		if(up->fpstate == FPactive){
			fpsave(&up->fpsave);
			up->fpstate = FPinactive;
		}
		spllo();
	}
	spllo();

	sp = ur->usp;
	up->nerrlab = 0;
	ret = -1;


@@ 442,13 446,10 @@ syscall(Ureg *ur, void *arg)
	 */
	ur->ax = ret;

	splhi();
	if(up->scallnr == NOTED)
		noted(ur, *(ulong*)(sp+BY2WD));

	if(up->nerrlab != 0)
		panic("nerrlab = %d syscall = %d\n", up->nerrlab, up->scallnr);

	splhi(); /* avoid interrupts during the iret */
	if(up->scallnr!=RFORK && (up->procctl || up->nnote))
		notify(ur);
}