From 28883a514b0e19748a425de05ec75893c4486e30 Mon Sep 17 00:00:00 2001 From: kensmith Date: Mon, 1 Mar 2004 19:19:15 +0000 Subject: [PATCH] The previous commit fixed -current on alpha for machines with serial console connections but not graphical consoles. This fixes the graphical console machines. It leaves the initial promcons console driver in place until a bit later in the boot sequence, delaying the switch to the device drivers more appropriate for the machine's real console setup. Note we still need the delayed make_dev() for promcons, it does not have a proper bus interface so unlike other console drivers it will not be found later during normal device discovery. Tested by: sepotvin videotron ca Root cause explained by: grehan (-current) Approved by: rwatson (mentor) --- sys/alpha/alpha/machdep.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 227c7fb676c..cff99c398e5 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -585,22 +585,6 @@ alpha_init(pfn, ptb, bim, bip, biv) } snprintf(cpu_model, sizeof(cpu_model), "%s", platform.model); - /* - * Initalize the real console, so the the bootstrap console is - * no longer necessary. - */ -#ifndef NO_SIO - if (platform.cons_init) { - platform.cons_init(); - promcndetach(); - } -#else - if (platform.cons_init) - platform.cons_init(); - promcndetach(); - cninit(); -#endif - /* NO MORE FIRMWARE ACCESS ALLOWED */ #ifdef _PMAP_MAY_USE_PROM_CONSOLE /* @@ -891,6 +875,24 @@ alpha_init(pfn, ptb, bim, bip, biv) #endif } + /* + * Initalize the real console, so the the bootstrap console is + * no longer necessary. Note this now involves mutexes as part + * of some operations so needs to be after proc0/thread0/curthread + * become valid. + */ +#ifndef NO_SIO + if (platform.cons_init) { + platform.cons_init(); + promcndetach(); + } +#else + if (platform.cons_init) + platform.cons_init(); + promcndetach(); + cninit(); +#endif + /* * Check to see if promcons needs to make_dev() now, * doing it before now crashes with kernel stack issues. -- 2.45.2