Deleted Added
sdiff udiff text old ( 22521 ) new ( 22564 )
full compact
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
37 * $FreeBSD: head/sys/i386/i386/autoconf.c 22521 1997-02-10 02:22:35Z dyson $
38 */
39
40/*
41 * Setup the system to run on the current machine.
42 *
43 * Configure() is called at boot time and initializes the vba
44 * device tables and the memory controller monitoring. Available
45 * devices are determined (from possibilities mentioned in ioconf.c),

--- 110 unchanged lines hidden (view full) ---

156 int i;
157
158 configure_start();
159
160 /* Allow all routines to decide for themselves if they want intrs */
161 enable_intr();
162 INTREN(IRQ_SLAVE);
163
164#if NCRD > 0
165 /* Before isa_configure to avoid ISA drivers finding our cards */
166 pccard_configure();
167#endif
168
169#if NEISA > 0
170 eisa_configure();
171#endif
172
173#if NPCI > 0
174 pci_configure();
175#endif
176
177#if NISA > 0
178 isa_configure();
179#endif
180
181 if (setdumpdev(dumpdev) != 0)
182 dumpdev = NODEV;
183
184 configure_finish();
185
186 cninit_finish();
187
188 if (bootverbose) {

--- 33 unchanged lines hidden (view full) ---

222#ifdef CD9660
223 if ((boothowto & RB_CDROM)) {
224 if (bootverbose)
225 printf("Considering CD-ROM root f/s.\n");
226 mountrootfsname = "cd9660";
227 }
228#endif
229
230#ifdef NFS
231 if (!mountrootfsname && nfs_diskless_valid) {
232 if (bootverbose)
233 printf("Considering NFS root f/s.\n");
234 mountrootfsname = "nfs";
235 }
236#endif /* NFS */
237
238#ifdef MFS_ROOT
239 if (!mountrootfsname) {
240 if (bootverbose)
241 printf("Considering MFS root f/s.\n");
242 mountrootfsname = "mfs";
243 /*
244 * Ignore the -a flag if this kernel isn't compiled
245 * with a generic root/swap configuration: if we skip
246 * setroot() and we aren't a generic kernel, chaos
247 * will ensue because setconf() will be a no-op.
248 * (rootdev is always initialized to NODEV in a
249 * generic configuration, so we test for that.)
250 */
251 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV)
252 setroot();
253 }
254#endif
255#ifdef FFS
256 if (!mountrootfsname) {
257 mountrootfsname = "ufs";
258 if (bootverbose)
259 printf("Considering FFS root f/s.\n");
260 /*
261 * Ignore the -a flag if this kernel isn't compiled
262 * with a generic root/swap configuration: if we skip
263 * setroot() and we aren't a generic kernel, chaos
264 * will ensue because setconf() will be a no-op.
265 * (rootdev is always initialized to NODEV in a
266 * generic configuration, so we test for that.)
267 */
268 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV)
269 setroot();
270 }
271#endif
272#ifdef LFS
273 if (!mountrootfsname) {
274 if (bootverbose)
275 printf("Considering LFS root f/s.\n");
276 mountrootfsname = "lfs";
277 /*
278 * Ignore the -a flag if this kernel isn't compiled
279 * with a generic root/swap configuration: if we skip
280 * setroot() and we aren't a generic kernel, chaos
281 * will ensue because setconf() will be a no-op.
282 * (rootdev is always initialized to NODEV in a
283 * generic configuration, so we test for that.)
284 */
285 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV)
286 setroot();
287 }
288#endif
289 if (!mountrootfsname) {
290 panic("Nobody wants to mount my root for me");
291 }
292
293 setconf();
294 cold = 0;
295 if (bootverbose)
296 printf("configure() finished.\n");

--- 95 unchanged lines hidden (view full) ---

392 ndumpdev = dumpdev;
393 error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
394 if (error == 0 && req->newptr != NULL)
395 error = setdumpdev(ndumpdev);
396 return (error);
397}
398
399SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW,
400 0, sizeof dumpdev, sysctl_kern_dumpdev, "I", "");