Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/ss/dat.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname ss/dat.h 1990/1223
## diff -e /dev/null /n/bootesdump/1990/1223/sys/src/9/sparc/dat.h
0a
typedef struct Alarm	Alarm;
typedef struct Block	Block;
typedef struct Blist	Blist;
typedef struct Chan	Chan;
typedef struct Conf	Conf;
typedef struct Dev	Dev;
typedef struct Dirtab	Dirtab;
typedef struct Env	Env;
typedef struct Envp	Envp;
typedef struct Envval	Envval;
typedef struct FFrame	FFrame;
typedef struct FPsave	FPsave;
typedef struct KMap	KMap;
typedef struct Label	Label;
typedef struct List	List;
typedef struct Lock	Lock;
typedef struct MMU	MMU;
typedef struct MMUCache	MMUCache;
typedef struct Mach	Mach;
typedef struct Mount	Mount;
typedef struct Mtab	Mtab;
typedef struct Note	Note;
typedef struct Orig	Orig;
typedef struct PTE	PTE;
typedef struct Page	Page;
typedef struct Pgrp	Pgrp;
typedef struct Proc	Proc;
typedef struct Qinfo	Qinfo;
typedef struct QLock	QLock;
typedef struct Queue	Queue;
typedef struct Ref	Ref;
typedef struct Rendez	Rendez;
typedef struct Seg	Seg;
typedef struct Service	Service;
typedef struct Stream	Stream;
typedef struct Ureg	Ureg;
typedef struct User	User;

typedef int Devgen(Chan*, Dirtab*, int, int, Dir*);

struct List
{
	void	*next;
};

struct Lock
{
	char	key;			/* addr of sync bus semaphore */
	ulong	pc;
};

struct Ref
{
	Lock;
	int	ref;
};

struct QLock
{
	Proc	*head;			/* next process waiting for object */
	Proc	*tail;			/* last process waiting for object */
	Lock	use;			/* to use object */
	Lock	queue;			/* to access list */
};

struct Label
{
	ulong	sp;
	ulong	pc;
	ushort	sr;
};

struct Alarm
{
	List;
	Lock;
	int	busy;
	long	dt;		/* may underflow in clock(); must be signed */
	void	(*f)(void*);
	void	*arg;
};

#define	CHDIR	0x80000000L
#define	CHAPPEND 0x40000000L
#define	CHEXCL	0x20000000L
struct Chan
{
	QLock;				/* general access */
	Ref;
	union{
		Chan	*next;		/* allocation */
		ulong	offset;		/* in file */
	};
	ushort	type;
	ushort	dev;
	ushort	mode;			/* read/write */
	ushort	flag;
	Qid	qid;
	Mount	*mnt;			/* mount point that derived Chan */
	ulong	mountid;
	int	fid;			/* for devmnt */
	union {
		Stream	*stream;	/* for stream channels */
		void	*aux;
		Qid	pgrpid;		/* for #p/notepg */
	};
	Chan	*mchan;			/* channel to mounted server */
	Qid	mqid;			/* qid of root of mount point */
};

struct	FPsave
{
	uchar	type;
	uchar	size;
	short	reserved;
	char	junk[212];	/* 68881: sizes 24, 180; 68882: 56, 212 */
	char	reg[3*4+8*12];
};

struct Conf
{
	int	nmach;		/* processors */
	int	nproc;		/* processes */
	int	npgrp;		/* process groups */
	ulong	npage0;		/* total physical pages of memory, bank 0 */
	ulong	npage1;		/* total physical pages of memory, bank 1 */
	ulong	base0;		/* base of bank 0 */
	ulong	base1;		/* base of bank 1 */
	ulong	npage;		/* total physical pages of memory */
	ulong	norig;		/* origins */
	ulong	npte;		/* contiguous page table entries */
	ulong	nmod;		/* single (modifying) page table entries */
	int	nalarm;		/* alarms */
	int	nchan;		/* channels */
	int	nenv;		/* distinct environment values */
	int	nenvchar;	/* environment text storage */
	int	npgenv;		/* environment files per process group */
	int	nmtab;		/* mounted-upon channels per process group */
	int	nmount;		/* mounts */
	int	nmntdev;	/* mounted devices (devmnt.c) */
	int	nmntbuf;	/* buffers for devmnt.c messages */
	int	nmnthdr;	/* headers for devmnt.c messages */
	int	nstream;	/* streams */
	int	nqueue;		/* stream queues */
	int	nblock;		/* stream blocks */
	int	nsrv;		/* public servers (devsrv.c) */
	int	nbitmap;	/* bitmap structs (devbit.c) */
	int	nbitbyte;	/* bytes of bitmap data (devbit.c) */
	int	nfont;		/* font structs (devbit.c) */
	int	nurp;		/* max urp conversations */
	int	nasync;		/* number of async protocol modules */
	int	npipe;		/* number of pipes */
	int	nservice;	/* number of services */
	int	nfsyschan;	/* number of filsys open channels */
	ulong	maxialloc;	/* maximum bytes used by ialloc */
	int	copymode;	/* 0 is copy on write, 1 is copy on reference */
};

struct Dev
{
	void	 (*reset)(void);
	void	 (*init)(void);
	Chan	*(*attach)(char*);
	Chan	*(*clone)(Chan*, Chan*);
	int	 (*walk)(Chan*, char*);
	void	 (*stat)(Chan*, char*);
	Chan	*(*open)(Chan*, int);
	void	 (*create)(Chan*, char*, int, ulong);
	void	 (*close)(Chan*);
	long	 (*read)(Chan*, void*, long);
	long	 (*write)(Chan*, void*, long);
	void	 (*remove)(Chan*);
	void	 (*wstat)(Chan*, char*);
};

struct Dirtab
{
	char	name[NAMELEN];
	Qid	qid;
	long	length;
	long	perm;
};

struct Env
{
	Lock;
	Envval	*val;
	char	name[NAMELEN];
	Env	*next;			/* in chain of Envs for a pgrp */
	int	pgref;			/* # pgrps pointing here */
};

struct Envp
{
	Env	*env;
	int	chref;			/* # chans from pgrp pointing here */
};

struct KMap
{
	KMap	*next;
	ulong	pa;
	ulong	va;
};
#define	VA(k)	((k)->va)

struct Mach
{
	int	machno;			/* physical id of processor */
	ulong	splpc;			/* pc of last caller to splhi */
	int	mmask;			/* 1<<m->machno */
	ulong	ticks;			/* of the clock since boot time */
	Proc	*proc;			/* current process on this processor */
	Proc	*lproc;			/* last process on this processor */
	Label	sched;			/* scheduler wakeup */
	Lock	alarmlock;		/* access to alarm list */
	void	*alarm;			/* alarms bound to this clock */
	int	fpstate;		/* state of fp registers on machine */
	void	(*intr)(ulong, ulong);	/* !!Compatability with mips!! */
	ulong	cause;			/*	... */
	ulong	pc;			/*	... */
	int	stack[1];
};

struct Mount
{
	Ref;				/* also used as a lock when playing lists */
	short	term;			/* terminates list */
	ulong	mountid;
	Mount	*next;
	Chan	*c;			/* channel replacing underlying channel */
};

struct Mtab
{
	Chan	*c;			/* channel mounted upon */
	Mount	*mnt;			/* what's mounted upon it */
};

enum{
	NUser,				/* note provided externally */
	NExit,				/* process should exit */
	NDebug,				/* process should hang */
};

struct Note
{
	char	msg[ERRLEN];
	int	flag;			/* whether system posted it */
};

struct Orig
{
	Lock;
	Orig	*next;			/* for allocation */
	ushort	nproc;			/* processes using it */
	ushort	npage;			/* sum of refs of pages in it */
	ushort	flag;
	ulong	va;			/* va of 0th pte */
	ulong	npte;			/* #pte's in list */
	PTE	*pte;
	Chan	*chan;			/* channel deriving segment (if open) */
	ushort	type;			/* of channel (which could be non-open) */
	Qid	qid;
	Chan	*mchan;
	Qid	mqid;
	ulong	minca;			/* base of region in chan */
	ulong	maxca;			/* end of region in chan */
};

struct Page
{
	Orig	*o;			/* origin of segment owning page */
	ulong	va;			/* virtual address */
	ulong	pa;			/* physical address */
	ushort	ref;
	Page	*next;
	Page	*prev;
};

struct Pgrp
{
	Ref;				/* also used as a lock when mounting */
	Pgrp	*next;
	int	index;			/* index in pgrp table */
	ulong	pgrpid;
	char	user[NAMELEN];
	int	nmtab;			/* highest active mount table entry, +1 */
	int	nenv;			/* highest active env table entry, +1 */
	Lock	debug;			/* single access via devproc.c */
	Mtab	*mtab;
	Envp	*etab;
};

struct PTE
{
	Proc	*proc;			/* process owning this PTE (0 in Orig) */
	PTE	*nextmod;		/* next at this va */
	PTE	*nextva;		/* next in this proc at higher va */
	Page	*page;
};

struct Rendez
{
	Lock;
	Proc	*p;
};

struct Seg
{
	Proc	*proc;			/* process owning this segment */
	Orig	*o;			/* root list of pte's */
	ulong	minva;			/* va of 0th pte (not necessarily Seg->o->va) */
	ulong	maxva;			/* va of last pte */
	PTE	*mod;			/* list of modified pte's */
	ulong	pad[3]; /**/
};

struct Proc
{
	Label	sched;
	Mach	*mach;			/* machine running this proc */
	char	text[NAMELEN];
	Proc	*rnext;			/* next process in run queue */
	Proc	*qnext;			/* next process on queue for a QLock */
	QLock	*qlock;			/* address of qlock being queued for DEBUG */
	int	state;
	int	spin;			/* spinning instead of unscheduled */
	Page	*upage;			/* BUG: should be unlinked from page list */
	Seg	seg[NSEG];
	ulong	bssend;			/* initial top of bss seg */
	ulong	pid;
	int	nchild;
	QLock	wait;			/* exiting children to be waited for */
	ulong	waitmsg;
	Proc	*child;
	Proc	*parent;
	Pgrp	*pgrp;
	ulong	parentpid;
	ulong	time[6];		/* User, Sys, Real; child U, S, R */
	short	exiting;
	short	insyscall;
	int	fpstate;
	Lock	debug;			/* to access debugging elements of User */
	Rendez	*r;			/* rendezvous point slept on */
	Rendez	sleep;			/* place for tsleep and syssleep */
	int	wokeup;			/* whether sleep was interrupted */
	ulong	pc;			/* DEBUG only */
	int	kp;			/* true if a kernel process */
	int	pidonmach[1];		/* !!Compatability with mips!! */
};

struct MMU
{
	ulong	va;
	ulong	pa;
};

#define NMMU 16
struct MMUCache
{
	ulong	next;
	MMU	mmu[NMMU];
};

#define	NERR	15
#define	NNOTE	5
#define	NFD	100
struct User
{
	Proc	*p;
	int	nerrlab;
	Label	errlab[NERR];
	char	error[ERRLEN];
	FPsave	fpsave;			/* address of this is known by vdb */
	char	elem[NAMELEN];		/* last name element from namec */
	Chan	*slash;
	Chan	*dot;
	Chan	*fd[NFD];
	int	maxfd;			/* highest fd in use */
	/*
	 * Rest of structure controlled by devproc.c and friends.
	 * lock(&p->debug) to modify.
	 */
	Note	note[NNOTE];
	short	nnote;
	short	notified;		/* sysnoted is due */
	int	(*notify)(void*, char*);
	MMUCache mc;
	void	*ureg;
};

/*
 *  operations available to a queue
 */
struct Qinfo
{
	void (*iput)(Queue*, Block*);	/* input routine */
	void (*oput)(Queue*, Block*);	/* output routine */
	void (*open)(Queue*, Stream*);
	void (*close)(Queue*);
	char *name;
	void (*reset)(void);		/* initialization */
	Qinfo *next;
};

/*
 *  We reference lance buffers via descriptors kept in host memory
 */
struct Block
{
	Block	*next;
	uchar	*rptr;		/* first unconsumed byte */
	uchar	*wptr;		/* first empty byte */
	uchar	*lim;		/* 1 past the end of the buffer */
	uchar	*base;		/* start of the buffer */
	uchar	flags;
	uchar	type;
};

/* flag bits */
#define S_DELIM 0x80
#define S_CLASS 0x07

/* type values */
#define M_DATA 0
#define M_CTL 1
#define M_HANGUP 2

/*
 *  a list of blocks
 */
struct Blist {
	Lock;
	Block	*first;		/* first data block */
	Block	*last;		/* last data block */
	long	len;		/* length of list in bytes */
	int	nb;		/* number of blocks in list */
};

/*
 *  a queue of blocks
 */
struct Queue {
	Blist;
	int	flag;
	Qinfo	*info;		/* line discipline definition */
	Queue	*other;		/* opposite direction, same line discipline */
	Queue	*next;		/* next queue in the stream */
	void	(*put)(Queue*, Block*);
	QLock	rlock;		/* mutex for processes sleeping at r */
	Rendez	r;		/* standard place to wait for flow control */
	Rendez	*rp;		/* where flow control wakeups go to */
	void	*ptr;		/* private info for the queue */
};
#define QHUNGUP	0x1	/* flag bit meaning the stream has been hung up */
#define QINUSE	0x2
#define QHIWAT	0x4	/* queue has gone past the high water mark */	
#define QDEBUG	0x8

/*
 *  a stream head
 */
struct Stream {
	QLock;			/* structure lock */
	short	inuse;		/* number of processes in stream */
	short	opens;		/* number of processes with stream open */
	ushort	hread;		/* number of reads after hangup */
	ushort	type;		/* correlation with Chan */
	ushort	dev;		/* ... */
	ushort	id;		/* ... */
	QLock	rdlock;		/* read lock */
	Queue	*procq;		/* write queue at process end */
	Queue	*devq;		/* read queue at device end */
};
#define	RD(q)		((q)->other < (q) ? (q->other) : q)
#define	WR(q)		((q)->other > (q) ? (q->other) : q)
#define GLOBAL(a)	(((ulong)(a)) & 0x80000000)
#define STREAMTYPE(x)	((x)&0x1f)
#define STREAMID(x)	(((x)&~CHDIR)>>5)
#define STREAMQID(i,t)	(((i)<<5)|(t))
#define PUTNEXT(q,b)	(*(q)->next->put)((q)->next, b)
#define BLEN(b)		((b)->wptr - (b)->rptr)
#define QFULL(q)	((q)->flag & QHIWAT)
#define FLOWCTL(q)	{ if(QFULL(q->next)) flowctl(q); }

/*
 *  stream file qid's & high water mark
 */
enum {
	Shighqid = STREAMQID(1,0) - 1,
	Sdataqid = Shighqid,
	Sctlqid = Sdataqid-1,
	Slowqid = Sctlqid,
	Streamhi= (9*1024),	/* byte count high water mark */
	Streambhi= 32,		/* block count high water mark */
};

#define NSTUB 32
struct Service
{
	Ref;
	Service *next;
	QLock	alock;
	int	die;
	Chan	*inc;
	Chan	*outc;
	char	name[NAMELEN];
};


#define	PRINTSIZE	256

extern register Mach	*m;
extern register User	*u;

/*
 * Process states
 */
enum
{
	Dead = 0,
	Moribund,
	Zombie,
	Ready,
	Scheding,
	Running,
	Queueing,
	MMUing,
	Exiting,
	Inwait,
	Wakeme,
	Broken,
};
extern	char	*statename[];

/*
 * Chan flags
 */
#define	COPEN	1	/* for i/o */
#define	CMOUNT	2	/* is result of a mount/bind */
#define	CCREATE	4	/* permits creation if CMOUNT */
#define	CCEXEC	8	/* close on exec */
#define	CFREE	16	/* not in use */

/*
 * Proc.time
 */
enum
{
	TUser,
	TSys,
	TReal,
	TCUser,
	TCSys,
	TCReal,
};

/*
 * floating point registers
 */
enum
{
	FPinit,
	FPactive,
	FPdirty,
};

/*
 * Memory management
 */
#define	SSEG	0
#define	TSEG	1
#define	DSEG	2
#define	BSEG	3
#define	ESEG	4	/* used by exec to build new stack */

#define	OWRPERM	0x01	/* write permission */
#define	OPURE	0x02	/* original data mustn't be written */
#define	OCACHED	0x04	/* cached; don't discard on exit */

/*
 * Access types in namec
 */
enum
{
	Aaccess,	/* as in access, stat */
	Atodir,		/* as in chdir */
	Aopen,		/* for i/o */
	Amount,		/* to be mounted upon */
	Acreate,	/* file is to be created */
};

#define	NUMSIZE	12		/* size of formatted number */

#define	MACHP(n)	(n==0? &mach0 : *(Mach**)0)

extern	Conf	conf;
extern	ulong	initcode[];
extern	Dev	devtab[];
extern	char	devchar[];
extern	FPsave	initfp;
extern	Mach	mach0;
extern	char	user[NAMELEN];
extern	char	*errstrtab[];

extern  void	(*kprofp)(ulong);

/*
 *  parameters for sysproc.c
 */
#define AOUT_MAGIC	A_MAGIC
#define ENTRYOFFSET	0
.
## diffname ss/dat.h 1990/1226
## diff -e /n/bootesdump/1990/1223/sys/src/9/sparc/dat.h /n/bootesdump/1990/1226/sys/src/9/sparc/dat.h
612c
#define AOUT_MAGIC	K_MAGIC
.
514,515c
extern register Mach	*m;		/* R6 */
extern register User	*u;		/* R5 */
.
350c
	int	pidonmach[MAXMACH];	/* TLB pid on each mmu */
.
326d
221a
	char	pidhere[NCONTEXT];	/* is this tlbpid possibly in this mmu? */
	int	lastpid;		/* last pid allocated on this machine */
	Proc	*pidproc[NCONTEXT];	/* process that owns this pid on this mach */
.
219c
	void	(*intr)(ulong, ulong);	/* !!Compatibility with mips!! */
.
70d
48c
	ulong	key;
.
## diffname ss/dat.h 1990/1231
## diff -e /n/bootesdump/1990/1226/sys/src/9/sparc/dat.h /n/bootesdump/1990/1231/sys/src/9/sparc/dat.h
511a

/*
 *  system dependent lance stuff
 *  filled by lancesetup() 
 */
struct Lance
{
	ushort	lognrrb;	/* log2 number of receive ring buffers */
	ushort	logntrb;	/* log2 number of xmit ring buffers */
	ushort	nrrb;		/* number of receive ring buffers */
	ushort	ntrb;		/* number of xmit ring buffers */
	ushort	*rap;		/* lance address register */
	ushort	*rdp;		/* lance data register */
	uchar	ea[6];		/* our ether addr */
	int	sep;		/* separation between shorts in lance ram
				    as seen by host */
	ushort	*lanceram;	/* start of lance ram as seen by host */
	Lancemem *lm;		/* start of lance ram as seen by lance */
	Etherpkt *rp;		/* receive buffers (host address) */
	Etherpkt *tp;		/* transmit buffers (host address) */
	Etherpkt *lrp;		/* receive buffers (lance address) */
	Etherpkt *ltp;		/* transmit buffers (lance address) */
};
.
499a
/*
 *  Ethernet packet buffers.
 */
struct Etherpkt {
	uchar d[6];
	uchar s[6];
	uchar type[2];
	uchar data[1500];
	uchar crc[4];
};

/*
 *  nonet constants
 */
enum {
	Nnomsg = 128,		/* max number of outstanding messages */
	Nnocalls = 5,		/* maximum queued incoming calls */
};

/*
 *  generic nonet header
 */
struct Nohdr {
	uchar	circuit[3];	/* circuit number */
	uchar	flag;
	uchar	mid;		/* message id */
	uchar	ack;		/* piggy back ack */
	uchar	remain[2];	/* count of remaing bytes of data */
	uchar	sum[2];		/* checksum (0 means none) */
};
#define NO_HDRSIZE 10
#define NO_NEWCALL	0x1	/* flag bit marking a new circuit */
#define NO_HANGUP	0x2	/* flag bit requesting hangup */
#define NO_ACKME	0x4	/* acknowledge this message */
#define NO_SERVICE	0x8	/* message includes a service name */

/*
 *  a buffer describing a nonet message
 */
struct Nomsg {
	Blist;
	Rendez	r;
	int	mid;		/* sequence number */
	int	rem;		/* remaining */
	long	time;
	int	acked;
	int	inuse;
};

/*
 *  one exists for each Nonet conversation.
 */
struct Noconv {
	QLock;

	Stream	*s;
	Queue	*rq;		/* input queue */
	int	version;	/* incremented each time struct is changed */
	int	state;		/* true if listening */

	Nomsg	in[Nnomsg];	/* messages being received */
	int	rcvcircuit;	/* circuit number of incoming packets */

	uchar	ack[Nnomsg];	/* acknowledgements waiting to be sent */
	int	afirst;
	int	anext;

	QLock	xlock;		/* one trasmitter at a time */
	Rendez	r;		/* process waiting for an output mid */
	Nomsg	ctl;		/* for control messages */
	Nomsg	ackmsg;		/* for acknowledge messages */
	QLock	mlock;		/* lock for out */
	Nomsg	out[Nnomsg];	/* messages being sent */
	int	first;		/* first unacknowledged message */
	int	next;		/* next message buffer to use */
	int	lastacked;	/* last message acked */		
	Block	*media;		/* prototype media output header */
	Nohdr	*hdr;		/* nonet header inside of media header */

	Noifc	*ifc;
	char	raddr[NAMELEN];	/* remote address */
	char	ruser[NAMELEN];	/* remote user */
	char	addr[NAMELEN];	/* local address */
	int	rexmit;		/* statistics */
	int	retry;
	int	bad;
	int	sent;
	int	rcvd;
};

/*
 *  an incoming call
 */
struct Nocall {
	Block	*msg;
	char	raddr[NAMELEN];
	long	circuit;
};

/*
 *  a nonet interface.  one exists for every stream that a 
 *  nonet multiplexor is pushed onto.
 */
struct Noifc {
	Lock;
	int	ref;
	char	name[NAMELEN];	/* interface name */		
	Queue	*wq;		/* interface output queue */
	Noconv	*conv;

	/*
	 *  media dependent
	 */
	int	maxtu;		/* maximum transfer unit */
	int	mintu;		/* minimum transfer unit */
	int	hsize;		/* media header size */
	void	(*connect)(Noconv *, char *);

	/*
	 *  calls and listeners
	 */
	QLock	listenl;
	Rendez	listenr;
	Lock	lock;
	Nocall	call[Nnocalls];
	int	rptr;
	int	wptr;
};

.
148a
	ulong	nnoifc;		/* number of nonet interfaces */
	ulong	nnoconv;	/* number of nonet conversations/ifc */
.
22a
typedef struct Nomsg	Nomsg;
typedef struct Nocall	Nocall;
.
21a
typedef struct Noconv	Noconv;
typedef struct Nohdr	Nohdr;
typedef struct Noifc	Noifc;
.
13a
typedef struct Lance	Lance;
typedef struct Lancemem	Lancemem;
.
10a
typedef struct Etherpkt	Etherpkt;
.
## diffname ss/dat.h 1991/0109
## diff -e /n/bootesdump/1990/1231/sys/src/9/sparc/dat.h /n/bootesdump/1991/0109/sys/src/9/sparc/dat.h
663a
	ushort	busctl;		/* bus control bits */
.
650a
/*
 *  LANCE CSR3 (bus control bits)
 */
#define BSWP	0x4
#define ACON	0x2
#define BCON	0x1
.
346c
	Waitmsg	waitmsg;		/* this is large but must be addressable */
.
## diffname ss/dat.h 1991/0110
## diff -e /n/bootesdump/1991/0109/sys/src/9/sparc/dat.h /n/bootesdump/1991/0110/sys/src/9/sparc/dat.h
775a
extern	uchar	*intrreg;
.
233c
	Proc	*pidproc[NTLBPID];	/* process that owns this pid on this mach */
.
231c
	char	pidhere[NTLBPID];	/* is this tlbpid possibly in this mmu? */
.
## diffname ss/dat.h 1991/0112
## diff -e /n/bootesdump/1991/0110/sys/src/9/sparc/dat.h /n/bootesdump/1991/0112/sys/src/9/sparc/dat.h
361a
	int	nmmuseg;		/* number of segments active in mmu */
.
## diffname ss/dat.h 1991/01151
## diff -e /n/bootesdump/1991/0112/sys/src/9/sparc/dat.h /n/bootesdump/1991/01151/sys/src/9/sparc/dat.h
737c
	FPinactive,
.
120,124c
	long	fsr;
	long	fpreg[32+1];	/* +1 so we can double-align */
.
## diffname ss/dat.h 1991/0118
## diff -e /n/bootesdump/1991/01151/sys/src/9/sparc/dat.h /n/bootesdump/1991/0118/sys/src/9/sparc/dat.h
552c
	ulong	time;
.
## diffname ss/dat.h 1991/0119
## diff -e /n/bootesdump/1991/0118/sys/src/9/sparc/dat.h /n/bootesdump/1991/0119/sys/src/9/sparc/dat.h
542a
#define NO_RESET	0x10	/* reset the connection */
.
## diffname ss/dat.h 1991/0206
## diff -e /n/bootesdump/1991/0201/sys/src/9/sparc/dat.h /n/bootesdump/1991/0206/sys/src/9/slc/dat.h
550d
## diffname ss/dat.h 1991/0209
## diff -e /n/bootesdump/1991/0206/sys/src/9/slc/dat.h /n/bootesdump/1991/0209/sys/src/9/slc/dat.h
225,227d
## diffname ss/dat.h 1991/0212
## diff -e /n/bootesdump/1991/0209/sys/src/9/slc/dat.h /n/bootesdump/1991/0212/sys/src/9/slc/dat.h
296c
	QLock	debug;			/* single access via devproc.c */
.
## diffname ss/dat.h 1991/0318
## diff -e /n/bootesdump/1991/0212/sys/src/9/slc/dat.h /n/bootesdump/1991/0318/sys/src/9/slc/dat.h
514a
#define	ETHERMINMTU	60	/* minimum transmit size */
.
## diffname ss/dat.h 1991/0328
## diff -e /n/bootesdump/1991/0318/sys/src/9/slc/dat.h /n/bootesdump/1991/0328/sys/src/9/slc/dat.h
517,634d
## diffname ss/dat.h 1991/0407
## diff -e /n/bootesdump/1991/0328/sys/src/9/slc/dat.h /n/bootesdump/1991/0407/sys/src/9/slc/dat.h
515c
#define	ETHERMINTU	60	/* minimum transmit size */
#define	ETHERMAXTU	1514	/* maximum transmit size */
#define ETHERHDRSIZE	14	/* size of an ethernet header */
.
## diffname ss/dat.h 1991/0411
## diff -e /n/bootesdump/1991/0407/sys/src/9/slc/dat.h /n/bootesdump/1991/0411/sys/src/9/slc/dat.h
480a
	Block	*err;		/* error message from down stream */
.
176,177c
	long	 (*read)(Chan*, void*, long, ulong);
	long	 (*write)(Chan*, void*, long, ulong );
.
## diffname ss/dat.h 1991/0413
## diff -e /n/bootesdump/1991/0411/sys/src/9/slc/dat.h /n/bootesdump/1991/0413/sys/src/9/slc/dat.h
95c
	QLock	rdl;
	QLock	wrl;
.
## diffname ss/dat.h 1991/0419
## diff -e /n/bootesdump/1991/0413/sys/src/9/slc/dat.h /n/bootesdump/1991/0419/sys/src/9/slc/dat.h
180a
	Chan	*(*clwalk)(Chan*, char*);
.
## diffname ss/dat.h 1991/0427
## diff -e /n/bootesdump/1991/0419/sys/src/9/slc/dat.h /n/bootesdump/1991/0427/sys/src/9/slc/dat.h
229a

	int	tlbfault;
	int	tlbpurge;
	int	pfault;
	int	cs;
	int	syscall;
	int	spinlock;
	int	intr;

.
181d
113a
		int	mntindex;	/* for devmnt */
.
## diffname ss/dat.h 1991/0428
## diff -e /n/bootesdump/1991/0427/sys/src/9/slc/dat.h /n/bootesdump/1991/0428/sys/src/9/slc/dat.h
669,676d
579,667d
574,575d
411,543d
406d
242,382d
184,206c
/*
 *  machine dependent definitions not used by ../port/dat.h
 */
.
167,182c
#include "../port/portdat.h"
.
90,119d
82,87c
	FPinit,
	FPactive,
	FPinactive,
.
80c
/*
 * floating point registers
 */
enum
.
60,73d
53a
extern	Mach	mach0;
extern  void	(*kprofp)(ulong);

/*
 *  parameters for sysproc.c
 */
#define AOUT_MAGIC	K_MAGIC

/*
 *  machine dependent definitions used by ../port/dat.h
 */

.
49,52c
#define	MACHP(n)	(n==0? &mach0 : *(Mach**)0)
.
47d
23,43d
21d
18d
6,11d
1,4d
## diffname ss/dat.h 1991/0507
## diff -e /n/bootesdump/1991/0428/sys/src/9/slc/dat.h /n/bootesdump/1991/0507/sys/src/9/slc/dat.h
95a
};

/*
 *  mmu goo in the Proc structure
 */
struct PMMU
{
	int	pidonmach[MAXMACH];
	int	nmmuseg;	/* number of segments active in mmu */
.
9c
typedef struct PMMU	PMMU;
.
## diffname ss/dat.h 1991/0604
## diff -e /n/bootesdump/1991/0507/sys/src/9/slc/dat.h /n/bootesdump/1991/0604/sys/src/9/slc/dat.h
207a

struct
{
	Lock;
	short	machs;
	short	exiting;
}active;
.
109a
 *  character based IO (mouse, keyboard, console screen)
 */
#define NQ	4096
struct IOQ
{
	Lock;
	uchar	buf[NQ];
	uchar	*in;
	uchar	*out;
	int	state;
	Rendez	r;
	union{
		void	(*puts)(IOQ*, void*, int);	/* output */
		int	(*putc)(IOQ*, int);		/* input */
	};
	void	*ptr;
};
struct KIOQ
{
	QLock;
	IOQ;
	int	repeat;
	int	c;
	int	count;
};

extern IOQ	lineq;
extern IOQ	printq;
extern IOQ	mouseq;
extern KIOQ	kbdq;

/*
.
3a
typedef struct IOQ	IOQ;
typedef struct KIOQ	KIOQ;
.
## diffname ss/dat.h 1991/0606
## diff -e /n/bootesdump/1991/0604/sys/src/9/slc/dat.h /n/bootesdump/1991/0606/sys/src/9/slc/dat.h
248a

/*
 *  character based IO (mouse, keyboard, console screen)
 */
typedef struct IOQ	IOQ;
typedef struct KIOQ	KIOQ;
#define NQ	4096
struct IOQ
{
	Lock;
	uchar	buf[NQ];
	uchar	*in;
	uchar	*out;
	int	state;
	Rendez	r;
	union{
		void	(*puts)(IOQ*, void*, int);	/* output */
		int	(*putc)(IOQ*, int);		/* input */
	};
	void	*ptr;
};
struct KIOQ
{
	QLock;
	IOQ;
	int	repeat;
	int	c;
	int	count;
};

extern IOQ	lineq;
extern IOQ	printq;
extern IOQ	mouseq;
extern KIOQ	kbdq;

.
112,143d
4,5d
## diffname ss/dat.h 1991/0607
## diff -e /n/bootesdump/1991/0606/sys/src/9/slc/dat.h /n/bootesdump/1991/0607/sys/src/9/slc/dat.h
215,249d
## diffname ss/dat.h 1991/0608
## diff -e /n/bootesdump/1991/0607/sys/src/9/slc/dat.h /n/bootesdump/1991/0608/sys/src/9/slc/dat.h
95a
	int	cntrlp;		/* panic on ^P */
.
## diffname ss/dat.h 1991/0706
## diff -e /n/bootesdump/1991/0608/sys/src/9/slc/dat.h /n/bootesdump/1991/0706/sys/src/9/slc/dat.h
161,162d
150d
67,69c
	ulong	nseg;		/* number of segments */
	ulong	nimage;		/* number of page cache image headers */
	ulong 	npagetab;	/* number of pte tables */
	ulong	nswap;		/* number of swap blocks */
.
## diffname ss/dat.h 1991/0717
## diff -e /n/bootesdump/1991/0706/sys/src/9/slc/dat.h /n/bootesdump/1991/0717/sys/src/9/slc/dat.h
167a
	Note	lastnote;
.
164a
	ulong	svpsr;
.
## diffname ss/dat.h 1991/0926
## diff -e /n/bootesdump/1991/0717/sys/src/9/slc/dat.h /n/bootesdump/1991/0926/sys/src/9/slc/dat.h
96a
	ulong	ipif;		/* Ip protocol interfaces */
	ulong	ip;		/* Ip conversations per interface */
	ulong	arp;		/* Arp table size */
	ulong	frag;		/* Ip fragment assemble queue size */
.
## diffname ss/dat.h 1991/1107
## diff -e /n/bootesdump/1991/0926/sys/src/9/slc/dat.h /n/bootesdump/1991/1107/sys/src/9/slc/dat.h
101a
	int	dkif;		/* number of datakit interfaces */
.
## diffname ss/dat.h 1991/1111
## diff -e /n/bootesdump/1991/1107/sys/src/9/slc/dat.h /n/bootesdump/1991/1111/sys/src/9/slc/dat.h
176a
	void	*dbgreg;		/* User registers for debugging in proc */
.
## diffname ss/dat.h 1991/1112
## diff -e /n/bootesdump/1991/1111/sys/src/9/slc/dat.h /n/bootesdump/1991/1112/sys/src/9/slc/dat.h
148c
	int	load;
.
## diffname ss/dat.h 1991/1113
## diff -e /n/bootesdump/1991/1112/sys/src/9/slc/dat.h /n/bootesdump/1991/1113/sys/src/9/slc/dat.h
162d
158a
					/* &fpsave must be 4 mod 8 */
	FPsave	fpsave;			/* address of this is known by db */
.
54c
	long	fpreg[32];
.
## diffname ss/dat.h 1991/1115
## diff -e /n/bootesdump/1991/1113/sys/src/9/slc/dat.h /n/bootesdump/1991/1115/sys/src/9/slc/dat.h
54a
	long	pad;		/* so fsr can be guaranteed at 4 mod 8 */
.
## diffname ss/dat.h 1992/0102
## diff -e /n/bootesdump/1991/1115/sys/src/9/slc/dat.h /n/bootesdump/1992/0102/sys/src/9/slc/dat.h
179a
	ulong	svr7;
.
## diffname ss/dat.h 1992/0208
## diff -e /n/bootesdump/1992/0102/sys/src/9/slc/dat.h /n/bootesdump/1992/0208/sys/src/9/slc/dat.h
88c
	int	nsubfont;	/* Gsubfont structs (devbit.c) */
.
## diffname ss/dat.h 1992/0209
## diff -e /n/bootesdump/1992/0208/sys/src/9/slc/dat.h /n/bootesdump/1992/0209/sys/src/9/slc/dat.h
87a
	int	nfont;		/* GFont structs (devbit.c) */
.
## diffname ss/dat.h 1992/0228
## diff -e /n/bootesdump/1992/0209/sys/src/9/slc/dat.h /n/bootesdump/1992/0228/sys/src/9/slc/dat.h
90,91d
## diffname ss/dat.h 1992/0619
## diff -e /n/bootesdump/1992/0228/sys/src/9/slc/dat.h /n/bootesdump/1992/0619/sys/src/9/slc/dat.h
95d
71a
	ulong	upages;		/* number of user pages */
.
## diffname ss/dat.h 1992/0620
## diff -e /n/bootesdump/1992/0619/sys/src/9/slc/dat.h /n/bootesdump/1992/0620/sys/src/9/slc/dat.h
94,95d
85d
78,82d
73,74d
70d
68d
62d
## diffname ss/dat.h 1992/0621
## diff -e /n/bootesdump/1992/0620/sys/src/9/slc/dat.h /n/bootesdump/1992/0621/sys/src/9/slc/dat.h
82d
## diffname ss/dat.h 1992/0623
## diff -e /n/bootesdump/1992/0621/sys/src/9/slc/dat.h /n/bootesdump/1992/0623/sys/src/9/slc/dat.h
70,79d
## diffname ss/dat.h 1992/0625
## diff -e /n/bootesdump/1992/0623/sys/src/9/slc/dat.h /n/bootesdump/1992/0625/sys/src/9/slc/dat.h
142a
	Sargs	s;
.
78d
70,71d
## diffname ss/dat.h 1992/06271
## diff -e /n/bootesdump/1992/0625/sys/src/9/slc/dat.h /n/bootesdump/1992/06271/sys/src/9/slc/dat.h
140d
133a
	int	scallnr;		/* sys call number - known by db */
	Sargs	s;			/* address of this is known by db */
.
## diffname ss/dat.h 1992/0725
## diff -e /n/bootesdump/1992/06271/sys/src/9/slc/dat.h /n/bootesdump/1992/0725/sys/src/9/slc/dat.h
75d
## diffname ss/dat.h 1992/0726
## diff -e /n/bootesdump/1992/0725/sys/src/9/slc/dat.h /n/bootesdump/1992/0726/sys/src/9/slc/dat.h
55c
	struct{
		ulong	a;	/* address */
		ulong	i;	/* instruction */
	}q[NFPQ];
.
50a
#define	NFPQ	4	/* just a guess */

.
## diffname ss/dat.h 1992/0727
## diff -e /n/bootesdump/1992/0726/sys/src/9/slc/dat.h /n/bootesdump/1992/0727/sys/src/9/slc/dat.h
195a
extern	FPsave	*initfpp;
.
## diffname ss/dat.h 1992/0801
## diff -e /n/bootesdump/1992/0727/sys/src/9/slc/dat.h /n/bootesdump/1992/0801/sys/src/9/slc/dat.h
66a
	int	ss2;		/* is a sparcstation 2 */
.
## diffname ss/dat.h 1992/0802
## diff -e /n/bootesdump/1992/0801/sys/src/9/slc/dat.h /n/bootesdump/1992/0802/sys/src/9/slc/dat.h
126a
	int	fpunsafe;		/* FP unsaved */
	int	fptrap;			/* FP trap occurred while unsafe */
.
## diffname ss/dat.h 1992/0804
## diff -e /n/bootesdump/1992/0802/sys/src/9/slc/dat.h /n/bootesdump/1992/0804/sys/src/9/slc/dat.h
60a
	long	fppc;		/* for recursive traps only */
.
## diffname ss/dat.h 1992/0807
## diff -e /n/bootesdump/1992/0807/sys/src/9/slc/dat.h /n/bootesdump/1992/0807/sys/src/9/ss/dat.h
207a

enum
{
	ScsiTestunit	= 0x00,
	ScsiExtsens	= 0x03,
	ScsiModesense	= 0x1a,
	ScsiGetcap	= 0x25,
	ScsiRead	= 0x08,
	ScsiWrite	= 0x0a,

	/*
	 * data direction
	 */
	ScsiIn		= 1,
	ScsiOut		= 0,
};

struct Scsibuf
{
	void	*virt;
	void	*phys;
	Scsibuf	*next;
};

struct Scsidata
{
	uchar	*base;
	uchar	*lim;
	uchar	*ptr;
};

struct Scsi
{
	QLock;
	ulong	pid;
	ushort	target;
	ushort	lun;
	ushort	rflag;
	ushort	status;
	Scsidata cmd;
	Scsidata data;
	Scsibuf	*b;
	uchar	*save;
	uchar	cmdblk[16];
};
.
68c
	char	ss2;		/* is a sparcstation 2 */
	char	ss2cachebug;	/* has sparcstation2 cache bug */
	char	monitor;	/* has graphics monitor */
	int	ncontext;	/* in mmu */
	int	npmeg;
	int	vacsize;	/* size of virtual address cache, in bytes */
	int	vaclinesize;	/* size of cache line */
.
9a
typedef struct Scsi	Scsi;
typedef struct Scsibuf	Scsibuf;
typedef struct Scsidata	Scsidata;
.
## diffname ss/dat.h 1992/0808
## diff -e /n/bootesdump/1992/0807/sys/src/9/ss/dat.h /n/bootesdump/1992/0808/sys/src/9/ss/dat.h
217,261d
10,12d
## diffname ss/dat.h 1992/0810
## diff -e /n/bootesdump/1992/0808/sys/src/9/ss/dat.h /n/bootesdump/1992/0810/sys/src/9/ss/dat.h
70d
67a
	ulong	monitor;	/* graphics monitor id; 0 for none */
.
## diffname ss/dat.h 1992/0911
## diff -e /n/bootesdump/1992/0810/sys/src/9/ss/dat.h /n/bootesdump/1992/0911/sys/src/9/ss/dat.h
124,126c

	Ctx	*cctx;			/* current context */
	List	*clist;			/* lru list of all contexts */
	Pmeg	*pmeg;			/* array of allocatable pmegs */
	int	pfirst;			/* index of first allocatable pmeg */
	List	*plist;			/* lru list of non-kernel Pmeg's */
	int	needpmeg;		/* a process needs a pmeg */
.
95,96c
	Ctx	*ctxonmach[MAXMACH];
.
89a

.
14a

.
11a
typedef struct List	List;
.
8a
typedef struct Pmeg	Pmeg;
.
1a
typedef struct Ctx	Ctx;
.
## diffname ss/dat.h 1993/0206
## diff -e /n/bootesdump/1992/0911/sys/src/9/ss/dat.h /n/bootesdump/1993/0206/sys/src/9/ss/dat.h
88,91d
## diffname ss/dat.h 1993/0501 # deleted
## diff -e /n/bootesdump/1993/0206/sys/src/9/ss/dat.h /n/fornaxdump/1993/0501/sys/src/brazil/ss/dat.h
1,217d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.