Re: More serial ports in EFI bootstrap?

Emmanuel Dreyfus <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Fri, Jun 27, 2025 at 02:49:42PM +0100, Robert Swindells wrote:
> I think the point would be to not make the functions no-ops so that
> you do have a console.

Sure, but I would expect a no-op console to reach multi-user mode, it
did not.

I made some progress. At the end of ucom_attach() I have:

        comcons.cn_dev = makedev(66, 0);
        ucomopen(comcons.cn_dev, O_NONBLOCK, 0, curlwp);

        struct termios t;
        memset(&t, 0, sizeof(t));
        t.c_ispeed = B115200;
        t.c_ospeed = B115200;
        t.c_cflag = tp->t_cflag ;
        SET(t.c_cflag, CLOCAL);
        CLR(t.c_cflag, HUPCL);
        (void)ucomparam(tp, &t);
 
        if (cn_tab != NULL && cn_tab->cn_halt != NULL)
                cn_tab->cn_halt(cn_tab->cn_dev);
 
        cn_tab = &comcons; 

With consdev pc, that survives to multi-user, and actually implementing
cn_putc() and cn_getc() gave me a console output on the serial port. 
The console output stops when init starts, probbaly because the console
device is already open by the kernel?

With consdev com0 it crashes, even with cn_putc() and cn_getc() as no-ops.

-- 
Emmanuel Dreyfus
[email protected]
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.