diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-07 15:23:37 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-07 15:23:37 +0000 |
commit | dc1de5c70a7188a19a185860862d94e49e27bead (patch) | |
tree | 85d964d678f709cfe6b230225f0843ea6103e474 /sys/kern | |
parent | 394ec342a8cb33d65a80f235deb61cc14578d2b7 (diff) |
Make sure config_init gets called before consinit, as at least one port
actually uses config_* functions for console attachment. Document
config_init should not call malloc as the move was over the mem-init
function calls too.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 5 | ||||
-rw-r--r-- | sys/kern/subr_autoconf.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index bd2c5250ad1..a76698e3ffb 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.7 1996/05/06 09:56:20 niklas Exp $ */ +/* $OpenBSD: init_main.c,v 1.8 1996/05/07 15:23:35 niklas Exp $ */ /* $NetBSD: init_main.c,v 1.84 1996/04/22 01:38:12 christos Exp $ */ /* @@ -171,17 +171,18 @@ main(framep) */ p = &proc0; curproc = p; + /* * Attempt to find console and initialize * in case of early panic or other messages. */ + config_init(); /* init autoconfiguration data structures */ consinit(); printf(copyright); vm_mem_init(); kmeminit(); disk_init(); /* must come before autoconfiguration */ - config_init(); /* init autoconfiguration data structures */ cpu_startup(); /* diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index ab73c7d2416..f72a1c5f364 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.5 1996/04/29 14:17:45 hvozda Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.6 1996/05/07 15:23:36 niklas Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -91,7 +91,9 @@ struct devicelist alldevs; /* list of all devices */ struct evcntlist allevents; /* list of all event counters */ /* - * Initialize autoconfiguration data structures. + * Initialize autoconfiguration data structures. This occurs before console + * initialization as that might require use of this subsystem. Furthermore + * this means that malloc et al. isn't yet available. */ void config_init() |