~kris/9p

9hist

e1715c29130a0a1c553acaa8cd2f628b095e02d5 — David du Colombier 27 years ago b59191a
Plan 9 from Bell Labs 1999-05-28
3 files changed, 27 insertions(+), 3 deletions(-)

M pc/l.s
M pc/trap.c
M port/sysfile.c
M pc/l.s => pc/l.s +24 -0
@@ 511,13 511,37 @@ TEXT setlabel(SB), $0
 * The size of each entry in the vector table (6 bytes) is known in trapinit().
 */
TEXT _strayintr(SB), $0

	/* time stamp for interrupt */
	PUSHL	AX				/* save AX */
	PUSHL	DX
	PUSHL	CX
	MOVL	$0x10, CX
	RDMSR
	MOVL	AX, intrts(SB)
	MOVL	DX, intrts+4(SB)
	POPL	CX
	POPL	DX

	MOVL	4(SP), AX			/* return PC from vectortable(SB) */
	MOVBLZX	(AX), AX			/* trap type */
	XCHGL	AX, (SP)			/* restore AX and put the type on the stack */
	JMP	intrcommon

TEXT _strayintrx(SB), $0

	/* time stamp for interrupt */
	PUSHL	AX
	PUSHL	DX
	PUSHL	CX
	MOVL	$0x10, CX
	RDMSR
	MOVL	AX, intrts(SB)
	MOVL	DX, intrts+4(SB)
	POPL	CX
	POPL	DX
	POPL	AX

	XCHGL	AX, (SP)			/* exchange AX with pointer to trap type */
	MOVBLZX	(AX), AX			/* trap type -> AX */
	XCHGL	AX, (SP)			/* exchange trap type with AX */

M pc/trap.c => pc/trap.c +2 -0
@@ 15,6 15,8 @@ static void fault386(Ureg*, void*);
static Lock vctllock;
static Vctl *vctl[256];

uvlong	intrts;

void
intrenable(int irq, void (*f)(Ureg*, void*), void* a, int tbdf)
{

M port/sysfile.c => port/sysfile.c +1 -3
@@ 109,9 109,7 @@ sysfd2path(ulong *arg)
{
	Chan *c, *oc;

	validaddr(arg[1], 1, 0);
	if(vmemchr((char*)arg[1], '\0', arg[2]) == 0)
		error(Ebadarg);
	validaddr(arg[1], arg[2], 1);

	/*
	 * Undomount below may cclose the chan so bump the