Module Name: src
Committed By: christos
Date: Mon Jul 30 17:27:20 UTC 2012
Modified Files:
src/sys/arch/sun2/dev: consinit.c
src/sys/arch/sun2/sun2: machdep.c
Log Message:
move console initialization to cpu_startup() so that we avoid multiple common.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sun2/dev/consinit.c
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sun2/sun2/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sun2/dev/consinit.c
diff -u src/sys/arch/sun2/dev/consinit.c:1.7 src/sys/arch/sun2/dev/consinit.c:1.8
--- src/sys/arch/sun2/dev/consinit.c:1.7 Sun Dec 27 03:41:50 2009
+++ src/sys/arch/sun2/dev/consinit.c Mon Jul 30 13:27:20 2012
@@ -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 @@ struct consdev consdev_prom = {
/*
* 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)
Index: src/sys/arch/sun2/sun2/machdep.c
diff -u src/sys/arch/sun2/sun2/machdep.c:1.74 src/sys/arch/sun2/sun2/machdep.c:1.75
--- src/sys/arch/sun2/sun2/machdep.c:1.74 Sat Jul 28 15:08:25 2012
+++ src/sys/arch/sun2/sun2/machdep.c Mon Jul 30 13:27:20 2012
@@ -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 vaddr_t dumppage;
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 @@ cpu_startup(void)
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