~kris/9p

9hist

a98497b10909acac0d87f67dc031f2cbe3d62dbf — David du Colombier 35 years ago 5f2a657
Plan 9 from Bell Labs 1991-06-26
3 files changed, 25 insertions(+), 10 deletions(-)

M pc/l.s
M port/dev.c
M port/sturp.c
M pc/l.s => pc/l.s +22 -8
@@ 1,25 1,39 @@
#include "mem.h"

/*
 *  pointer to initial gdt (must be in first 64K of program)
 */
GLOBL	gdtptr(SB),$6

	DATA	gdtptr+0(SB)/2, $(6*8)
	DATA	gdtptr+0(SB)/2, $(5*8)
	DATA	gdtptr+2(SB)/4, $gdt(SB)

/*
 *  pointer to idt (must be in first 64K of program)
 */
GLOBL	idtptr(SB),$6

	DATA	idtptr+0(SB)/2, $(6*8)
	DATA	idtptr+2(SB)/4, $idt(SB)

/*
 *  boot processor
 */
TEXT	start(SB),$0

	CLI			/* disable interrupts */
	MOVW	$NULLSEL,IDTR	/* force shutdown on error */

	/* point CPU at the interrupt/trap table */
	LEAL	idtptr(SB),AX
/*	MOVL	(AX),IDTR /**/

	/* point data segment at low memory */
	XORL	AX,AX
	MOVW	AX,DS
/*	MOVW	AX,DS /**/

	/* load gdt address (valid after paging) */
	/* point CPU at the interrupt/trap table */
	LEAL	gdtptr(SB),AX
	MOVL	-KZERO(AX),GDTR
/*	MOVL	(AX),GDTR /**/

	CALL	main(SB)
	/* never returns */


@@ 132,12 146,12 @@ TEXT	invtrap(SB),$0
 */
alltrap:

	PUSHL	DS
/*	PUSHL	DS	/**/
	PUSHAL
	MOVL	$KDSEL, AX
	MOVW	AX, DS
/*	MOVW	AX, DS /**/
	CALL	trap(SB)
	POPAL
	POPL	DS
/*	POPL	DS	/**/
	ADDL	$8,SP		/* pop the trap and error codes */
	IRETL

M port/dev.c => port/dev.c +2 -1
@@ 127,7 127,8 @@ devstat(Chan *c, char *db, Dirtab *tab, int ntab, Devgen *gen)
				convD2M(&dir, db);
				return;
			}
			panic("devstat");
			print("devstat %c %lux\n", devchar[c->type], c->qid.path);
			error(Enonexist);
		case 0:
			break;
		case 1:

M port/sturp.c => port/sturp.c +1 -1
@@ 11,7 11,7 @@ enum {
	Nmask=		0x7,
};

#define DPRINT if(q->flag&QDEBUG)print
#define DPRINT if(q->flag&QDEBUG)kprint

typedef struct Urp	Urp;