serial console and genfb
Hi, Attached is a patch to genfb to make it possible to have serial console but still have genfb enabled. I'm slightly worried this will break genfb console on non-x86 machines however, so I'd like some testing. At the very least a list of machines that need testing would be useful. Jonathan Kollasch Index: sys/dev/wsfb/genfb.c === RCS file: /cvsroot/src/sys/dev/wsfb/genfb.c,v retrieving revision 1.51 diff -d -u -a -p -r1.51 genfb.c --- sys/dev/wsfb/genfb.c 9 Oct 2013 17:20:54 - 1.51 +++ sys/dev/wsfb/genfb.c 30 Dec 2013 14:12:59 - @@ -99,6 +99,7 @@ genfb_init(struct genfb_softc *sc) printf(prop_dictionary_externalize(dict)); #endif prop_dictionary_get_bool(dict, is_console, console); + console = console (genfb_is_console() != 0); if (!prop_dictionary_get_uint32(dict, width, sc-sc_width)) { GPRINTF(no width property\n); @@ -205,6 +206,7 @@ genfb_attach(struct genfb_softc *sc, str dict = device_properties(sc-sc_dev); prop_dictionary_get_bool(dict, is_console, console); + console = console (genfb_is_console() != 0); if (prop_dictionary_get_uint16(dict, cursor-row, crow) == false) crow = 0;
Re: serial console and genfb
On Wed, Jan 15, 2014 at 11:08:41AM -0600, Jonathan A. Kollasch wrote: Hi, Attached is a patch to genfb to make it possible to have serial console but still have genfb enabled. I'm slightly worried this will break genfb console on non-x86 machines however, so I'd like some testing. At the very least a list of machines that need testing would be useful. Jonathan Kollasch Also relevant would be the patch in kern/46376, which I have not tested.
Re: serial console and genfb
jakllsch@ wrote: Attached is a patch to genfb to make it possible to have serial console but still have genfb enabled. I'm slightly worried this will break genfb console on non-x86 machines however, so I'd like some testing. At the very least a list of machines that need testing would be useful. Probably it's rather better to fix sys/arch/x86/pci/pci_machdep.c http://nxr.netbsd.org/xref/src/sys/arch/x86/pci/pci_machdep.c?r=1.63#940 not to set the is_console device property unconditionally. (should check lookup_bootinfo(BTINFO_CONSOLE) instead as consinit() does?) --- Izumi Tsutsui
Re: serial console and genfb
On Thu, Jan 16, 2014 at 02:21:11AM +0900, Izumi Tsutsui wrote: Probably it's rather better to fix sys/arch/x86/pci/pci_machdep.c http://nxr.netbsd.org/xref/src/sys/arch/x86/pci/pci_machdep.c?r=1.63#940 not to set the is_console device property unconditionally. (should check lookup_bootinfo(BTINFO_CONSOLE) instead as consinit() does?) Yes, that sounds better. Martin