1 typedef struct Conf Conf;
2 typedef struct FPsave FPsave;
3 typedef struct ISAConf ISAConf;
4 typedef struct Imap Imap;
5 typedef struct Label Label;
6 typedef struct Lock Lock;
7 typedef struct Mach Mach;
8 typedef struct Notsave Notsave;
9 typedef struct PCArch PCArch;
10 typedef struct PMMU PMMU;
11 typedef struct Page Page;
12 typedef struct Pcidev Pcidev;
13 typedef struct Proc Proc;
14 typedef struct Sys Sys;
15 typedef struct Ureg Ureg;
16 typedef struct Vctl Vctl;
18 #pragma incomplete Ureg
19 #pragma incomplete Imap
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
34 ulong key; /* semaphore (non-zero = locked) */
53 /* Floating point states */
57 /* Bit that's or-ed in during note handling (FP is illegal in note handlers) */
62 * This structure must agree with fpsave and fprestore asm routines
78 ulong nmach; /* processors */
79 ulong nproc; /* processes */
80 ulong npage0; /* total physical pages of memory */
81 ulong npage1; /* total physical pages of memory */
82 ulong npage; /* total physical pages of memory */
83 ulong base0; /* base of bank 0 */
84 ulong base1; /* base of bank 1 */
85 ulong upages; /* user page pool */
86 ulong nimage; /* number of page cache image headers */
87 ulong nswap; /* number of swap pages */
88 int nswppo; /* max # of pageouts per segment pass */
89 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
90 int monitor; /* has display? */
91 ulong ialloc; /* bytes available for interrupt time allocation */
92 ulong pipeqsize; /* size in bytes of pipe queues */
96 * mmu goo in the Proc structure
102 Ureg *mmureg; /* pointer to ureg structure */
106 * things saved in the Proc structure during a notify
113 #include "../port/portdat.h"
116 * machine dependent definitions not used by ../port/dat.h
122 #define VA(k) ((ulong)(k))
123 #define kmap(p) (KMap*)((p)->pa|KZERO)
128 /* OFFSETS OF THE FOLLOWING KNOWN BY l.s */
129 /*0x00*/ int machno; /* physical id of processor */
130 /*0x04*/ ulong splpc; /* pc that called splhi() */
131 /*0x08*/ Proc *proc; /* current process on this processor */
132 /* Debugging/statistics for software TLB in l.s (therefore, also known by l.s) */
133 /*0x0c*/ ulong tlbfault; /* type of last miss */
134 /*0x10*/ ulong imiss; /* number of instruction misses */
135 /*0x14*/ ulong dmiss; /* number of data misses */
137 /* ordering from here on irrelevant */
141 ulong ticks; /* of the clock since boot time */
142 Label sched; /* scheduler wakeup */
143 Lock alarmlock; /* access to alarm list */
144 void *alarm; /* alarms bound to this clock */
148 Perf perf; /* performance counters */
150 Proc* readied; /* for runproc */
151 ulong schedticks; /* next forced context switch */
153 ulong clkin; /* basic clock frequency */
156 uvlong cyclefreq; /* Frequency of user readable cycle counter */
160 ulong cpmhz; /* communications processor module frequency */
161 ulong brghz; /* baud rate generator frequency */
166 int tlbpurge; /* # of tlb purges */
167 int pfault; /* # of page faults */
172 int flushmmu; /* make current proc flush it's mmu state */
175 ulong ptabbase; /* start of page table in kernel virtual space */
176 int slotgen; /* next pte (byte offset) when pteg is full */
177 int mmupid; /* next mmu pid to use */
198 * a parsed plan9.ini line
216 Vctl* next; /* handlers on this vector */
218 char name[KNAMELEN]; /* of driver */
219 int isintr; /* interrupt or fault/trap */
222 void (*f)(Ureg*, void*); /* handler to call */
223 void* a; /* argument to call it with */
228 extern register Mach *m;
229 extern register Proc *up;
231 extern FPsave initfp;