1 typedef struct Conf Conf;
2 typedef struct Confmem Confmem;
3 typedef struct FPsave FPsave;
4 typedef struct PFPU PFPU;
5 typedef struct ISAConf ISAConf;
6 typedef struct Imap Imap;
7 typedef struct Label Label;
8 typedef struct Lock Lock;
9 typedef struct Mach Mach;
10 typedef struct PCArch PCArch;
11 typedef struct PMMU PMMU;
12 typedef struct Page Page;
13 typedef struct Pcidev Pcidev;
14 typedef struct Proc Proc;
15 typedef struct Sys Sys;
16 typedef struct Ureg Ureg;
17 typedef struct Vctl Vctl;
20 #pragma incomplete Ureg
21 #pragma incomplete Imap
23 #define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */
26 * parameters for sysproc.c
28 #define AOUT_MAGIC Q_MAGIC
31 * machine dependent definitions used by ../port/dat.h
36 ulong key; /* semaphore (non-zero = locked) */
51 * This structure must agree with fpsave and fprestore asm routines
73 /* Floating point states */
77 /* Bit that's or-ed in during note handling (FP is illegal in note handlers) */
91 ulong nmach; /* processors */
92 ulong nproc; /* processes */
94 ulong npage; /* total physical pages of memory */
95 ulong upages; /* user page pool */
96 ulong nimage; /* number of page cache image headers */
97 ulong nswap; /* number of swap pages */
98 int nswppo; /* max # of pageouts per segment pass */
99 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
100 int monitor; /* has display? */
101 ulong ialloc; /* bytes available for interrupt time allocation */
102 ulong pipeqsize; /* size in bytes of pipe queues */
106 * mmu goo in the Proc structure
112 Ureg *mmureg; /* pointer to ureg structure */
115 #include "../port/portdat.h"
118 * machine dependent definitions not used by ../port/dat.h
124 #define VA(k) ((ulong)(k))
125 #define kmap(p) (KMap*)((p)->pa|KZERO)
130 /* OFFSETS OF THE FOLLOWING KNOWN BY l.s */
131 /*0x00*/ int machno; /* physical id of processor */
132 /*0x04*/ ulong splpc; /* pc that called splhi() */
133 /*0x08*/ Proc *proc; /* current process on this processor */
134 /* Debugging/statistics for software TLB in l.s (therefore, also known by l.s) */
135 /*0x0c*/ ulong tlbfault; /* type of last miss */
136 /*0x10*/ ulong imiss; /* number of instruction misses */
137 /*0x14*/ ulong dmiss; /* number of data misses */
139 /* ordering from here on irrelevant */
144 uintptr ptabbase; /* start of page table in kernel virtual space */
145 int slotgen; /* next pte (byte offset) when pteg is full */
146 int mmupid; /* next mmu pid to use */
154 ulong clkin; /* basic clock frequency */
160 ulong cpmhz; /* communications processor module frequency */
161 ulong brghz; /* baud rate generator frequency */
174 * a parsed plan9.ini line
192 Vctl* next; /* handlers on this vector */
194 char name[KNAMELEN]; /* of driver */
195 int isintr; /* interrupt or fault/trap */
198 void (*f)(Ureg*, void*); /* handler to call */
199 void* a; /* argument to call it with */
204 extern register Mach *m;
205 extern register Proc *up;
207 extern FPsave initfp;