Bug 271147

Summary: Adding support for Sunrise Point uart hangs boot
Product: Base System Reporter: Joe Marcus Clarke <marcus>
Component: kernAssignee: Kyle Evans <kevans>
Status: Open ---    
Severity: Affects Only Me CC: bugs, kevans
Priority: ---    
Version: 13.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
dmesg
none
pciconf none

Description Joe Marcus Clarke freebsd_committer freebsd_triage 2023-04-30 13:19:14 UTC
I regularly track -STABLE on this small form factor machine I use as a router.  After upgrading on April 29 (last was April 23) the machine hung on boot just before polling the ISA bus.  I tracked the commit down to https://cgit.freebsd.org/src/commit/?h=stable/13&id=7c0af1af0a8b467b8c61ee9b3aef0e527536deaa.  Specifically, adding support for the Intel Sunrise Point Controller 0 (which this machine has).  Removing this line restores normal booting.

Attached are my dmesg and pciconf output.  I'm not sure if perhaps this controller needs a quirk...?
Comment 1 Joe Marcus Clarke freebsd_committer freebsd_triage 2023-04-30 13:20:33 UTC
Created attachment 241882 [details]
dmesg
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2023-04-30 13:20:50 UTC
Created attachment 241883 [details]
pciconf
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2023-05-01 05:09:31 UTC
(In reply to Joe Marcus Clarke from comment #0)

Thanks for the report, sorry for the breakage. What happens if you change the final member, `2`, to a `0` on that line?

Is this UART controller broken out in a way that you can test the result and see if it actually works in addition to not hanging your boot?
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2023-05-01 13:55:08 UTC
Thanks, Kyle.  My research said either that or the clock (or both) might be worth trying.  Unfortunately, I just went out of town, and I don't want to risk taking out the router from remote.  I'll try this weekend.  And, yes, I'll be able to test the UART.
Comment 5 Joe Marcus Clarke freebsd_committer freebsd_triage 2023-05-06 18:02:22 UTC
Unfortunately, the shift reg change didn't work.  The hang was the same (just after igb5 is probed and before ISA).  I tried the 24x clock, too (with both 0 and 2 for shift reg) and the behavior was the same.  I even disabled the two serial ports in the BIOS, but the boot still hung.  The only thing that works is not to probe that PCI device.  I noticed in -CURRENT there was some MSI exclusion support added (if I read that right).  Not sure if that would be helpful or not here.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-05-09 06:42:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=20d8d9809a8c0a3ddd1d0156e77ec53a1ed95747

commit 20d8d9809a8c0a3ddd1d0156e77ec53a1ed95747
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-05-09 06:38:32 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-05-09 06:38:32 +0000

    Revert "uart(4): add Sunrise Point UART controllers"

    This reverts commit d1b6271118188dd25a18f2372ab1d3004335ea3c.

    I've received multiple reports of machines failing to boot with
    this hardware; back it out for now until we can fix it.

    PR:             271147
    MFC after:      Morning coffee

 sys/dev/uart/uart_bus_pci.c | 2 --
 1 file changed, 2 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-05-09 17:34:24 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=780466256114fccaed8ae2547675c74d5f82d99c

commit 780466256114fccaed8ae2547675c74d5f82d99c
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-05-09 06:38:32 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-05-09 17:33:45 +0000

    Revert "uart(4): add Sunrise Point UART controllers"

    This reverts commit d1b6271118188dd25a18f2372ab1d3004335ea3c.

    I've received multiple reports of machines failing to boot with
    this hardware; back it out for now until we can fix it.

    PR:             271147

    (cherry picked from commit 20d8d9809a8c0a3ddd1d0156e77ec53a1ed95747)

 sys/dev/uart/uart_bus_pci.c | 2 --
 1 file changed, 2 deletions(-)