From owner-freebsd-alpha Wed Oct 24 19:48:37 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id B066937B401 for ; Wed, 24 Oct 2001 19:48:30 -0700 (PDT) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f9P2mNH92571; Wed, 24 Oct 2001 19:48:23 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 24 Oct 2001 19:48:22 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Jonathan Lemon Cc: freebsd-alpha@freebsd.org Subject: Re: patch for multiple promcons && real cons goop In-Reply-To: <20011024191030.I75389@prism.flugsvamp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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