1 typedef struct Lock Lock;
2 typedef struct Label Label;
3 typedef struct Ureg Ureg;
4 typedef struct Mach Mach;
5 typedef struct FPsave FPsave;
6 typedef struct Notsave Notsave;
7 typedef struct PMMU PMMU;
8 typedef struct Confmem Confmem;
9 typedef struct Conf Conf;
10 typedef struct Proc Proc;
11 typedef struct ISAConf ISAConf;
14 #define VA(k) ((uintptr)(k))
15 #define kmap(p) (KMap*)((p)->pa|kseg0)
18 #pragma incomplete Ureg
58 ulong l1[USTKTOP / MiB];
61 #include "../port/portdat.h"
65 int machno; /* physical id of processor */
66 uintptr splpc; /* pc of last caller to splhi */
68 Proc* proc; /* current process */
71 int flushmmu; /* flush current proc mmu state */
73 ulong ticks; /* of the clock since boot time */
74 Label sched; /* scheduler wakeup */
75 Lock alarmlock; /* access to alarm list */
76 void* alarm; /* alarms bound to this clock */
79 Proc* readied; /* for runproc */
80 ulong schedticks; /* next forced context switch */
93 uvlong fastclock; /* last sampled value */
94 uvlong inidle; /* time spent in idlehands() */
99 uvlong cyclefreq; /* Frequency of user readable cycle counter */
114 ulong nmach; /* processors */
115 ulong nproc; /* processes */
116 Confmem mem[1]; /* physical memory */
117 ulong npage; /* total physical pages of memory */
118 usize upages; /* user page pool */
119 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
120 ulong ialloc; /* max interrupt time allocation in bytes */
121 ulong pipeqsize; /* size in bytes of pipe queues */
122 ulong nimage; /* number of page cache image headers */
123 ulong nswap; /* number of swap pages */
124 int nswppo; /* max # of pageouts per segment pass */
125 ulong hz; /* processor cycle freq */
127 int monitor; /* flag */
133 int machs; /* bitmap of active CPUs */
134 int exiting; /* shutdown */
135 int ispanic; /* shutdown in response to a panic */
139 #define up (((Mach*)MACHADDR)->externup)
140 extern Mach* machaddr[MAXMACH];
141 #define MACHP(n) (machaddr[n])
142 extern uintptr kseg0;
144 #define AOUT_MAGIC (E_MAGIC)