Hello I made some progress with using ucom as a console. Here is the code so far: https://dl.espci.fr/ticket/fc1b8d7fe3232b920e701a89e4c73ac8
Output (ucomcn_putc) works. There is just an odd thing with this unused ucomcn_xfer_in. If I remove it, the console freeze after a few dozen of lines, while the machine reaches multiuser. Input (ucomcn_getc/ucomcn_pollc) is adapted from ukbd.c, it does not work yet. I am not sure I understood how we decide that input shall go to the console or to the terminal. For now it seems to fo nowhere. Once mulituser is reached, getty does not work. It waits forever in syscall/sys_read/dofileread/vn_read/VOP_READ/spec_read/cdev_read/ cdev_read/ttread/ttysleep/cv_timedwait_sig/sleepq_block cu -l /dev/console -s 115200 got mixed results. It once managed to output to the console, but it also triggered various assertions: [ 1346.4214591] kernel diagnostic assertion "sn->sn_opencnt" failed: file "/usrvrelel: missing VOP_CLOSE(): vnode 0xffff80bc0aab9ac0 flags 0x14<ISTTY,MPSAFE> [ 1346.4214591] tag VT_NON(0) type VCHR(4) mount 0xffff80c333b74000 typedata 0xffff80bc084e3cc0 [ 1346.4214591] usecount 1 writecount 0 holdcount 0 [ 1346.4214591] size 0 writesize 0 numoutput 0 [ 1346.4214591] data 0x0 lock 0xffff80bc0aab9c80 [ 1346.4214591] state LOADED key(0xffff80c333b74000 0) [ 1346.4214591] lrulisthd 0xffffffff818bf0d0 [ 1550.7214028] kernel diagnostic assertion "sn->sn_opencnt" faihd 0xffffffff818bf0d0 [ 1550.7214028] kernel diagnostic assertion "len <= map->dm_mapsize - offset" failed: file "/usr/src/sys/arch/x86/x86/bus_dma.c", line 829 bad length 0xd80 + 0x28b > 0x1000 Hints welcome. -- Emmanuel Dreyfus m...@netbsd.org