Date: Wed, 24 Oct 2001 19:48:22 -0700 (PDT) From: Matthew Jacob <mjacob@feral.com> To: Jonathan Lemon <jlemon@flugsvamp.com> Cc: freebsd-alpha@freebsd.org Subject: Re: patch for multiple promcons && real cons goop Message-ID: <Pine.BSF.4.21.0110241945450.92542-100000@beppo> In-Reply-To: <20011024191030.I75389@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
The only thing that it doesn't work 'fine' on is the Rawhide- but Rawhide is the only platform that actually does the 'right' thing about consoles- it waits until the actual h/w for at least the bus for the console is configured (the mcpcia that has the EISA bus on it) before calling the console init routine. Unfortunately and inexplicably this leads to the double character stuff getting *started* there *snort*... but I suggest that once some folks actually do some more testing for this it gets checked in anyhow because it makes *most* alphas have readable kernel printfs again. In my limited time I'll be looking at the rawhide issues. -matt On Wed, 24 Oct 2001, Jonathan Lemon wrote: > It looks good - and works fine on my DS20 here. > -- > Jonathan > > > On Wed, Oct 24, 2001 at 03:00:30PM -0700, Matthew Jacob wrote: > > > > Can folks try this? It seems to work for me on at least 2 platforms- including > > the odd on (turbolaser). I haven't tried it yet on a rawhide, nor have I tried > > it with a graphics console. > > > > Index: alpha/alpha/machdep.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v > > retrieving revision 1.150 > > diff -u -r1.150 machdep.c > > --- alpha/alpha/machdep.c 2001/10/21 22:16:44 1.150 > > +++ alpha/alpha/machdep.c 2001/10/24 21:52:25 > > @@ -621,9 +622,10 @@ > > * 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 > > /* > > Index: alpha/alpha/promcons.c > > =================================================================== > > RCS file: /home/ncvs/src/sys/alpha/alpha/promcons.c,v > > retrieving revision 1.21 > > diff -u -r1.21 promcons.c > > --- alpha/alpha/promcons.c 2001/10/24 18:30:03 1.21 > > +++ alpha/alpha/promcons.c 2001/10/24 21:52:25 > > @@ -263,6 +263,7 @@ > > > > CONS_DRIVER(prom, NULL, NULL, NULL, promcngetc, promcncheckc, promcnputc, NULL); > > > > +static int promcn_attached = 0; > > void > > promcnattach(int alpha_console) > > { > > @@ -270,8 +271,17 @@ > > 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 > > */ > > Index: alpha/include/prom.h > > =================================================================== > > RCS file: /home/ncvs/src/sys/alpha/include/prom.h,v > > retrieving revision 1.6 > > diff -u -r1.6 prom.h > > --- alpha/include/prom.h 2000/03/18 08:00:51 1.6 > > +++ alpha/include/prom.h 2001/10/24 21:52:25 > > @@ -96,6 +96,7 @@ > > #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)); > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110241945450.92542-100000>