Detach the prom console when platform.cons_init is called. This seems
to avoid most of the double character kernel goop we've been having by having both a prom console && a normal console. Was not able to test with graphics head. Hope this doesn't break anything. Reviewed by: silence on alpha
This commit is contained in:
parent
5f7806ab69
commit
831039f850
@ -145,6 +145,7 @@
|
||||
#include <sys/vnode.h>
|
||||
#include <machine/sigframe.h>
|
||||
|
||||
|
||||
u_int64_t cycles_per_usec;
|
||||
u_int32_t cycles_per_sec;
|
||||
int cold = 1;
|
||||
@ -621,9 +622,10 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
||||
* Initalize the real console, so the the bootstrap console is
|
||||
* no longer necessary.
|
||||
*/
|
||||
if (platform.cons_init)
|
||||
if (platform.cons_init) {
|
||||
platform.cons_init();
|
||||
|
||||
promcndetach();
|
||||
}
|
||||
/* NO MORE FIRMWARE ACCESS ALLOWED */
|
||||
#ifdef _PMAP_MAY_USE_PROM_CONSOLE
|
||||
/*
|
||||
|
@ -263,6 +263,7 @@ DEV_MODULE(prom, prom_modevent, 0);
|
||||
|
||||
CONS_DRIVER(prom, NULL, NULL, NULL, promcngetc, promcncheckc, promcnputc, NULL);
|
||||
|
||||
static int promcn_attached = 0;
|
||||
void
|
||||
promcnattach(int alpha_console)
|
||||
{
|
||||
@ -270,8 +271,17 @@ promcnattach(int alpha_console)
|
||||
prom_consdev.cn_dev = makedev(CDEV_MAJOR, 0);
|
||||
make_dev(&prom_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "promcons");
|
||||
cnadd(&prom_consdev);
|
||||
promcn_attached = 1;
|
||||
}
|
||||
|
||||
void
|
||||
promcndetach(void)
|
||||
{
|
||||
if (promcn_attached) {
|
||||
cnremove(&prom_consdev);
|
||||
promcn_attached = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* promcnputc, promcngetc and promchcheckc in prom.c for layering reasons
|
||||
*/
|
||||
|
@ -96,6 +96,7 @@ int prom_getenv __P((int, char *, int));
|
||||
#ifndef ASSEMBLER
|
||||
#ifdef _KERNEL
|
||||
void promcnattach __P((int));
|
||||
void promcndetach __P((void));
|
||||
void promcnputc __P((dev_t, int));
|
||||
int promcngetc __P((dev_t));
|
||||
int promcncheckc __P((dev_t));
|
||||
|
Loading…
Reference in New Issue
Block a user