Use the MI console code to initialise the console.

This commit is contained in:
Doug Rabson 2001-09-15 15:31:59 +00:00
parent 91a8883e5b
commit f544a5b837
2 changed files with 17 additions and 15 deletions

View File

@ -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 */

View File

@ -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);