summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-09-15 15:31:59 +0000
committerdfr <dfr@FreeBSD.org>2001-09-15 15:31:59 +0000
commit0593e3e8a07f919d1b3b12ffd53d2a2ad2cdafbe (patch)
treec98ded39b2a2d0c306bce84b96789bf26dbc56f4
parent983e3898daa4574db5771d723de290095b2feb8d (diff)
downloadFreeBSD-src-0593e3e8a07f919d1b3b12ffd53d2a2ad2cdafbe.zip
FreeBSD-src-0593e3e8a07f919d1b3b12ffd53d2a2ad2cdafbe.tar.gz
Use the MI console code to initialise the console.
-rw-r--r--sys/ia64/ia64/machdep.c8
-rw-r--r--sys/ia64/ia64/ssc.c24
2 files changed, 17 insertions, 15 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index bbd6439..1f03bf1 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -52,6 +52,7 @@
#include <sys/uio.h>
#include <sys/linker.h>
#include <sys/random.h>
+#include <sys/cons.h>
#include <net/netisr.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
@@ -383,12 +384,9 @@ ia64_init()
*/
/*
- * Initalize the (temporary) bootstrap console interface, so
- * we can use printf until the VM system starts being setup.
- * The real console is initialized before then.
- * TODO: I guess we start with a serial console here.
+ * Initialize the console before we print anything out.
*/
- ssccnattach();
+ cninit();
/* OUTPUT NOW ALLOWED */
diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c
index 52eb48f..47c6278 100644
--- a/sys/ia64/ia64/ssc.c
+++ b/sys/ia64/ia64/ssc.c
@@ -97,6 +97,19 @@ ssc(u_int64_t in0, u_int64_t in1, u_int64_t in2, u_int64_t in3, int which)
}
static void
+ssccnprobe(struct consdev *cp)
+{
+ cp->cn_dev = makedev(CDEV_MAJOR, 0);
+ cp->cn_pri = CN_NORMAL;
+}
+
+static void
+ssccninit(struct consdev *cp)
+{
+ make_dev(&ssc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ssccons");
+}
+
+static void
ssccnputc(dev_t dev, int c)
{
ssc(c, 0, 0, 0, SSC_PUTCHAR);
@@ -258,13 +271,4 @@ ssctimeout(void *v)
ssctimeouthandle = timeout(ssctimeout, tp, polltime);
}
-CONS_DRIVER(ssc, NULL, NULL, NULL, ssccngetc, ssccncheckc, ssccnputc, NULL);
-
-void
-ssccnattach(void)
-{
- cn_tab = &ssc_consdev;
- ssc_consdev.cn_pri = CN_NORMAL;
- ssc_consdev.cn_dev = makedev(CDEV_MAJOR, 0);
- make_dev(&ssc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ssccons");
-}
+CONS_DRIVER(ssc, ssccnprobe, ssccninit, NULL, ssccngetc, ssccncheckc, ssccnputc, NULL);
OpenPOWER on IntegriCloud