Re: More serial ports in EFI bootstrap?

Emmanuel Dreyfus <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Tue, Jun 17, 2025 at 03:41:15PM +0100, Robert Swindells wrote:
> Start at the 'struct consdev comcons' declaration, that links to the
> functions needed.

I made some progress. When booting with consdev=ucom,0,115200, 
ucom0 attaches the console when ucom_attach() is called.

Here is the code so far:
https://dl.espci.fr/ticket/cf60ed7e55d22201404446e3fc3f0544

I did not include the efiboot part, which is still a bit messy.

There are three problems:

1.system freeze shortly after reaching multiuser. I have been 
  able to get a panic once: spec_close() was unhappy about an
  open count. I suspect the call to ucomopen() in ucom_attach()
  is the culprit. Comments welcome

2.I cannot get a getty to open /dev/ttyU0. ktrace says:
  5347   5347 getty    CALL  open(0xab24e0,2,0xfffffffffffff5a8)
  5347   5347 getty    NAMI  "/dev/ttyU0"
  5347   5347 getty    RET   open RESTART
  5347   5347 getty    CALL  open(0xab24e0,2,0xfffffffffffff5a8)
  5347   5347 getty    NAMI  "/dev/ttyU0"
  5347   5347 getty    RET   open RESTART
  5347   5347 getty    CALL  open(0xab24e0,2,0xfffffffffffff5a8)
  5347   5347 getty    NAMI  "/dev/ttyU0"
  5347   5347 getty    RET   open RESTART

3.No way to break into DDB. What did I do wrong? 

-- 
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.