Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Oct 2022 08:57:58 -0400
From:      Matteo Riondato <matteo@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Re: ns8250: UART FCR is broken
Message-ID:  <20221027125758.nexluqtw6n2tgklq@ubertino.local>
In-Reply-To: <fa45b3cc-fa65-b5b9-49fa-a1dcbbddebc6@freebsd.org>
References:  <Y1dF0CvrJZubFizl@openbsd.local> <CAPyFy2CeWi2_ejv6%2BdKQB6Sa0KLpe0Kq8=p4QNS46HDkADCB9Q@mail.gmail.com> <fa45b3cc-fa65-b5b9-49fa-a1dcbbddebc6@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--u772wrfl6ai37fqp
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
>>the Firecracker VMM=20
>>https://cgit.freebsd.org/src/commit/?id=3Dc4b68e7e53bb352be3fa16995b99764=
c03097e66
>>
>>In this case it indicates that bhyve has the same bug/missing=20
>>functionality as Firecracker -- it doesn't implement the FCR_XMT_RST=20
>>or FCR_RCV_RST bits. You can safely ignore the message, and it will=20
>>disappear once someone adds the required support to bhyve. We should=20
>>probably also have the kernel emit the message only once. I've CC'd=20
>>Colin for comment.
>
>Indeed, looking at usr.sbin/bhyve/uart_emul.c it looks like FCR_XMT_RST is=
=20
>not emulated.  This is different from Firecracker, which doesn't emulate=
=20
>either anything from the FCR and where I was seeing the receive side not=
=20
>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=20
>confirm >that the warning is indeed coming from the transmit side not=20
>being flushed; a printf("drain =3D %d\n", drain); would be sufficient.
>
>And yes, only emitting this warning once per device (or once per boot?)=20
>would probably be good.

I got the same message on real hardware, no virtualization involved as=20
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

Thanks,
Matteo

--u772wrfl6ai37fqp
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJHBAABCgAxFiEEa9uKZL0hP4E8Nl5vGwL9SVQlVQEFAmNagFATGGhrcHM6Ly9w
Z3AubWl0LmVkdQAKCRAbAv1JVCVVAdiaD/sH+AwdmtBelsTFQYHTmhQjwUdlUPcJ
kfl76olCRnHw+geWQUZ4XpAVwV7GkcJ/4DWRrsVBtLTARgu/jomL40rbwPCD4WlQ
xAvZPbgKkOyQrbFhyknY8YDqgMidBqCCidyn19AAqk+NfuERleUbI5d1m6J9XdCJ
C1eTBbBsZECwYbGuE/ClswcKvlBxDUNc8RYyd6AX5b7kLOQq8uBJXh+OXM1xuUHd
rPQoFzVgCBKnFeOWnpCxhvDp2oVFsx8ZOYKgf/gFdCLDUCwVvohDzcrERvO9pvsm
rSpXY+G/s+efKQuBfRER6B8hd1X3IJYPYUOB/q8f6vRehwpk87Oj1yMCZIFs9htf
YY8V+yYCsqMcoQ7tr0K7qvx036fjjHNZ5b2dd1tz++IiOCxPFU06C69jcdR7uBWW
YqBF2X4tHVQd+UvibhFuBUHzaBdU7ouaT//DYmE9x8xAL6OCbatqMpdYy+iBaHev
unP2/Hk1kkoQFUWzIuDRSkIzGV/WBI4i4vwaOG9dkgKVbpD/CMGYult5e7OOtQap
fWra8iknqd8e5xd4ujS/nCSkkvVrRx3LWFQ1KoM6G6/1dd7ItnKFcQvRHcLGKLfZ
XO8pP6Fx4vahm7MEu+82jlMlNpUxzkp2MXXtybMfzimlP7VONSyrTR6X0EWR8lg9
A1fWChLn0ONvYQ==
=j9Ka
-----END PGP SIGNATURE-----

--u772wrfl6ai37fqp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221027125758.nexluqtw6n2tgklq>