Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08D2AC433F5 for ; Mon, 11 Oct 2021 14:33:59 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 763EF60BD3 for ; Mon, 11 Oct 2021 14:33:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 763EF60BD3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 397C483246; Mon, 11 Oct 2021 16:33:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="hIJwyUqZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB48182DA1; Mon, 11 Oct 2021 16:33:53 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0C44B833F0 for ; Mon, 11 Oct 2021 16:33:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 5163460BD3; Mon, 11 Oct 2021 14:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633962827; bh=oqM0rOOgEiR/XbinyWr6TwF4J3anx9EKrHRp0i4eTCY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hIJwyUqZZdqfVGV4lthUH2Gvza39YyPKBTqY5fB/2v8otD0Qg+a5hd8wQMrb5BBpy Q9oiPuItwIDnOWNc/EFvgyXiYvLASsDNx0j+XkhtmpBZkwyAB7A9Ql3ncVAmeSh4L5 GhNwWwzkynrxJkWHNLVgwGNckA/L5kWU7P2nEcHA2sg50Iy/EjTFFGH0an38hX+dmv pSLFeLQugXQ6PGmNSYbq5kxxV354xiKTjXQkWtijEgjC/yQfz86WRSbsmSQ2qx2mQJ haG3jEB5+DPWm40/wOSTr7jIWa63YNeY9X0Ze8XsqzFDxRoNSdwJMGw/PDYsSMw+GQ IZkcMrjc81vVQ== Received: by pali.im (Postfix) id 0578C7C9; Mon, 11 Oct 2021 16:33:44 +0200 (CEST) Date: Mon, 11 Oct 2021 16:33:44 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Stefan Roese , Marek =?utf-8?B?QmVow7pu?= , u-boot@lists.denx.de Subject: Re: A38x: Broken Linux kernel booting over UART Message-ID: <20211011143344.vyngtyi2h4dp6dvi@pali> References: <20211011101329.olxahslagwlpnh5u@pali> <20211011140321.GY7964@bill-the-cat> <20211011142548.35wvxhrvhiafghar@pali> <20211011143222.GE7964@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211011143222.GE7964@bill-the-cat> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Monday 11 October 2021 10:32:22 Tom Rini wrote: > On Mon, Oct 11, 2021 at 04:25:48PM +0200, Pali Rohár wrote: > > On Monday 11 October 2021 10:03:21 Tom Rini wrote: > > > On Mon, Oct 11, 2021 at 12:13:29PM +0200, Pali Rohár wrote: > > > > > > > Hello! > > > > > > > > Current U-Boot master has broken booting of Linux kernel over UART on > > > > A38x. > > > > > > > > After transferring image over UART it just prints: > > > > > > > > CACHE: Misaligned operation at range [01000000, 014e5d96] > > > > ## Total Size = 0x004e5d96 = 5135766 Bytes > > > > ## Start Addr = 0x01000000 > > > > Kernel image @ 0x1000000 [ 0x000000 - 0x4e0e60 ] > > > > FDT and ATAGS support not compiled in > > > > > > > > resetting ... > > > > > > > > It resets board and does not boot kernel. Note that I'm trying to boot > > > > recent 5.15 kernel image, not something old. > > > > > > > > I did git bisect and it found following commit which broke booting: > > > > > > > > 9774462e34faaa64a91eb9c68b438a52d22bba6a is the first bad commit > > > > commit 9774462e34faaa64a91eb9c68b438a52d22bba6a > > > > Author: Tom Rini > > > > Date: Mon Aug 30 09:16:30 2021 -0400 > > > > > > > > arm: Disable ATAGs support > > > > > > > > Prior this commit booting working fine. > > > > > > > > Do you have any idea what is with above commit? Or any hints? > > > > > > Can you provide the full log of what you're doing? And what's in that > > > image you're passing, exactly? Thanks. > > > > Here is full log: > > > > $ make CROSS_COMPILE=arm-linux-gnueabihf- turris_omnia_defconfig > > ... > > $ make CROSS_COMPILE=arm-linux-gnueabihf- -j8 > > ... > > $ ./tools/kwboot -b ./u-boot-spl.kwb -B 5200000 -t /dev/ttyUSB0 > > Patching image boot signature to UART > > Injecting binary header code for changing baudrate to 5200000 Bd > > Injecting code for changing baudrate back > > Aligning image header to Xmodem block size > > Sending boot message. Please reboot the target...- > > Waiting 2s and flushing tty > > Sending boot image header (115072 bytes)... > > 0 % [......................................................................] > > ... > > 93 % [........................................................... ] > > Done > > > > U-Boot SPL 2021.10-00600-gf331497d3ad4 (Oct 11 2021 - 16:13:39 +0200) > > High speed PHY - Version: 2.0 > > MiniPCIe/mSATA card detection... MiniPCIe > > Detected Device ID 6820 > > board SerDes lanes topology details: > > | Lane # | Speed | Type | > > -------------------------------- > > | 0 | 5 | PCIe0 | > > | 1 | 5 | USB3 HOST0 | > > | 2 | 5 | PCIe1 | > > | 3 | 5 | USB3 HOST1 | > > | 4 | 5 | PCIe2 | > > | 5 | 0 | SGMII2 | > > -------------------------------- > > High speed PHY - Ended Successfully > > mv_ddr: 14.0.0 > > DDR3 Training Sequence - Switching XBAR Window to FastPath Window > > mv_ddr: completed successfully > > Disabling MCU watchdog... disabled > > Trying to boot from BOOTROM > > Returning to BootROM (return address 0xffff05c4)... > > > > Changing baudrate to 5200000 Bd > > > > Sending boot image data (747780 bytes)... > > 0 % [......................................................................] > > ... > > 99 % [................................. ] > > Done > > Finishing transfer > > > > Changing baudrate back to 115200 Bd > > > > [Type Ctrl-\ + c to quit] > > > > > > U-Boot 2021.10-00600-gf331497d3ad4 (Oct 11 2021 - 16:13:39 +0200) > > > > SoC: MV88F6820-A0 at 1600 MHz > > DRAM: 2 GiB (800 MHz, 32-bit, 2T, ECC not enabled) > > WDT: Started watchdog@20300 with servicing (60s timeout) > > MMC: mv_sdh: 0 > > Loading Environment from SPIFlash... SF: Detected s25fl164k with page size 256 Bytes, erase size 4 KiB, total 8 MiB > > OK > > Model: Turris Omnia > > Turris Omnia: > > RAM size: 2048 MiB > > Serial Number: 0000000B00007B3C > > Regdomain set to ** > > Net: eth0: ethernet@70000, eth1: ethernet@30000, eth2: ethernet@34000 > > => > > > > $ kermit > > C-Kermit>set line /dev/ttyUSB0 > > C-Kermit>set speed 115200 > > C-Kermit>set carrier-watch off > > C-Kermit>connect > > Connecting to /dev/ttyUSB0, speed 115200 > > Escape character: Ctrl-\ (ASCII 28, FS): enabled > > Type the escape character followed by C to get back, > > or followed by ? to see other options. > > ---------------------------------------------------- > > > > => echo $uart_boot > > loadb $kernel_addr_r 5200000 && part uuid mmc 0:1 partuuid && setenv bootargs earlyprintk rootwait console=ttyS0,115200 rootfstype=btrfs root=PARTUUID=${partuuid} rootflags=commit=5,subvol=@ rw cfg80211.freg=${regdomain} && bootz ${kernel_addr_r} > > => run uart_boot > > ## Switch baudrate to 5200000 bps and press ENTER ... > > C-Kermit>set speed 5200000 > > ?No keywords match - 5200000 (,Transmission rate for /dev/ttyUSB0 (bits per second)) > > > > ?SET SPEED fails, speed is 5260273 > > C-Kermit>send /tmp/kernel > > C-Kermit>set speed 115200 > > /dev/ttyUSB0, 115200 bps > > C-Kermit>connect > > CACHE: Misaligned operation at range [01000000, 014e5d96] > > ## Total Size = 0x004e5d96 = 5135766 Bytes > > ## Start Addr = 0x01000000 > > ## Switch baudrate to 115200 bps and press ESC ... > > Kernel image @ 0x1000000 [ 0x000000 - 0x4e0e60 ] > > FDT and ATAGS support not compiled in > > > > resetting ... > > OK, and is /tmp/kernel something with an appended dtb then? Yes, single image suitable for single kermit UART transfer: cat arch/arm/boot/zImage arch/arm/boot/dts/armada-385-turris-omnia.dtb > /tmp/kernel