summaryrefslogtreecommitdiff
path: root/sys/arch/cats
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-01 19:25:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-06-01 19:25:11 +0000
commit9c5a2e4c4f28b5ccad97ba01105a6a578f413e57 (patch)
tree83a977fda25aa6268bb006b9257444599adee9b5 /sys/arch/cats
parentfb46e3f564238bbc25c79e1509ce9b3484d74b33 (diff)
some architectures called setroot() from cpu_configure(), *way* before some
subsystems were enabled. others used a *md_diskconf -> diskconf() method to make sure init_main could "do late setroot". Change all architectures to have diskconf(), use it directly & late. tested by todd and myself on most architectures, ok miod too
Diffstat (limited to 'sys/arch/cats')
-rw-r--r--sys/arch/cats/cats/autoconf.c54
1 files changed, 25 insertions, 29 deletions
diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c
index 61ca4d39596..eda554068bf 100644
--- a/sys/arch/cats/cats/autoconf.c
+++ b/sys/arch/cats/cats/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.11 2007/05/19 15:49:05 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.12 2007/06/01 19:25:09 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */
/*
@@ -63,33 +63,6 @@ extern char *boot_file;
void isa_intr_init(void);
-void diskconf(void);
-
-/*
- * Now that we are fully operational, we can checksum the
- * disks, and using some heuristics, hopefully are able to
- * always determine the correct root disk.
- */
-void
-diskconf()
-{
-#if 0
- /*
- * Configure root, swap, and dump area. This is
- * currently done by running the same checksum
- * algorithm over all known disks, as was done in
- * /boot. Then we basically fixup the *dev vars
- * from the info we gleaned from this.
- */
- dkcsumattach();
-#endif
-
- printf("boot_file: '%s'\n", boot_file);
- setroot(bootdv, 0, RB_USERREQ);
- dumpconf();
-}
-
-
/*
* void cpu_configure()
*
@@ -115,7 +88,6 @@ cpu_configure(void)
* We can not know which is our root disk, defer
* until we can checksum blocks to figure it out.
*/
- md_diskconf = diskconf;
cold = 0;
/* Time to start taking interrupts so lets open the flood gates .... */
@@ -123,6 +95,30 @@ cpu_configure(void)
}
+/*
+ * Now that we are fully operational, we can checksum the
+ * disks, and using some heuristics, hopefully are able to
+ * always determine the correct root disk.
+ */
+void
+diskconf(void)
+{
+#if 0
+ /*
+ * Configure root, swap, and dump area. This is
+ * currently done by running the same checksum
+ * algorithm over all known disks, as was done in
+ * /boot. Then we basically fixup the *dev vars
+ * from the info we gleaned from this.
+ */
+ dkcsumattach();
+#endif
+
+ printf("boot_file: '%s'\n", boot_file);
+ setroot(bootdv, 0, RB_USERREQ);
+ dumpconf();
+}
+
struct nam2blk nam2blk[] = {
{ "wd", 16 },
{ "sd", 24 },