summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1998-02-26 08:00:20 +0000
committerJason Wright <jason@cvs.openbsd.org>1998-02-26 08:00:20 +0000
commit8ed6cdea94096eca49b25fc916236a882cfdad5e (patch)
tree0e1991c08e0ffc9f27f6f2021b2fd28d18dd4f09 /sys/arch
parent17f0a43f74b1040f7adec398749710dbf7819c25 (diff)
Change order of cpu initialization to force the correct dmesg output.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/autoconf.c34
-rw-r--r--sys/arch/sparc/sparc/cpu.c16
-rw-r--r--sys/arch/sparc/sparc/machdep.c5
3 files changed, 19 insertions, 36 deletions
diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c
index 159dbe1f235..7811e9e8b1a 100644
--- a/sys/arch/sparc/sparc/autoconf.c
+++ b/sys/arch/sparc/sparc/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.23 1997/11/11 10:24:07 niklas Exp $ */
+/* $OpenBSD: autoconf.c,v 1.24 1998/02/26 08:00:14 jason Exp $ */
/* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */
/*
@@ -1143,11 +1143,6 @@ mainbus_attach(parent, dev, aux)
#if defined(SUN4)
if (CPU_ISSUN4) {
- /* Configure the CPU. */
- bzero(&oca, sizeof(oca));
- oca.ca_ra.ra_name = "cpu";
- (void)config_found(dev, (void *)&oca, mbprint);
-
/* Start at the beginning of the bootpath */
bzero(&oca, sizeof(oca));
oca.ca_ra.ra_bp = bootpath;
@@ -1177,33 +1172,6 @@ mainbus_attach(parent, dev, aux)
node = ca->ca_ra.ra_node; /* i.e., the root node */
- /* the first early device to be configured is the cpu */
- if (CPU_ISSUN4M) {
- /* XXX - what to do on multiprocessor machines? */
- register const char *cp;
-
- for (node = firstchild(node); node; node = nextsibling(node)) {
- cp = getpropstring(node, "device_type");
- if (strcmp(cp, "cpu") == 0) {
- bzero(&oca, sizeof(oca));
- oca.ca_ra.ra_node = node;
- oca.ca_ra.ra_name = "cpu";
- oca.ca_ra.ra_paddr = 0;
- oca.ca_ra.ra_nreg = 0;
- config_found(dev, (void *)&oca, mbprint);
- }
- }
- } else if (CPU_ISSUN4C) {
- bzero(&oca, sizeof(oca));
- oca.ca_ra.ra_node = node;
- oca.ca_ra.ra_name = "cpu";
- oca.ca_ra.ra_paddr = 0;
- oca.ca_ra.ra_nreg = 0;
- config_found(dev, (void *)&oca, mbprint);
- }
-
- node = ca->ca_ra.ra_node; /* re-init root node */
-
if (promvec->pv_romvec_vers <= 2)
/* remember which frame buffer, if any, is to be /dev/fb */
fbnode = getpropint(node, "fb", 0);
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c
index 9fa13f0ae5e..5014fdeefe6 100644
--- a/sys/arch/sparc/sparc/cpu.c
+++ b/sys/arch/sparc/sparc/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.10 1997/11/11 10:43:57 niklas Exp $ */
+/* $OpenBSD: cpu.c,v 1.11 1998/02/26 08:00:17 jason Exp $ */
/* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */
/*
@@ -93,6 +93,7 @@ char *fsrtoname __P((int, int, int, char *));
void cache_print __P((struct cpu_softc *));
void cpu_spinup __P((struct cpu_softc *));
void fpu_init __P((struct cpu_softc *));
+void identifycpu __P((void));
#define IU_IMPL(psr) ((u_int)(psr) >> 28)
#define IU_VERS(psr) (((psr) >> 24) & 0xf)
@@ -151,6 +152,18 @@ cpu_match(parent, vcf, aux)
return (strcmp(cf->cf_driver->cd_name, ca->ca_ra.ra_name) == 0);
}
+void
+identifycpu()
+{
+ struct cpu_softc sc;
+ struct confargs ca;
+
+ sc.node = 0;
+ ca.ca_ra.ra_node = 0;
+ strcpy(sc.dv.dv_xname, "cpu0");
+ cpu_attach(NULL, (struct device *)&sc, &ca);
+}
+
/*
* Attach the CPU.
* Discover interesting goop about the virtual address cache
@@ -182,6 +195,7 @@ cpu_attach(parent, self, aux)
}
if (sc->master) {
+ printf("%s", sc->dv.dv_xname);
/*
* Gross, but some things in cpuinfo may already have
* been setup by early routines like pmap_bootstrap().
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 9eeae6f112b..cb2c35004ff 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.29 1997/09/17 06:47:20 downsj Exp $ */
+/* $OpenBSD: machdep.c,v 1.30 1998/02/26 08:00:19 jason Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -142,6 +142,7 @@ static int ndvmamap; /* # of entries in dvmamap */
caddr_t allocsys __P((caddr_t));
void dumpsys __P((void));
void stackdump __P((void));
+void identifycpu __P((void));
/*
* Machine-dependent startup code
@@ -171,7 +172,7 @@ cpu_startup()
* Good {morning,afternoon,evening,night}.
*/
printf(version);
- /*identifycpu();*/
+ identifycpu();
#ifndef MACHINE_NONCONTIG
physmem = btoc(avail_end);
#endif