Date: Thu, 27 Oct 2022 15:13:04 +0000 From: Alastair Hogge <agh@riseup.net> To: Matteo Riondato <matteo@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: ns8250: UART FCR is broken Message-ID: <9e39e3a2d2488815736c482de3f8b411@riseup.net> In-Reply-To: <20221027125758.nexluqtw6n2tgklq@ubertino.local> References: <Y1dF0CvrJZubFizl@openbsd.local> <CAPyFy2CeWi2_ejv6%2BdKQB6Sa0KLpe0Kq8=p4QNS46HDkADCB9Q@mail.gmail.com> <fa45b3cc-fa65-b5b9-49fa-a1dcbbddebc6@freebsd.org> <20221027125758.nexluqtw6n2tgklq@ubertino.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2022-10-27 20:57, Matteo Riondato wrote: > On 2022-10-26 at 17:15 EDT, Colin Percival <cperciva@freebsd.org> wrote: > >>On 10/26/22 13:48, Ed Maste wrote: >>>On Mon, 24 Oct 2022 at 22:11, void <void@f-m.fm> wrote: >>>>this started appearing in dmesg >>>> >>>>ns8250: UART FCR is broken >>>>ns8250: UART FCR is broken >>> >>>This message was added as part of Colin's work to support FreeBSD in the Firecracker VMM https://cgit.freebsd.org/src/commit/?id=c4b68e7e53bb352be3fa16995b99764c03097e66 >>> >>>In this case it indicates that bhyve has the same bug/missing functionality as Firecracker -- it doesn't implement the FCR_XMT_RST or FCR_RCV_RST bits. You can safely ignore the message, and it will disappear once someone adds the required support to bhyve. We should probably also have the kernel emit the message only once. I've CC'd Colin for comment. >> >>Indeed, looking at usr.sbin/bhyve/uart_emul.c it looks like FCR_XMT_RST is not emulated. This is different from Firecracker, which doesn't emulate either anything from the FCR and where I was seeing the receive side not being flushed, but I'm glad my warning was able to flag a bug. :-) >> >>If "void" is comfortable with kernel hacking, it would be great to confirm >that the warning is indeed coming from the transmit side not being flushed; a printf("drain = %d\n", drain); would be sufficient. >> >>And yes, only emitting this warning once per device (or once per boot?) would probably be good. > > I got the same message on real hardware, no virtualization involved as > either host or guest. Is that expected at all? > > Relevant lines from /var/run/dmesg.boot: > > ns8250: UART FCR is broken > ns8250: UART FCR is broken > uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 > uart0: console (115200,n,8,1) > ns8250: UART FCR is broken > ns8250: UART FCR is broken > uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 > ns8250: UART FCR is broken On 3 × bare metal 14-CURRENT hosts at 017367c1146a69baca6a1a0bea10b0cb02c72d85: $ dmesg -a | egrep '(ns8250|uart)' ns8250: UART FCR is broken ns8250: UART FCR is broken uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 ns8250: UART FCR is broken
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e39e3a2d2488815736c482de3f8b411>