Commit | Line | Data |
---|---|---|
cd68466f DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
86f9c1e9 | 3 | * All rights reserved. |
cd68466f | 4 | * |
86f9c1e9 | 5 | * Redistribution and use in source and binary forms are permitted |
b8c620d6 KB |
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. | |
86f9c1e9 | 16 | * |
b8c620d6 | 17 | * @(#)config.h 5.8 (Berkeley) %G% |
cd68466f | 18 | */ |
358ba8d4 | 19 | |
12c6954d | 20 | /* |
22d68ad0 | 21 | * Config. |
12c6954d | 22 | */ |
36edb824 SL |
23 | #include <sys/types.h> |
24 | ||
25 | #define NODEV ((dev_t)-1) | |
26 | ||
358ba8d4 | 27 | struct file_list { |
36edb824 | 28 | struct file_list *f_next; |
12c6954d | 29 | char *f_fn; /* the name */ |
3c812eeb SL |
30 | u_char f_type; /* see below */ |
31 | u_char f_flags; /* see below */ | |
3b3885f0 | 32 | short f_special; /* requires special make rule */ |
12c6954d | 33 | char *f_needs; |
36edb824 SL |
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 | |
358ba8d4 | 55 | }; |
3c812eeb SL |
56 | |
57 | /* | |
58 | * Types. | |
59 | */ | |
12c6954d BJ |
60 | #define DRIVER 1 |
61 | #define NORMAL 2 | |
62 | #define INVISIBLE 3 | |
63 | #define PROFILING 4 | |
36edb824 SL |
64 | #define SYSTEMSPEC 5 |
65 | #define SWAPSPEC 6 | |
358ba8d4 | 66 | |
3c812eeb SL |
67 | /* |
68 | * Attributes (flags). | |
69 | */ | |
70 | #define CONFIGDEP 1 | |
71 | ||
08f9a943 | 72 | struct idlst { |
12c6954d BJ |
73 | char *id; |
74 | struct idlst *id_next; | |
08f9a943 BJ |
75 | }; |
76 | ||
358ba8d4 | 77 | struct device { |
a0105456 | 78 | int d_type; /* CONTROLLER, DEVICE, bus adaptor */ |
12c6954d BJ |
79 | struct device *d_conn; /* what it is connected to */ |
80 | char *d_name; /* name of device (e.g. rk11) */ | |
22d68ad0 | 81 | struct idlst *d_vec; /* interrupt vectors */ |
12c6954d BJ |
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 */ | |
a5e18d6b MT |
87 | #define QUES -1 /* -1 means '?' */ |
88 | #define UNKNOWN -2 /* -2 means not set yet */ | |
821eeaae | 89 | int d_dk; /* if init 1 set to number for iostat */ |
12c6954d BJ |
90 | int d_flags; /* nlags for device init */ |
91 | struct device *d_next; /* Next one in list */ | |
358ba8d4 | 92 | }; |
22d68ad0 | 93 | #define TO_NEXUS (struct device *)-1 |
a0105456 | 94 | #define TO_VBA (struct device *)-2 |
358ba8d4 MT |
95 | |
96 | struct config { | |
12c6954d BJ |
97 | char *c_dev; |
98 | char *s_sysname; | |
358ba8d4 MT |
99 | }; |
100 | ||
12c6954d BJ |
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'', | |
05b83a6c | 105 | * it will build from ``Makefile.vax'' and use ``../vax/inline'' |
12c6954d BJ |
106 | * in the makerules, etc. |
107 | */ | |
108 | int machine; | |
109 | char *machinename; | |
110 | #define MACHINE_VAX 1 | |
a0105456 | 111 | #define MACHINE_TAHOE 2 |
12c6954d BJ |
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 | */ | |
a5e18d6b | 117 | struct cputype { |
12c6954d BJ |
118 | char *cpu_name; |
119 | struct cputype *cpu_next; | |
a5e18d6b | 120 | } *cputype; |
12c6954d BJ |
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. | |
7c1d4665 | 125 | * A separate set of options may be defined for make-style options. |
12c6954d | 126 | */ |
e809ccba | 127 | struct opt { |
12c6954d BJ |
128 | char *op_name; |
129 | char *op_value; | |
22d68ad0 | 130 | struct opt *op_next; |
7c1d4665 | 131 | } *opt, *mkopt; |
12c6954d | 132 | |
22d68ad0 BJ |
133 | char *ident; |
134 | char *ns(); | |
135 | char *tc(); | |
136 | char *qu(); | |
137 | char *get_word(); | |
138 | char *path(); | |
139 | char *raise(); | |
140 | ||
821eeaae | 141 | int do_trace; |
12c6954d | 142 | |
22d68ad0 BJ |
143 | char *index(); |
144 | char *rindex(); | |
145 | char *malloc(); | |
146 | char *strcpy(); | |
147 | char *strcat(); | |
22d68ad0 | 148 | |
12c6954d | 149 | #if MACHINE_VAX |
821eeaae | 150 | int seen_mba, seen_uba; |
12c6954d | 151 | #endif |
a0105456 SL |
152 | #if MACHINE_TAHOE |
153 | int seen_vba; | |
154 | #endif | |
12c6954d BJ |
155 | |
156 | struct device *connect(); | |
157 | struct device *dtab; | |
36edb824 SL |
158 | dev_t nametodev(); |
159 | char *devtoname(); | |
12c6954d BJ |
160 | |
161 | char errbuf[80]; | |
162 | int yyline; | |
163 | ||
36edb824 | 164 | struct file_list *ftab, *conf_list, **confp; |
12c6954d | 165 | |
22d68ad0 | 166 | int timezone, hadtz; |
12c6954d | 167 | int dst; |
8486638c | 168 | int profiling; |
12c6954d BJ |
169 | |
170 | int maxusers; | |
171 | ||
172 | #define eq(a,b) (!strcmp(a,b)) |