Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun2 move console initialization to cpu_startup() s...



details:   https://anonhg.NetBSD.org/src/rev/b92dbf4cf31a
branches:  trunk
changeset: 780589:b92dbf4cf31a
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jul 30 17:27:20 2012 +0000

description:
move console initialization to cpu_startup() so that we avoid multiple common.

diffstat:

 sys/arch/sun2/dev/consinit.c |  9 ++++++---
 sys/arch/sun2/sun2/machdep.c |  6 ++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 4da000c034ca -r b92dbf4cf31a sys/arch/sun2/dev/consinit.c
--- a/sys/arch/sun2/dev/consinit.c      Mon Jul 30 17:21:31 2012 +0000
+++ b/sys/arch/sun2/dev/consinit.c      Mon Jul 30 17:27:20 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.7 2009/12/27 08:41:50 tsutsui Exp $     */
+/*     $NetBSD: consinit.c,v 1.8 2012/07/30 17:27:20 christos Exp $    */
 
 /*-
  * Copyright (c) 2001 Matthew Fredette
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.7 2009/12/27 08:41:50 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.8 2012/07/30 17:27:20 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -98,9 +98,12 @@
 /*
  * The console table pointer is statically initialized
  * to point to the PROM (output only) table, so that
- * early calls to printf will work.
+ * early calls to printf will work. This has been moved
+ * to cpu_startup()
  */
+#if 0
 struct consdev *cn_tab = &consdev_prom;
+#endif
 
 void 
 prom_cnprobe(struct consdev *cd)
diff -r 4da000c034ca -r b92dbf4cf31a sys/arch/sun2/sun2/machdep.c
--- a/sys/arch/sun2/sun2/machdep.c      Mon Jul 30 17:21:31 2012 +0000
+++ b/sys/arch/sun2/sun2/machdep.c      Mon Jul 30 17:27:20 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.74 2012/07/28 19:08:25 matt Exp $        */
+/*     $NetBSD: machdep.c,v 1.75 2012/07/30 17:27:20 christos Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -149,7 +149,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2012/07/28 19:08:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.75 2012/07/30 17:27:20 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -258,6 +258,7 @@
 
 static void identifycpu(void);
 static void initcpu(void);
+extern struct consdev *cn_tab, consdev_prom;
 
 /*
  * cpu_startup: allocate memory for variable-sized tables,
@@ -274,6 +275,7 @@
        vaddr_t minaddr, maxaddr;
        char pbuf[9];
 
+       cn_tab = &consdev_prom;
        /*
         * Initialize message buffer (for kernel printf).
         * This is put in physical pages four through seven



Home | Main Index | Thread Index | Old Index