Date: Wed, 13 Feb 2019 21:34:12 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231760] FreeBSD 12.0-ALPHA7 Installations Halts at ACPI on 4 different AMD Ryzen Laptops (HP, DELL, Huawei) Message-ID: <bug-231760-227-jsRBjWZbxD@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-231760-227@https.bugs.freebsd.org/bugzilla/> References: <bug-231760-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231760 John Baldwin <jhb@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jhb@FreeBSD.org, | |jmd@freebsd.org --- Comment #7 from John Baldwin <jhb@FreeBSD.org> --- I tried to debug this a bit with jmd@ previously where the hang seemed to o= ccur in the acpi_pci_link.c driver. This is the patch I had asked jmd@ to test,= but it didn't help: Can you please try this change. It won't fix anything but will add some logging. Hopefully it hangs and we can see what PCI access it did last. Worst case is it just sits in a loop spewing crap endlessly. Index: acpi_pci_link.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- acpi_pci_link.c (revision 339002) +++ acpi_pci_link.c (working copy) @@ -54,6 +54,16 @@ ACPI_SERIAL_DECL(pci_link, "ACPI PCI link"); #define NUM_ISA_INTERRUPTS 16 #define NUM_ACPI_INTERRUPTS 256 +#define pci_cfgregread(bus, dev, func, reg, size) \ + ({ uint32_t _val; \ + printf("%s:%d: cfgregread pci%d.%d.%d reg %#x (%d)\n", \ + __func__, __LINE__, (bus), (dev), (func), (reg), \ + (size)); \ + _val =3D pci_cfgregread((bus), (dev), (func), (reg), \ + (size)); \ + printf("\t=3D> %#x\n", _val); \ + _val; }) + /* * An ACPI PCI link device may contain multiple links. Each link has its * own ACPI resource. _PRT entries specify which link is being used via @@ -577,6 +587,9 @@ acpi_pci_link_search_irq(int bus, int device, int uint8_t func, maxfunc; /* See if we have a valid device at function 0. */ + value =3D pci_cfgregread(bus, device, 0, PCIR_VENDOR, 2); + if (value =3D=3D 0xffff) + return (PCI_INVALID_IRQ); value =3D pci_cfgregread(bus, device, 0, PCIR_HDRTYPE, 1); if ((value & PCIM_HDRTYPE) > PCI_MAXHDRTYPE) return (PCI_INVALID_IRQ); @@ -587,8 +600,8 @@ acpi_pci_link_search_irq(int bus, int device, int /* Scan all possible functions at this device. */ for (func =3D 0; func <=3D maxfunc; func++) { - value =3D pci_cfgregread(bus, device, func, PCIR_DEVVENDOR,= 4); - if (value =3D=3D 0xffffffff) + value =3D pci_cfgregread(bus, device, func, PCIR_VENDOR, 2); + if (value =3D=3D 0xffff) continue; value =3D pci_cfgregread(bus, device, func, PCIR_INTPIN, 1); --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231760-227-jsRBjWZbxD>