From owner-freebsd-bugs@freebsd.org Wed Feb 13 21:34:16 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F27D14D8AC2 for ; Wed, 13 Feb 2019 21:34:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 15ADC757DA for ; Wed, 13 Feb 2019 21:34:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id CA45514D8ABF; Wed, 13 Feb 2019 21:34:15 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AB0714D8ABE for ; Wed, 13 Feb 2019 21:34:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F54D757D3 for ; Wed, 13 Feb 2019 21:34:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id F16A315F0B for ; Wed, 13 Feb 2019 21:34:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x1DLYDDc047574 for ; Wed, 13 Feb 2019 21:34:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x1DLYDkM047573 for bugs@FreeBSD.org; Wed, 13 Feb 2019 21:34:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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) Date: Wed, 13 Feb 2019 21:34:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jhb@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 21:34:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231760 John Baldwin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jhb@FreeBSD.org, | |jmd@freebsd.org --- Comment #7 from John Baldwin --- 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.=