Re: [RFC] new APIs to use wskbd(4) input on non-wsdisplayttydevices

Izumi Tsutsui <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
uwe@ wrote:

> > On the other hand, news68k (and sun) machines have putchar()
> > that also handles virtual terminal ops like backspace, CR/LF,
> > and even scrolling at the bottom of screen. In this case
> > no VT emulation layer is necessary in the kernel side,
> > so kernel's putc(9) just calls firmware's putchar(),
> > and for userland processes we can simply pass translated
> > wskbd inputs to line discipline of the tty device.
> > 
> > That's the reason why I proposed to add register/deregister
> > APIs to pass wskbd data to romcons tty device.
> > 
> > What do you think about this case?
> 
> Add trivial wsemul_none (or wsemul_delegate, or whatever a suitable
> name might be) that does even less than wsemul_dumb and only ever uses
> putchar to pass chars to the firmware emulator?

I considered about it when I tried to implement news68k ROM console
driver, but I gave it up because:

- wscons(9) was the most complicated driver with undocumented APIs
  (struct wsemul_ops etc.)
- wsdisplay(9) would pull a lot of unnecessary sources like wsdisplay.c
  etc. (for screen ops) while TERM=wsvt25 could not be used
- there was no sample implementation using "putchar() with VT emulation"
- on the other hand there were simple implementation for PROM console
  functions (sys/arch/sun3/dev/kd.c and sys/dev/ofw/ofcons.c etc.)
  and actually it was quite simple to connect wskbd(4) to "romcons"
  driver

Thanks,
---
Izumi Tsutsui
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.