From owner-freebsd-alpha Wed Oct 24 15: 0:43 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 F169C37B405 for ; Wed, 24 Oct 2001 15:00:33 -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 f9OM0UH91052; Wed, 24 Oct 2001 15:00:30 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 24 Oct 2001 15:00:30 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Jonathan Lemon Cc: freebsd-alpha@freebsd.org Subject: patch for multiple promcons && real cons goop 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 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