|
|
1.1 root 1: typedef int (*SIG_TYP)();
2: SIG_TYP signal();
3: typedef unsigned char u_char;
4: typedef unsigned short u_short;
5: typedef unsigned int u_int;
6: typedef unsigned long u_long;
7: typedef struct _physadr { int r[1]; } *physadr;
8: typedef int daddr_t;
9: typedef char * caddr_t;
10: typedef u_short ino_t;
11: typedef int swblk_t;
12: typedef int size_t;
13: typedef int time_t;
14: typedef int label_t[14];
15: typedef short dev_t;
16: typedef int off_t;
17: typedef long portid_t;
18: typedef struct fd_set { int fds_bits[1]; } fd_set;
19: int hz;
20: int timezone;
21: int dstflag;
22: char canonb[256 ];
23: extern char version[];
24: int lbolt;
25: time_t time;
26: time_t bootime;
27: long trannum;
28: int hand;
29: int nblkdev;
30: int nchrdev;
31: int nstream;
32: int nswdev;
33: int mpid;
34: char runin;
35: char runout;
36: int runrun;
37: char kmapwnt;
38: char curpri;
39: int maxmem;
40: int physmem;
41: int nswap;
42: int updlock;
43: daddr_t rablock;
44: extern int intstack[];
45: dev_t rootdev;
46: dev_t dumpdev;
47: long dumplo;
48: dev_t swapdev;
49: dev_t argdev;
50: dev_t pipedev;
51: extern int icode[];
52: extern int szicode;
53: dev_t getmdev();
54: daddr_t bmap();
55: caddr_t calloc();
56: unsigned max();
57: unsigned min();
58: int memall();
59: int uchar(), schar();
60: int vmemall();
61: char *wmemall();
62: swblk_t vtod();
63: extern struct sysent
64: {
65: int sy_narg;
66: int (*sy_call)();
67: } sysent[];
68: extern char vmmap[];
69: int umbabeg,umbaend;
70: int noproc;
71: extern int catcher[256];
72: char *panicstr;
73: int wantin;
74: int boothowto;
75: struct map {
76: struct mapent *m_limit;
77: char *m_name;
78: };
79: struct mapent
80: {
81: int m_size;
82: int m_addr;
83: };
84: struct nexus {
85: union nexcsr {
86: long nex_csr;
87: u_char nex_type;
88: } nexcsr;
89: long nex_pad[0x2000 / sizeof (long) - 1];
90: };
91: struct pte
92: {
93: unsigned int pg_pfnum:21,
94: :2,
95: pg_vreadm:1,
96: pg_swapm:1,
97: pg_fod:1,
98: pg_m:1,
99: pg_prot:4,
100: pg_v:1;
101: };
102: struct hpte
103: {
104: unsigned int pg_pfnum:21,
105: :2,
106: pg_high:9;
107: };
108: struct fpte
109: {
110: unsigned int pg_blkno:20,
111: pg_fileno:5,
112: pg_fod:1,
113: :1,
114: pg_prot:4,
115: pg_v:1;
116: };
117: struct bufhd
118: {
119: long b_flags;
120: struct buf *b_forw, *b_back;
121: };
122: struct buf
123: {
124: long b_flags;
125: struct buf *b_forw, *b_back;
126: struct buf *av_forw, *av_back;
127: long b_bcount;
128: short b_error;
129: dev_t b_dev;
130: union {
131: caddr_t b_addr;
132: int *b_words;
133: struct filsys *b_filsys;
134: struct dinode *b_dino;
135: daddr_t *b_daddr;
136: } b_un;
137: daddr_t b_blkno;
138: long b_resid;
139: struct proc *b_proc;
140: };
141: struct mba_regs
142: {
143: int mba_csr;
144: int mba_cr;
145: int mba_sr;
146: int mba_var;
147: int mba_bcr;
148: int mba_dr;
149: int mba_pad1[250];
150: struct mba_drv {
151: int mbd_cs1;
152: int mbd_ds;
153: int mbd_er1;
154: int mbd_mr1;
155: int mbd_as;
156: int mbd_da;
157: int mbd_dt;
158: int mbd_la;
159: int mbd_sn;
160: int mbd_of;
161: int mbd_fill[22];
162: } mba_drv[8];
163: struct pte mba_map[256];
164: int mba_pad2[256*5];
165: };
166: struct mba_hd {
167: short mh_active;
168: short mh_ndrive;
169: struct mba_regs *mh_mba;
170: struct mba_regs *mh_physmba;
171: struct mba_device *mh_mbip[8];
172: struct mba_device *mh_actf;
173: struct mba_device *mh_actl;
174: };
175: struct mba_device {
176: struct mba_driver *mi_driver;
177: short mi_unit;
178: short mi_mbanum;
179: short mi_drive;
180: short mi_dk;
181: short mi_alive;
182: short mi_type;
183: struct buf mi_tab;
184: struct mba_device *mi_forw;
185: struct mba_regs *mi_mba;
186: struct mba_drv *mi_drv;
187: struct mba_hd *mi_hd;
188: };
189: struct mba_slave {
190: struct mba_driver *ms_driver;
191: short ms_ctlr;
192: short ms_unit;
193: short ms_slave;
194: short ms_alive;
195: };
196: struct mba_driver {
197: int (*md_attach)();
198: int (*md_slave)();
199: int (*md_ustart)();
200: int (*md_start)();
201: int (*md_dtint)();
202: int (*md_ndint)();
203: short *md_type;
204: char *md_dname, *md_sname;
205: struct mba_device **md_info;
206: };
207:
208:
209: struct vmmeter
210: {
211: unsigned v_swtch;
212: unsigned v_trap;
213: unsigned v_syscall;
214: unsigned v_intr;
215: unsigned v_pdma;
216: unsigned v_pswpin;
217: unsigned v_pswpout;
218: unsigned v_pgin;
219: unsigned v_pgout;
220: unsigned v_pgpgin;
221: unsigned v_pgpgout;
222: unsigned v_intrans;
223: unsigned v_pgrec;
224: unsigned v_xsfrec;
225: unsigned v_xifrec;
226: unsigned v_exfod;
227: unsigned v_zfod;
228: unsigned v_vrfod;
229: unsigned v_nexfod;
230: unsigned v_nzfod;
231: unsigned v_nvrfod;
232: unsigned v_pgfrec;
233: unsigned v_faults;
234: unsigned v_scan;
235: unsigned v_rev;
236: unsigned v_seqfree;
237: unsigned v_dfree;
238: unsigned v_swpin;
239: unsigned v_swpout;
240: };
241: struct vmtotal
242: {
243: short t_rq;
244: short t_dw;
245: short t_pw;
246: short t_sl;
247: short t_sw;
248: int t_vm;
249: int t_avm;
250: short t_rm;
251: short t_arm;
252: int t_vmtxt;
253: int t_avmtxt;
254: short t_rmtxt;
255: short t_armtxt;
256: short t_free;
257: };
258: struct forkstat
259: {
260: int cntfork;
261: int cntvfork;
262: int sizfork;
263: int sizvfork;
264: };
265: struct swptstat
266: {
267: int pteasy;
268: int ptexpand;
269: int ptshrink;
270: int ptpack;
271: };
272: struct uba_regs
273: {
274: int uba_cnfgr;
275: int uba_cr;
276: int uba_sr;
277: int uba_dcr;
278: int uba_fmer;
279: int uba_fubar;
280: int pad1[2];
281: int uba_brsvr[4];
282: int uba_brrvr[4];
283: int uba_dpr[16];
284: int pad2[480];
285: struct pte uba_map[496];
286: int pad3[16];
287: };
288:
289:
290: struct uba_hd {
291: struct uba_regs *uh_uba;
292: struct uba_regs *uh_physuba;
293: int (**uh_vec)();
294: struct uba_device *uh_actf;
295: struct uba_device *uh_actl;
296: short uh_mrwant;
297: short uh_bdpwant;
298: int uh_bdpfree;
299: int uh_hangcnt;
300: int uh_zvcnt;
301: int uh_errcnt;
302: int uh_lastiv;
303: short uh_users;
304: short uh_xclu;
305: struct map *uh_map;
306: };
307: struct uba_ctlr {
308: struct uba_driver *um_driver;
309: short um_ctlr;
310: short um_ubanum;
311: short um_alive;
312: int (**um_intr)();
313: caddr_t um_addr;
314: struct uba_hd *um_hd;
315: int um_cmd;
316: int um_ubinfo;
317: struct buf um_tab;
318: };
319: struct uba_device {
320: struct uba_driver *ui_driver;
321: short ui_unit;
322: short ui_ctlr;
323: short ui_ubanum;
324: short ui_slave;
325: int (**ui_intr)();
326: caddr_t ui_addr;
327: short ui_dk;
328: int ui_flags;
329: short ui_alive;
330: short ui_type;
331: caddr_t ui_physaddr;
332: struct uba_device *ui_forw;
333: struct uba_ctlr *ui_mi;
334: struct uba_hd *ui_hd;
335: };
336: struct uba_driver {
337: int (*ud_probe)();
338: int (*ud_slave)();
339: int (*ud_attach)();
340: int (*ud_dgo)();
341: u_short *ud_addr;
342: char *ud_dname;
343: struct uba_device **ud_dinfo;
344: char *ud_mname;
345: struct uba_ctlr **ud_minfo;
346: short ud_xclu;
347: };
348: union cpusid {
349: int cpusid;
350: struct cpuany {
351: u_int :24,
352: cp_type:8;
353: } cpuany;
354: struct cpu780 {
355: u_int cp_sno:12,
356: cp_plant:3,
357: cp_eco:9,
358: cp_type:8;
359: } cpu780;
360: struct cpu750 {
361: u_int cp_hrev:8,
362: cp_urev:8,
363: :8,
364: cp_type:8;
365: } cpu750;
366:
367: };
368: struct percpu {
369: short pc_cputype;
370: short pc_nnexus;
371: struct nexus *pc_nexbase;
372: caddr_t *pc_umaddr;
373: short pc_nubabdp;
374: short pc_haveubasr;
375: short *pc_nextype;
376: };
377: struct scb {
378: int (*scb_stray)();
379: int (*scb_machchk)();
380: int (*scb_kspinval)();
381: int (*scb_powfail)();
382: int (*scb_resinstr)();
383: int (*scb_custinst)();
384: int (*scb_resopnd)();
385: int (*scb_resaddr)();
386: int (*scb_acv)();
387: int (*scb_tnv)();
388: int (*scb_tracep)();
389: int (*scb_bpt)();
390: int (*scb_compat)();
391: int (*scb_arith)();
392: int (*scb_stray2)();
393: int (*scb_stray3)();
394: int (*scb_chmk)();
395: int (*scb_chme)();
396: int (*scb_chms)();
397: int (*scb_chmu)();
398: int (*scb_sbisilo)();
399: int (*scb_cmrd)();
400: int (*scb_sbialert)();
401: int (*scb_sbiflt)();
402: int (*scb_wtime)();
403: int (*scb_stray4[8])();
404: int (*scb_soft[15])();
405: int (*scb_timer)();
406: int (*scb_stray5[7])();
407: int (*scb_stray6[4])();
408: int (*scb_csdr)();
409: int (*scb_csdx)();
410: int (*scb_ctr)();
411: int (*scb_ctx)();
412: int (*scb_ipl14[16])();
413: int (*scb_ipl15[16])();
414: int (*scb_ipl16[16])();
415: int (*scb_ipl17[16])();
416: int (*scb_ubaint[128])();
417: };
418: struct mcr {
419: int mc_reg[3];
420: };
421: unifind(vubp, pubp, vumem, pumem, memmap)
422: struct uba_regs *vubp, *pubp;
423: caddr_t vumem, pumem;
424: struct pte *memmap;
425: {
426:
427:
428:
429:
430: struct uba_hd *uhp;
431:
432: int i, haveubasr = 0;
433: for (i = 0; i < 128; i++)
434: uhp->uh_vec[i] =
435: ((int (*)())(((int)&catcher[i*2])+ 1));
436: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.