From owner-freebsd-alpha Wed Oct 24 17:12:13 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 961A037B401 for ; Wed, 24 Oct 2001 17:12:08 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f9P0AU615641; Wed, 24 Oct 2001 19:10:30 -0500 (CDT) (envelope-from jlemon) Date: Wed, 24 Oct 2001 19:10:30 -0500 From: Jonathan Lemon To: Matthew Jacob Cc: Jonathan Lemon , freebsd-alpha@freebsd.org Subject: Re: patch for multiple promcons && real cons goop Message-ID: <20011024191030.I75389@prism.flugsvamp.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: 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 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