autoconf.c (22521) | autoconf.c (22564) |
---|---|
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 | 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 $ | 37 * $FreeBSD: head/sys/i386/i386/autoconf.c 22564 1997-02-11 15:03:31Z bde $ |
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 | 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 | 164#if NEISA > 0 165 eisa_configure(); 166#endif 167 168#if NPCI > 0 169 pci_configure(); 170#endif 171 172#if NISA > 0 173 isa_configure(); 174#endif 175 |
176#if NCRD > 0 177 /* After everyone else has a chance at grabbing resources */ 178 pccard_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 | 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 | 230#ifdef MFS_ROOT 231 if (!mountrootfsname) { 232 if (bootverbose) 233 printf("Considering MFS root f/s.\n"); 234 mountrootfsname = "mfs"; 235 /* 236 * Ignore the -a flag if this kernel isn't compiled 237 * with a generic root/swap configuration: if we skip 238 * setroot() and we aren't a generic kernel, chaos 239 * will ensue because setconf() will be a no-op. 240 * (rootdev is always initialized to NODEV in a 241 * generic configuration, so we test for that.) 242 */ 243 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV) 244 setroot(); 245 } 246#endif |
247 248#ifdef NFS 249 if (!mountrootfsname && nfs_diskless_valid) { 250 if (bootverbose) 251 printf("Considering NFS root f/s.\n"); 252 mountrootfsname = "nfs"; 253 } 254#endif /* NFS */ 255 |
|
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 | 256#ifdef FFS 257 if (!mountrootfsname) { 258 mountrootfsname = "ufs"; 259 if (bootverbose) 260 printf("Considering FFS root f/s.\n"); 261 /* 262 * Ignore the -a flag if this kernel isn't compiled 263 * with a generic root/swap configuration: if we skip 264 * setroot() and we aren't a generic kernel, chaos 265 * will ensue because setconf() will be a no-op. 266 * (rootdev is always initialized to NODEV in a 267 * generic configuration, so we test for that.) 268 */ 269 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV) 270 setroot(); 271 } 272#endif |
273 |
|
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 | 274#ifdef LFS 275 if (!mountrootfsname) { 276 if (bootverbose) 277 printf("Considering LFS root f/s.\n"); 278 mountrootfsname = "lfs"; 279 /* 280 * Ignore the -a flag if this kernel isn't compiled 281 * with a generic root/swap configuration: if we skip 282 * setroot() and we aren't a generic kernel, chaos 283 * will ensue because setconf() will be a no-op. 284 * (rootdev is always initialized to NODEV in a 285 * generic configuration, so we test for that.) 286 */ 287 if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV) 288 setroot(); 289 } 290#endif |
291 |
|
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, | 292 if (!mountrootfsname) { 293 panic("Nobody wants to mount my root for me"); 294 } 295 296 setconf(); 297 cold = 0; 298 if (bootverbose) 299 printf("configure() finished.\n"); --- 95 unchanged lines hidden (view full) --- 395 ndumpdev = dumpdev; 396 error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); 397 if (error == 0 && req->newptr != NULL) 398 error = setdumpdev(ndumpdev); 399 return (error); 400} 401 402SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW, |
400 0, sizeof dumpdev, sysctl_kern_dumpdev, "I", ""); | 403 0, sizeof dumpdev, sysctl_kern_dumpdev, "T,dev_t", ""); |