Date: Wed, 24 Oct 2001 19:10:30 -0500 From: Jonathan Lemon <jlemon@flugsvamp.com> To: Matthew Jacob <mjacob@feral.com> Cc: Jonathan Lemon <jlemon@flugsvamp.com>, freebsd-alpha@freebsd.org Subject: Re: patch for multiple promcons && real cons goop Message-ID: <20011024191030.I75389@prism.flugsvamp.com> In-Reply-To: <Pine.BSF.4.21.0110241440100.82970-100000@beppo> References: <Pine.BSF.4.21.0110241440100.82970-100000@beppo>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011024191030.I75389>
