1 typedef struct Conf Conf;
2 typedef struct Confmem Confmem;
3 typedef struct FPsave FPsave;
5 typedef struct Label Label;
6 typedef struct Lock Lock;
7 typedef struct KMap KMap;
8 typedef struct MMMU MMMU;
9 typedef struct Mach Mach;
10 typedef struct Notsave Notsave;
11 typedef struct Page Page;
12 typedef struct Proc Proc;
13 typedef struct PMMU PMMU;
15 typedef struct Ureg Ureg;
16 typedef struct ISAConf ISAConf;
19 #pragma incomplete Ureg
21 #define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */
23 #define AOUT_MAGIC (E_MAGIC)
69 ulong nmach; /* processors */
70 ulong nproc; /* processes */
71 Confmem mem[1]; /* physical memory */
72 ulong npage; /* total physical pages of memory */
73 usize upages; /* user page pool */
74 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
75 ulong ialloc; /* max interrupt time allocation in bytes */
76 ulong pipeqsize; /* size in bytes of pipe queues */
77 ulong nimage; /* number of page cache image headers */
78 ulong nswap; /* number of swap pages */
79 int nswppo; /* max # of pageouts per segment pass */
84 * things saved in the Proc structure during a notify
98 Page *mmuused, *mmufree;
104 #include "../port/portdat.h"
124 /* known to assembly */
125 int machno; /* physical id of processor */
126 uintptr splpc; /* pc of last caller to splhi */
127 Proc* proc; /* current process */
130 /* end of known to assembly */
132 int flushmmu; /* flush current proc mmu state */
134 ulong ticks; /* of the clock since boot time */
135 Label sched; /* scheduler wakeup */
136 Lock alarmlock; /* access to alarm list */
137 void* alarm; /* alarms bound to this clock */
140 Proc* readied; /* for runproc */
141 ulong schedticks; /* next forced context switch */
154 uvlong fastclock; /* last sampled value */
155 uvlong inidle; /* time spent in idlehands() */
156 // ulong spuriousintr;
159 Perf perf; /* performance counters */
163 uvlong cpuhz; /* speed of cpu */
164 uvlong cyclefreq; /* Frequency of user readable cycle counter */
178 #define BUSUNKNOWN -1
183 int machs; /* bitmap of active CPUs */
184 int exiting; /* shutdown */
185 int ispanic; /* shutdown in response to a panic */
188 extern register Mach* m; /* R10 */
189 extern register Proc* up; /* R9 */
191 extern int normalprint;
193 extern ulong *mpcore, *slcr;