Re: More serial ports in EFI bootstrap?

Thor Lancelot Simon <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Wed, Jun 04, 2025 at 01:27:39PM +0000, Emmanuel Dreyfus wrote:
> On Wed, Jun 04, 2025 at 09:05:36AM -0400, Thor Lancelot Simon wrote:
> > Can (and should) we access the console via EFI interfaces in this case?
> 
> You can skip the call to UEFI ExitBootServices() but I guess you need
> to take care of not overwriting memory used by UEFI. I recall doing
> that to get console output later during kernel load process. It worked, 
> but I did not try to call UEFI Read/Write from the kernel.

It seems to me that -- ideally -- we wouldn't ExitBootServices until we
had finished probe and attach of all devices needed to get the system to
single-user mode.  But maybe the console is the only one that's really in
that category, the way our current boot process works even if netbooting.

I suppose it's a worthwhile question whether the probe/attach for a USB
serial console will actually work properly if we haven't called
ExitBootServices, but I'd hope the answer is that it's sufficient to do
immediately _afterwards_.

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