|
|
1.1 root 1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
6: * provided that the above copyright notice and this paragraph are
7: * duplicated in all such forms and that any documentation,
8: * advertising materials, and other materials related to such
9: * distribution and use acknowledge that the software was developed
10: * by the University of California, Berkeley. The name of the
11: * University may not be used to endorse or promote products derived
12: * from this software without specific prior written permission.
13: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: *
17: * @(#)config.h 5.8 (Berkeley) 6/18/88
18: */
19:
20: /*
21: * Config.
22: */
23: #include <sys/types.h>
24:
25: #define NODEV ((dev_t)-1)
26:
27: struct file_list {
28: struct file_list *f_next;
29: char *f_fn; /* the name */
30: u_char f_type; /* see below */
31: u_char f_flags; /* see below */
32: short f_special; /* requires special make rule */
33: char *f_needs;
34: /*
35: * Random values:
36: * swap space parameters for swap areas
37: * root device, etc. for system specifications
38: */
39: union {
40: struct { /* when swap specification */
41: dev_t fuw_swapdev;
42: int fuw_swapsize;
43: } fuw;
44: struct { /* when system specification */
45: dev_t fus_rootdev;
46: dev_t fus_argdev;
47: dev_t fus_dumpdev;
48: } fus;
49: } fun;
50: #define f_swapdev fun.fuw.fuw_swapdev
51: #define f_swapsize fun.fuw.fuw_swapsize
52: #define f_rootdev fun.fus.fus_rootdev
53: #define f_argdev fun.fus.fus_argdev
54: #define f_dumpdev fun.fus.fus_dumpdev
55: };
56:
57: /*
58: * Types.
59: */
60: #define DRIVER 1
61: #define NORMAL 2
62: #define INVISIBLE 3
63: #define PROFILING 4
64: #define SYSTEMSPEC 5
65: #define SWAPSPEC 6
66:
67: /*
68: * Attributes (flags).
69: */
70: #define CONFIGDEP 1
71:
72: struct idlst {
73: char *id;
74: struct idlst *id_next;
75: };
76:
77: struct device {
78: int d_type; /* CONTROLLER, DEVICE, bus adaptor */
79: struct device *d_conn; /* what it is connected to */
80: char *d_name; /* name of device (e.g. rk11) */
81: struct idlst *d_vec; /* interrupt vectors */
82: int d_pri; /* interrupt priority */
83: int d_addr; /* address of csr */
84: int d_unit; /* unit number */
85: int d_drive; /* drive number */
86: int d_slave; /* slave number */
87: #define QUES -1 /* -1 means '?' */
88: #define UNKNOWN -2 /* -2 means not set yet */
89: int d_dk; /* if init 1 set to number for iostat */
90: int d_flags; /* nlags for device init */
91: struct device *d_next; /* Next one in list */
92: };
93: #define TO_NEXUS (struct device *)-1
94: #define TO_VBA (struct device *)-2
95:
96: struct config {
97: char *c_dev;
98: char *s_sysname;
99: };
100:
101: /*
102: * Config has a global notion of which machine type is
103: * being used. It uses the name of the machine in choosing
104: * files and directories. Thus if the name of the machine is ``vax'',
105: * it will build from ``Makefile.vax'' and use ``../vax/inline''
106: * in the makerules, etc.
107: */
108: int machine;
109: char *machinename;
110: #define MACHINE_VAX 1
111: #define MACHINE_TAHOE 2
112:
113: /*
114: * For each machine, a set of CPU's may be specified as supported.
115: * These and the options (below) are put in the C flags in the makefile.
116: */
117: struct cputype {
118: char *cpu_name;
119: struct cputype *cpu_next;
120: } *cputype;
121:
122: /*
123: * A set of options may also be specified which are like CPU types,
124: * but which may also specify values for the options.
125: * A separate set of options may be defined for make-style options.
126: */
127: struct opt {
128: char *op_name;
129: char *op_value;
130: struct opt *op_next;
131: } *opt, *mkopt;
132:
133: char *ident;
134: char *ns();
135: char *tc();
136: char *qu();
137: char *get_word();
138: char *path();
139: char *raise();
140:
141: int do_trace;
142:
143: char *index();
144: char *rindex();
145: char *malloc();
146: char *strcpy();
147: char *strcat();
148:
149: #if MACHINE_VAX
150: int seen_mba, seen_uba;
151: #endif
152: #if MACHINE_TAHOE
153: int seen_vba;
154: #endif
155:
156: struct device *connect();
157: struct device *dtab;
158: dev_t nametodev();
159: char *devtoname();
160:
161: char errbuf[80];
162: int yyline;
163:
164: struct file_list *ftab, *conf_list, **confp;
165:
166: int timezone, hadtz;
167: int dst;
168: int profiling;
169:
170: int maxusers;
171:
172: #define eq(a,b) (!strcmp(a,b))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.