From nobody Tue Nov 30 21:37:47 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DC46F18B3091 for ; Tue, 30 Nov 2021 21:37:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3bDK5F9Dz3hdb for ; Tue, 30 Nov 2021 21:37:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0C9FD260827; Tue, 30 Nov 2021 22:37:51 +0100 (CET) Message-ID: Date: Tue, 30 Nov 2021 22:37:47 +0100 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: 14-CURRENT Kernel Panic due to USB hub? Content-Language: en-US To: Andrew Turner Cc: freebsd-arm@freebsd.org References: <2b555ef9-12fe-6214-79a0-cebce1933771@selasky.org> <5bfb1865-8033-0da6-27e4-3c25fb067cee@morante.net> <6F2AD5E1-5AB1-4D08-97F4-84E2905D592B@fubar.geek.nz> <45534c79-311b-d1df-c412-5bd782678cfb@selasky.org> <78ed0a6e-2ef0-46a4-f494-8eeef326d15e@selasky.org> <3E44BF3B-9181-480E-8D40-09B66203ADB6@fubar.geek.nz> From: Hans Petter Selasky In-Reply-To: <3E44BF3B-9181-480E-8D40-09B66203ADB6@fubar.geek.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4J3bDK5F9Dz3hdb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11/30/21 18:21, Andrew Turner wrote: > >> On 30 Nov 2021, at 14:34, Hans Petter Selasky wrote: >> >> On 11/30/21 15:16, Andrew Turner wrote: >>>> On 30 Nov 2021, at 12:35, Hans Petter Selasky wrote: >>>> >>>> On 11/30/21 13:22, Andrew Turner wrote: >>>>> I bisected the detached messages back to 601ee53858f6 [1]. If I revert this change I no longer see this on the console. >>>>> I am also unable to reproduce the panic with this change reverted. As the panic can be difficult to reproduce I am unsure if reverting this change is enough to fix it, or if it’s just making it less likely to be triggered. >>>>> Andrew >>>>> [1] https://cgit.freebsd.org/src/commit/?id=601ee53858f6 >>>> >>>> Hi, >>>> >>>> Could you verify that you are not running out of kernel stack? >>> I can still trigger it after doubling the kernel stack size. >>>> >>>> May this be due to some code in the .text segment which is not properly aligned? >>> I would expect to have seen the issue on other HW. The issue looks more like it’s memory corruption. >>>> >>>> If you compile and load USB as modules, does the panic go away? >>> I am unable to trigger it after removing xhci from the kernel, and did get a panic after loading the xhci module. >>> The xhci controller is one that originated in Broadcom. Linux has a quirk for it to work around an erratum where attaching a USB 1 device followed by a USB 2 device the linker the latter will come up as USB 1. They reset the phy when anything less than USB 3 on a disconnect event. >> >> And there is no BIOS / UEFI code still running on that XHCI controller? > > I would expect the UEFI code to not be accessing the XHCI controller after exiting the loader. > > Andrew > > Hi, Could you try to kldload xhci instead of building it into the kernel config? Maybe you get a different kind of panic that way. --HPS