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 Label Label;
7 typedef struct Lock Lock;
8 typedef struct Mach Mach;
9 typedef struct Page Page;
10 typedef struct PCArch PCArch;
11 typedef struct Pcidev Pcidev;
12 typedef struct PMMU PMMU;
13 typedef struct Proc Proc;
14 typedef struct Sys Sys;
15 typedef struct Ureg Ureg;
16 typedef struct Vctl Vctl;
19 #pragma incomplete Ureg
21 #define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */
24 * parameters for sysproc.c
26 #define AOUT_MAGIC Q_MAGIC
29 * machine dependent definitions used by ../port/dat.h
49 * This structure must agree with fpsave and fprestore asm routines
86 ulong nmach; /* processors */
87 ulong nproc; /* processes */
89 ulong npage; /* total physical pages of memory */
90 ulong upages; /* user page pool */
91 ulong nimage; /* number of page cache image headers */
92 ulong nswap; /* number of swap pages */
93 int nswppo; /* max # of pageouts per segment pass */
94 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
95 int monitor; /* has display? */
96 ulong ialloc; /* bytes available for interrupt time allocation */
97 ulong pipeqsize; /* size in bytes of pipe queues */
101 * mmu goo in the Proc structure
109 #include "../port/portdat.h"
112 * machine dependent definitions not used by ../port/dat.h
118 #define VA(k) ((ulong)(k))
119 #define kmap(p) (KMap*)((p)->pa|KZERO)
124 /* OFFSETS OF THE FOLLOWING KNOWN BY l.s */
125 int machno; /* physical id of processor */
126 ulong splpc; /* pc that called splhi() */
127 Proc *proc; /* current process on this processor */
129 /* ordering from here on irrelevant */
131 ulong ticks; /* of the clock since boot time */
132 Label sched; /* scheduler wakeup */
133 Lock alarmlock; /* access to alarm list */
134 void *alarm; /* alarms bound to this clock */
139 Proc* readied; /* for runproc */
140 ulong schedticks; /* next forced context switch */
146 uvlong cyclefreq; /* Frequency of user readable cycle counter */
150 Perf perf; /* performance counters */
152 int tlbfault; /* only used by devproc; no access to tlb */
153 int tlbpurge; /* ... */
159 int flushmmu; /* make current proc flush it's mmu state */
162 ulong ptabbase; /* start of page table in kernel virtual space */
163 int slotgen; /* next pte (byte offset) when pteg is full */
164 int mmupid; /* next mmu pid to use */
183 * a parsed plan9.ini line
200 #define MACHP(n) ((Mach *)((int)&mach0+n*BY2PG))
203 extern register Mach *m;
204 extern register Proc *up;
206 extern FPsave initfp;