Re: not working /dev/console

From: Daniel Braniss <danny_at_cs.huji.ac.il>
Date: Mon, 16 Dec 2024 14:31:54 UTC

> On 16 Dec 2024, at 16:15, Ronald Klop <ronald-lists@klop.ws> wrote:
> 
> 
> Van: Kurt Jaeger <pi@freebsd.org>
> Datum: maandag, 16 december 2024 14:34
> Aan: Warner Losh <imp@bsdimp.com>
> CC: John Baldwin <jhb@freebsd.org>, Daniel Braniss <danny@cs.huji.ac.il>, Freebsd-stable List <stable@freebsd.org>
> Onderwerp: Re: not working /dev/console
> 
> Hi!
> 
> > > > can you tell more on how to fix this ?
> 
> > > > APU version apu1 lost their ability to have a serial console
> > > > in 14.2.
> 
> > > hw.acpi.override_isa_irq_polarity=1
> > >
> > > in /boot/loader.conf
> > >
> > > changed the value after reboot, but the serial console is still lost.
> >
> > Are the serial ports there at all? APU needs hints now for that.
> 
> They are not. As the hardware did not change (I did not unsolder
> some chips from the board 8-), I guess that's what I'm asking:
> 
> How can I tell the kernel that the serials are still there ?
> 
> The system boots via serial, and then stops displaying any
> kernel output.
> 
> -- 
> pi@FreeBSD.org         +49 171 3101372                  Now what ?
>  
> 
> 
> Does this note from /usr/src/UPDATING help?
> 
> 20240715:
>         We now lean more heavily on ACPI enumeration for some traditional
>         devices. uart has moved from isa to acpi so the hints act as wiring
>         instead of device enumeration. Hints for parallel port, floppy, etc
>         have been removed.  Before upgrading, grep your dmesg for lines like:
>                 uart1: non-PNP ISA device will be removed from GENERIC in FreeBSD 15.
>         to see if you need to start including hints for the device on isa
>         in your loader.conf or device.hints file. APU1 (but not APU2) boards
>         are known to be affected, but there may be others.

The problem is also on APU2, and fixing the hint.uart.0=“isa”
got my serial console back!

So thanks to all of you!

Danny

> 
> I don't know if this note was MFC'ed to stable.
> https://github.com/freebsd/freebsd-src/commit/63e282288ed84387d2ec75ba8df7d7d004536781
> 
> You might try to put something like this in /boot/device.hints (or /boot/loader.conf?):
> hint.uart.0.at="isa"
> hint.uart.0.port="0x3F8"
> hint.uart.0.flags="0x10"
> hint.uart.0.irq="4"
> hint.uart.1.at="isa"
> hint.uart.1.port="0x2F8"
> hint.uart.1.irq="3"
>  
> 
> Regards,
> Ronald.
>