* [parisc-linux] Console @ 2000-12-21 21:18 Matthew Wilcox 2000-12-21 21:28 ` Matthew Wilcox 0 siblings, 1 reply; 6+ messages in thread From: Matthew Wilcox @ 2000-12-21 21:18 UTC (permalink / raw) To: parisc-linux; +Cc: tytso We were doing some very dubious things with our console; I hope I've now fixed them. The problem was that we can't output from the serial port until we've done all the GSC and LASI setup, which is very late in the boot sequence. The current serial console code just guesses, and gets lucky on x86, that it can output bytes to the serial port. This crashes for us because it assumes it can use outb when it should be using gsc_readb. So I've moved the call to initialise the serial console to the serial driver, after it does its own setup. This makes much more sense (the serial console code might now be simplifiable, I haven't checked). Of course, we'd like to see a bit of output before we get to that point. So we still register the PDC console, crappy as it is, very early on in the boot sequence (slightly later now than before, but it wasn't used up until that point anyway, because none of the console system was activated). However, if you just do that and don't frob the dmesg log (nasty, nasty!), you get everything twice. So I invented a new console flag, CON_BOOT. the register_console() interface notices that the previous console was CON_BOOT, removes it and doesn't display the log to that point as it assumes you've already seen it on the boot console. I hope other architectures can take advantage of this small piece of infrastructure. Ted, are you the console maintainer? -- Revolutions do not require corporate support. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [parisc-linux] Console 2000-12-21 21:18 [parisc-linux] Console Matthew Wilcox @ 2000-12-21 21:28 ` Matthew Wilcox 2000-12-22 11:19 ` Richard Hirst 2000-12-23 13:37 ` Matthew Wilcox 0 siblings, 2 replies; 6+ messages in thread From: Matthew Wilcox @ 2000-12-21 21:28 UTC (permalink / raw) To: Matthew Wilcox; +Cc: parisc-linux, tytso Couple of things I forgot to mention... you may now want to specify `console=ttyS0' in the palo makefile... though thinking about it now, you may not need to. I've only tried it with, not without. I haven't tested STI console with these changes. I don't have a monitor/kbd for my 712. Someone should test this, and remove the calls to pdc_console_die (and remove pdc_console_die altogether). -- Revolutions do not require corporate support. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [parisc-linux] Console 2000-12-21 21:28 ` Matthew Wilcox @ 2000-12-22 11:19 ` Richard Hirst 2000-12-22 13:38 ` Matthew Wilcox 2000-12-23 13:37 ` Matthew Wilcox 1 sibling, 1 reply; 6+ messages in thread From: Richard Hirst @ 2000-12-22 11:19 UTC (permalink / raw) To: Matthew Wilcox; +Cc: parisc-linux, tytso On Thu, Dec 21, 2000 at 09:28:55PM +0000, Matthew Wilcox wrote: > > Couple of things I forgot to mention... > > you may now want to specify `console=ttyS0' in the palo makefile... though > thinking about it now, you may not need to. I've only tried it with, not > without. Yes, you do need `console=ttyS0' now. Otherwise you get "cannot open initial console" and then silence until the login prompt. dmesg works nicely though :) Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [parisc-linux] Console 2000-12-22 11:19 ` Richard Hirst @ 2000-12-22 13:38 ` Matthew Wilcox 0 siblings, 0 replies; 6+ messages in thread From: Matthew Wilcox @ 2000-12-22 13:38 UTC (permalink / raw) To: Richard Hirst; +Cc: Matthew Wilcox, parisc-linux, tytso On Fri, Dec 22, 2000 at 11:19:12AM +0000, Richard Hirst wrote: > Yes, you do need `console=ttyS0' now. Otherwise you get "cannot open > initial console" and then silence until the login prompt. > > dmesg works nicely though :) Yay :-) I just committed a change to PALO which ought to make this work. I must confess though, I'm not clear where it gets the CONFIG_ variables from. are they in the environment? -- Revolutions do not require corporate support. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [parisc-linux] Console 2000-12-21 21:28 ` Matthew Wilcox 2000-12-22 11:19 ` Richard Hirst @ 2000-12-23 13:37 ` Matthew Wilcox 2000-12-31 0:07 ` Matthew Wilcox 1 sibling, 1 reply; 6+ messages in thread From: Matthew Wilcox @ 2000-12-23 13:37 UTC (permalink / raw) To: Matthew Wilcox; +Cc: parisc-linux On Thu, Dec 21, 2000 at 09:28:55PM +0000, Matthew Wilcox wrote: > I haven't tested STI console with these changes. I don't have a > monitor/kbd for my 712. Someone should test this, and remove the calls > to pdc_console_die (and remove pdc_console_die altogether). here's a patch which does this. please let me know how this works out for you. Index: arch/parisc/kernel/pdc_cons.c =================================================================== RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/pdc_cons.c,v retrieving revision 1.22 diff -u -p -r1.22 pdc_cons.c --- pdc_cons.c 2000/12/21 21:04:20 1.22 +++ pdc_cons.c 2000/12/23 13:10:45 @@ -66,7 +66,7 @@ static void pdc_console_write(struct con pdc_putc(*s++); } -int pdc_console_wait_key(struct console *co) +static int pdc_console_wait_key(struct console *co) { int ch = 'X'; int status; @@ -96,11 +96,6 @@ int pdc_getc(void) return pdc_console_wait_key(NULL); } -static int pdc_console_setup(struct console *co, char *options) -{ - return 0; -} - static struct console pdc_cons = { name: "ttyB", write: pdc_console_write, @@ -108,19 +103,19 @@ static struct console pdc_cons = { device: NULL, wait_key: pdc_console_wait_key, unblank: NULL, - setup: pdc_console_setup, + setup: NULL, flags: CON_BOOT|CON_PRINTBUFFER|CON_ENABLED, // |CON_CONSDEV, index: -1, }; static int pdc_console_initialized; -void pdc_console_init(void) +void __init pdc_console_init(void) { if (pdc_console_initialized) return; - ++pdc_console_initialized; - + pdc_console_initialized = 1; + /* If the console is duplex then copy the COUT parameters to CIN. */ if (PAGE0->mem_cons.cl_class == CL_DUPLEX) memcpy(&PAGE0->mem_kbd, &PAGE0->mem_cons, sizeof(PAGE0->mem_cons)); @@ -130,32 +125,6 @@ void pdc_console_init(void) register_console(&pdc_cons); } - -/* Unregister the pdc console with the printk console layer */ -void pdc_console_die(void) -{ - extern unsigned long log_size; /* kernel/printk.c */ - - printk("Switching from PDC console\n"); - if (!pdc_console_initialized) - return; - --pdc_console_initialized; - - /* Don't repeat what we've already printed */ - log_size = 0; - -#ifdef CONFIG_VT_CONSOLE - { - /* fixme (needed?): Wait for console-tasklet to finish !*/ - extern struct tasklet_struct console_tasklet; - tasklet_schedule(&console_tasklet); - } -#endif - - unregister_console(&pdc_cons); -} - - /* * Used for emergencies. Currently only used if an HPMC occurs. If an * HPMC occurs, it is possible that the current console may not be @@ -172,7 +141,7 @@ void pdc_console_restart(void) if (pdc_console_initialized) return; - while ((console = console_drivers) != (struct console *)0) + while ((console = console_drivers) != NULL) unregister_console(console_drivers); log_size = 0; @@ -180,4 +149,3 @@ void pdc_console_restart(void) printk("Switched to PDC console\n"); return; } - Index: drivers/video/sticon-bmode.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/video/sticon-bmode.c,v retrieving revision 1.7 diff -u -p -r1.7 sticon-bmode.c --- sticon-bmode.c 2000/12/02 21:03:48 1.7 +++ sticon-bmode.c 2000/12/23 13:11:09 @@ -861,13 +861,7 @@ static void __init sti_try_rom(unsigned sti_init_graph(sti); //sti_inq_conf(sti); -#if !defined(SERIAL_CONSOLE) - { - extern void pdc_console_die(void); - pdc_console_die(); - } -#endif - + take_over_console(&sti_con, 0, MAX_NR_CONSOLES-1, 1); /* sti_inq_conf(sti); */ Index: drivers/video/sticon.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/video/sticon.c,v retrieving revision 1.9 diff -u -p -r1.9 sticon.c --- sticon.c 2000/10/16 22:21:24 1.9 +++ sticon.c 2000/12/23 13:11:09 @@ -219,7 +219,6 @@ static int __init sti_init(void) { printk("searching for word mode STI ROMs\n"); if (sti_init_roms()) { - pdc_console_die(); take_over_console(&sti_con, 0, MAX_NR_CONSOLES-1, 1); return 0; } else Index: drivers/video/stifb.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/video/stifb.c,v retrieving revision 1.2 diff -u -p -r1.2 stifb.c --- stifb.c 2000/10/16 22:21:24 1.2 +++ stifb.c 2000/12/23 13:11:09 @@ -183,7 +183,6 @@ stifb_init(void) fbgen_do_set_var(&disp.var, 1, &fb_info.gen); fbgen_set_disp(-1, &fb_info.gen); fbgen_install_cmap(0, &fb_info.gen); - pdc_console_die(); if (register_framebuffer(&fb_info.gen.info) < 0) return -EINVAL; -- Revolutions do not require corporate support. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [parisc-linux] Console 2000-12-23 13:37 ` Matthew Wilcox @ 2000-12-31 0:07 ` Matthew Wilcox 0 siblings, 0 replies; 6+ messages in thread From: Matthew Wilcox @ 2000-12-31 0:07 UTC (permalink / raw) To: Matthew Wilcox; +Cc: parisc-linux On Sat, Dec 23, 2000 at 01:37:47PM +0000, Matthew Wilcox wrote: > On Thu, Dec 21, 2000 at 09:28:55PM +0000, Matthew Wilcox wrote: > > I haven't tested STI console with these changes. I don't have a > > monitor/kbd for my 712. Someone should test this, and remove the calls > > to pdc_console_die (and remove pdc_console_die altogether). > > here's a patch which does this. please let me know how this works out > for you. If no-one tests this and tells me whether it works, i shall commit it anyway and you can deal with the breakage yourselves. -- Revolutions do not require corporate support. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-12-31 0:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2000-12-21 21:18 [parisc-linux] Console Matthew Wilcox 2000-12-21 21:28 ` Matthew Wilcox 2000-12-22 11:19 ` Richard Hirst 2000-12-22 13:38 ` Matthew Wilcox 2000-12-23 13:37 ` Matthew Wilcox 2000-12-31 0:07 ` Matthew Wilcox
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.