1 typedef struct Conf Conf;
2 typedef struct Confmem Confmem;
3 typedef struct FPsave FPsave;
4 typedef struct ISAConf ISAConf;
5 typedef struct Label Label;
6 typedef struct Lock Lock;
7 typedef struct Mach Mach;
8 typedef struct Notsave Notsave;
9 typedef struct Page Page;
10 typedef struct PCArch PCArch;
11 typedef struct PCB PCB;
12 typedef struct Pcidev Pcidev;
13 typedef struct PMMU PMMU;
14 typedef struct Proc Proc;
15 typedef struct Sys Sys;
16 typedef struct Ureg Ureg;
17 typedef struct Vctl Vctl;
20 #define MAXSYSARG 6 /* for mount(fd, mpt, flag, arg, srv) */
23 * parameters for sysproc.c
25 #define AOUT_MAGIC L_MAGIC
28 * machine dependent definitions used by ../port/dat.h
33 ulong key; /* semaphore (non-zero = locked) */
53 /* floating point states */
58 /* bit or'd with the state */
65 long dummy; /* lower bits of FPCR, useless */
79 ulong nmach; /* processors */
80 ulong nproc; /* processes */
82 ulong npage; /* total physical pages of memory */
83 ulong upages; /* user page pool */
84 ulong nimage; /* number of page cache image headers */
85 ulong nswap; /* number of swap pages */
86 int nswppo; /* max # of pageouts per segment pass */
87 ulong copymode; /* 0 is copy on write, 1 is copy on reference */
88 int monitor; /* has display? */
89 ulong ialloc; /* bytes available for interrupt time allocation */
90 ulong pipeqsize; /* size in bytes of pipe queues */
94 * mmu goo in the Proc structure
98 Page *mmutop; /* 1st level table */
99 Page *mmulvl2; /* 2nd level table */
100 Page *mmufree; /* unused page table pages */
101 Page *mmuused; /* used page table pages, except for mmustk */
105 * things saved in the Proc structure during a notify
112 #include "../port/portdat.h"
115 * machine dependent definitions not used by ../port/dat.h
121 #define VA(k) ((ulong)(k))
122 #define kmap(p) (KMap*)((p)->pa|KZERO)
126 * Process Control Block, used by PALcode
143 /* OFFSETS OF THE FOLLOWING KNOWN BY l.s */
144 int machno; /* physical id of processor */
145 ulong splpc; /* pc that called splhi() */
146 Proc *proc; /* current process on this processor */
148 /* ordering from here on irrelevant */
150 ulong ticks; /* of the clock since boot time */
151 Label sched; /* scheduler wakeup */
152 Lock alarmlock; /* access to alarm list */
153 void *alarm; /* alarms bound to this clock */
156 Proc* readied; /* for runproc */
157 ulong schedticks; /* next forced context switch */
159 vlong cpuhz; /* hwrpb->cfreq */
160 uvlong cyclefreq; /* Frequency of user readable cycle counter */
163 Perf perf; /* performance counters */
165 int tlbfault; /* only used by devproc; no access to tlb */
166 int tlbpurge; /* ... */
172 int flushmmu; /* make current proc flush it's mmu state */
193 * Implementation-dependant functions (outside of Alpha architecture proper).
194 * Called PCArch because that's what mkdevc calls it (for the PC).
201 void (*coreinit)(void); /* set up core logic, PCI mappings etc */
202 void (*corehello)(void); /* identify core logic to user */
203 void (*coredetach)(void); /* restore core logic before return to console */
204 void *(*pcicfg)(int, int); /* map and point to PCI cfg space */
205 void *(*pcimem)(int, int); /* map and point to PCI memory space */
206 int (*intrenable)(Vctl*);
207 int (*intrvecno)(int);
208 int (*intrdisable)(int);
213 void (*_outb)(int, int);
214 void (*_outs)(int, ushort);
215 void (*_outl)(int, ulong);
216 void (*_insb)(int, void*, int);
217 void (*_inss)(int, void*, int);
218 void (*_insl)(int, void*, int);
219 void (*_outsb)(int, void*, int);
220 void (*_outss)(int, void*, int);
221 void (*_outsl)(int, void*, int);
225 * a parsed plan9.ini line
244 #define MACHP(n) ((Mach *)((int)&mach0+n*BY2PG))
247 extern register Mach *m;
248 extern register Proc *up;
251 * hardware info about a device
260 ulong intnum; /* interrupt number */
261 char *type; /* card type, malloced */
262 int nports; /* Number of ports */
263 Devport *ports; /* The ports themselves */
266 extern FPsave initfp;