1 typedef struct Cisdat Cisdat;
2 typedef struct Conf Conf;
3 typedef struct Confmem Confmem;
4 typedef struct FPU FPU;
5 typedef struct FPenv FPenv;
6 typedef struct FPsave FPsave;
7 typedef struct DevConf DevConf;
8 typedef struct Label Label;
9 typedef struct Lock Lock;
10 typedef struct MMU MMU;
11 typedef struct Mach Mach;
12 typedef struct Notsave Notsave;
13 typedef struct Page Page;
14 typedef struct PCMmap PCMmap;
15 typedef struct PCMslot PCMslot;
16 typedef struct PCMconftab PCMconftab;
17 typedef struct PhysUart PhysUart;
18 typedef struct PMMU PMMU;
19 typedef struct Proc Proc;
20 typedef struct Uart Uart;
21 typedef struct Ureg Ureg;
22 typedef struct Vctl Vctl;
25 #pragma incomplete Ureg
27 typedef void IntrHandler(Ureg*, void*);
29 #define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */
32 * parameters for sysproc.c
34 #define AOUT_MAGIC (E_MAGIC)
65 ulong regs[8][3]; /* emulated fp */
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 */
89 ulong ialloc; /* bytes available for interrupt time allocation */
90 ulong pipeqsize; /* size in bytes of pipe queues */
91 ulong hz; /* processor cycle freq */
100 NCOLOR= 1, /* 1 level cache, don't worry about VCE's */
101 Nmeg= 32, /* maximum size of user space */
106 Page *l1page[Nmeg]; /* this's process' level 1 entries */
107 ulong l1table[Nmeg]; /* ... */
108 Page *mmufree; /* free mmu pages */
112 * things saved in the Proc structure during a notify
119 #include "../port/portdat.h"
123 int machno; /* physical id of processor */
124 ulong splpc; /* pc of last caller to splhi */
126 Proc *proc; /* current process */
127 ulong mmupid; /* process id currently in mmu & cache */
129 ulong ticks; /* of the clock since boot time */
130 Label sched; /* scheduler wakeup */
131 Lock alarmlock; /* access to alarm list */
132 void* alarm; /* alarms bound to this clock */
135 Proc* readied; /* for runproc */
136 ulong schedticks; /* next forced context switch */
146 vlong fastclock; /* last sampled value */
147 uvlong inidle; /* time spent in idlehands() */
151 Perf perf; /* performance counters */
153 int flushmmu; /* make current proc flush it's mmu state */
154 Proc *pid2proc[31]; /* what proc holds what pid */
155 int lastpid; /* highest assigned pid slot */
157 int cpumhz; /* speed of cpu */
158 vlong cpuhz; /* ... */
159 uvlong cyclefreq; /* Frequency of user readable cycle counter */
161 /* save areas for exceptions */
171 * Fake kmap since we direct map dram
174 #define VA(k) ((ulong)(k))
175 #define kmap(p) (KMap*)((p)->pa)
181 int machs; /* bitmap of active CPUs */
182 int exiting; /* shutdown */
183 int ispanic; /* shutdown in response to a panic */
186 #define MACHP(n) ((Mach *)(MACHADDR+(n)*BY2PG))
197 * PCMCIA structures known by both port/cis.c and the pcmcia driver
201 * Map between ISA memory space and PCMCIA card memory space.
204 ulong ca; /* card address */
205 ulong cea; /* card end address */
206 ulong isa; /* local virtual address */
207 int len; /* length of the ISA area */
208 int attr; /* attribute memory */
212 * a PCMCIA configuration entry
217 ushort irqs; /* legal irqs */
219 uchar bit16; /* true for 16 bit access */
242 long memlen; /* memory length */
243 uchar slotno; /* slot number */
244 void *regs; /* i/o registers */
245 void *mem; /* memory */
246 void *attr; /* attribute memory */
249 uchar occupied; /* card in the slot */
250 uchar configed; /* card configured */
251 uchar inserted; /* card just inserted */
253 Dev *dev; /* set in ctlwrite `configure' */
256 int cisread; /* set when the cis has been read */
257 char verstr[512]; /* version string */
258 int ncfg; /* number of configurations */
260 ushort cpresent; /* config registers present */
261 ulong caddr; /* relative address of config registers */
263 int nctab; /* number of config table entries */
265 PCMconftab *def; /* default conftab */
273 * hardware info about a device
282 RWlock; /* write: configure/unconfigure/suspend; read: normal access */
283 ulong mem; /* mapped memory address */
284 Devport *ports; /* ports[0]: mapped i/o regs, access size */
285 int nports; /* always 1 for the bitsy */
286 int itype; /* type of interrupt */
287 ulong intnum; /* interrupt number */
288 char *type; /* card type, mallocated */