diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index bbd643915d07..1f03bf17cdd6 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -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 52eb48f5cad2..47c62786565a 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -96,6 +96,19 @@ ssc(u_int64_t in0, u_int64_t in1, u_int64_t in2, u_int64_t in3, int which) return ret0; } +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) { @@ -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);