On Sat, Apr 06, 2024 at 23:56:27 +0900, Izumi Tsutsui wrote: > To support "text only" framebuffer console, we can use putchar > functions provided by the firmware PROM.
Is that a console-typewriter--like device without addressable cursor terminal emulation? Can you use wsemul_dumb to avoid rasops &c? It still uses copy/erase, but with trivial argument values that can be reversed back to puchar calls for tab/lf (from a very quick look). > The attached patch provides new two APIs > - wskbd_consdev_kbdinput_register() > - wskbd_consdev_kbdinput_deregister() > to allow a kernel to use wskbd(9) for non-wsdisplay tty device. AFAIU, there's nothing console-specific in this (except that it's first use is going to be for a console), so may be it would be better to drop the "consdev" from the name? > Index: sys/dev/wscons/wskbd.c > =================================================================== > RCS file: /cvsroot/src/sys/dev/wscons/wskbd.c,v > retrieving revision 1.143 > diff -u -p -d -r1.143 wskbd.c > --- sys/dev/wscons/wskbd.c 5 Feb 2019 10:04:49 -0000 1.143 > +++ sys/dev/wscons/wskbd.c 6 Apr 2024 06:59:50 -0000 [...] > @@ -706,6 +709,24 @@ wskbd_input(device_t dev, u_int type, in > } > #endif > > +#if NWSDISPLAY == 0 > + if (sc->sc_translating) { The #endif above is for NWSDISPLAY > 0, so may be get rid of the ifdefs and use plain ifs? Thanks. -uwe