summaryrefslogtreecommitdiff
path: root/sys/arch/solbourne
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/solbourne
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/solbourne')
-rw-r--r--sys/arch/solbourne/solbourne/autoconf.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/arch/solbourne/solbourne/autoconf.c b/sys/arch/solbourne/solbourne/autoconf.c
index 48a6a185a04..a77b07b3c6d 100644
--- a/sys/arch/solbourne/solbourne/autoconf.c
+++ b/sys/arch/solbourne/solbourne/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.7 2007/05/04 19:30:55 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.8 2007/06/01 19:25:10 deraadt Exp $ */
/* OpenBSD: autoconf.c,v 1.64 2005/03/23 17:10:24 miod Exp */
/*
@@ -277,8 +277,6 @@ cpu_configure()
struct confargs oca;
register int node = 0;
register char *cp;
- struct bootpath *bp;
- struct device *bootdv;
int s;
extern struct user *proc0paddr;
@@ -305,15 +303,6 @@ cpu_configure()
((lda(GLU_ICR, ASI_PHYS_IO) >> 24) & ~GICR_DISABLE_ALL) << 24);
(void)spl0();
- /*
- * Configure swap area and related system
- * parameter based on device(s) used.
- */
- bp = nbootpath == 0 ? NULL : &bootpath[nbootpath-1];
- bootdv = (bp == NULL) ? NULL : bp->dev;
-
- setroot(bootdv, bp->val[2], RB_USERREQ | RB_HALT);
- dumpconf();
cold = 0;
/*
@@ -328,6 +317,23 @@ cpu_configure()
splx(s);
}
+void
+diskconf(void)
+{
+ struct bootpath *bp;
+ struct device *bootdv;
+
+ /*
+ * Configure swap area and related system
+ * parameter based on device(s) used.
+ */
+ bp = nbootpath == 0 ? NULL : &bootpath[nbootpath-1];
+ bootdv = (bp == NULL) ? NULL : bp->dev;
+
+ setroot(bootdv, bp->val[2], RB_USERREQ | RB_HALT);
+ dumpconf();
+}
+
/*
* Console `sync' command. SunOS just does a `panic: zero' so I guess
* no one really wants anything fancy...