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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2D209C54EBC for ; Tue, 10 Jan 2023 23:08:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA7DE8543A; Wed, 11 Jan 2023 00:08:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="iB9NkzMM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6385E85458; Wed, 11 Jan 2023 00:08:31 +0100 (CET) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 81D2C80843 for ; Wed, 11 Jan 2023 00:08:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82d.google.com with SMTP id h21so12251371qta.12 for ; Tue, 10 Jan 2023 15:08:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sOO0LC+pejLDHUhe8WSXnlUaD598g3I2T1XlMMgS8eY=; b=iB9NkzMMNVDuVIIs4YpzOgH1r1cQJ05Mi1HK0L28p6xukPYloo90a/UuwmXWse6kfa lD9DLJOKPHZilU0rW+9iMcMJz00t5yvfK/p7zNH/lwrTahCruiLpz88p3Vt8++OdHFkt WnFicJBp7WBIdtUhBwnzhauoV2DuTKPoqyRVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sOO0LC+pejLDHUhe8WSXnlUaD598g3I2T1XlMMgS8eY=; b=Rfnv5v9vo9OeSxaRW0FWQWFilY7qlFTpWU9qBzI6nN9AHVJJmxFk17u7u1k7hwKUBa Rv15ElG14AKa1swf/7XVCPmwPIPWFU04brYXtjV6Ok7NcLx/WmigRkjQOKcNwjPW1Mu3 8aUtUr3qC1SupZGovmLrbV0Rw5GYcv843xL/hN7IbVh+BDOrx7OLX5Rs570SbxQWITfr EgMMqewcVGmQTQDHrLQR2IKGtKmnfGZ9H3BfQYtGR7f26U8DPN9tZ/4HzzicNkU0kxrh ymOilMEBKsU39NVemonEoy+ErN6zbCTTY7hpLyWOYZlCaOsPOxOiTq8vvlGSjl9PoMp1 Ru0Q== X-Gm-Message-State: AFqh2kqEqsTVsCDDP2EG5PujtexxV56+NEDua80GKiDnc8HVM2WI6vJI f4h3OQxW/o8eqRhVmeEVCUExnGSmxB4w59hJzGM= X-Google-Smtp-Source: AMrXdXsYl+0hv23i68JtRt1sdlfuZUwqdQAjxb/0OxH4KmyapsQZq8bQYv70J0qO7JZPkAKYjfaFCg== X-Received: by 2002:a05:622a:1c06:b0:39c:da20:f7af with SMTP id bq6-20020a05622a1c0600b0039cda20f7afmr93121682qtb.12.1673392107210; Tue, 10 Jan 2023 15:08:27 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-2c2f-ce0f-8dee-7136.res6.spectrum.com. [2603:6081:7b00:6400:2c2f:ce0f:8dee:7136]) by smtp.gmail.com with ESMTPSA id ey24-20020a05622a4c1800b003a611cb2a95sm2888466qtb.9.2023.01.10.15.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 15:08:26 -0800 (PST) Date: Tue, 10 Jan 2023 18:08:24 -0500 From: Tom Rini To: Joost van Zwieten Cc: u-boot@lists.denx.de Subject: Re: kernel doesn't start on Odroid U2 unless setting initrd_high Message-ID: <20230110230824.GR3787616@bill-the-cat> References: <20230110184101.GO3787616@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UKgxxiHAJdS3J+5E" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean --UKgxxiHAJdS3J+5E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 11, 2023 at 12:01:46AM +0100, Joost van Zwieten wrote: >=20 >=20 > On Tue, Jan 10, 2023 at 13:41, Tom Rini wrote: > > On Tue, Jan 10, 2023 at 09:13:32AM +0100, Joost van Zwieten wrote: > >=20 > > > Dear maintainers, > > >=20 > > > As of commit 4963f63fe61f15329d77472a762b1d8bf754d24b U-Boot fails > > > to start > > > a kernel (with `bootz`) on my Odroid U2 unless I force > > > `initrd_high`, e.g. > > > to `0x50000000`. With commit 4963f63f and `initrd_high` *unset* I > > > get the > > > following output: > > >=20 > > > U-Boot 2020.10-rc2-00314-g4963f63fe6 (Jan 09 2023 - 23:59:31 > > > +0100) > > >=20 > > > CPU: Exynos4412 @ 1 GHz > > > Model: Odroid based on Exynos4412 > > > Type: u3 > > > DRAM: 2 GiB > > > LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling > > > LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling > > > LDO21@TFLASH_2.8V: set 2800000 uV; enabling > > > MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0 > > > Loading Environment from MMC... *** Warning - bad CRC, using > > > default > > > environment > > >=20 > > > In: serial > > > Out: serial > > > Err: serial > > > Boot device: MMC(2) > > > Net: No ethernet found. > > > Hit any key to stop autoboot: 0 > > > Odroid # env set fk_kvers 5.10.0-20-armmp > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} > > > /boot/dtbs/${fk_kvers}/exynos4412-odroidu3.dtb > > > 53440 bytes read in 50 ms (1 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} > > > /boot/vmlinuz-${fk_kvers} > > > 4973056 bytes read in 182 ms (26.1 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} > > > /boot/initrd.img-${fk_kvers} > > > 22231585 bytes read in 777 ms (27.3 MiB/s) > > > Odroid # env set bootargs console=3DttySAC1,115200n8 > > > Odroid # bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} > > > ${fdt_addr_r} > > > Kernel image @ 0x41000000 [ 0x000000 - 0x4be200 ] > > > ## Flattened Device Tree blob at 40800000 > > > Booting using the fdt blob at 0x40800000 > > > Loading Ramdisk to b9947000, end bae7aa21 ... OK > > > Loading Device Tree to b9936000, end b99460bf ... OK > > >=20 > > > Starting kernel ... > > >=20 > > > And that's all I ever see. Normally the initrd loads a module that > > > causes an > > > LED on the Odroid to blink, and this is not happening either, so > > > I'm pretty > > > confident the kernel doesn't start or at least crashes before > > > producing > > > output. If I set `initrd_high` to `0x50000000` (or something in the > > > neighborhood) the kernel starts just fine: > > >=20 > > > U-Boot 2020.10-rc2-00314-g4963f63fe6 (Jan 09 2023 - 23:59:31 > > > +0100) > > >=20 > > > CPU: Exynos4412 @ 1 GHz > > > Model: Odroid based on Exynos4412 > > > Type: u3 > > > DRAM: 2 GiB > > > LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling > > > LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling > > > LDO21@TFLASH_2.8V: set 2800000 uV; enabling > > > MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0 > > > Loading Environment from MMC... *** Warning - bad CRC, using > > > default > > > environment > > >=20 > > > In: serial > > > Out: serial > > > Err: serial > > > Boot device: MMC(2) > > > Net: No ethernet found. > > > Hit any key to stop autoboot: 0 > > > Odroid # env set fk_kvers 5.10.0-20-armmp > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} > > > /boot/dtbs/${fk_kvers}/exynos4412-odroidu3.dtb > > > 53440 bytes read in 49 ms (1 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} > > > /boot/vmlinuz-${fk_kvers} > > > 4973056 bytes read in 181 ms (26.2 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} > > > /boot/initrd.img-${fk_kvers} > > > 22231585 bytes read in 777 ms (27.3 MiB/s) > > > Odroid # env set bootargs console=3DttySAC1,115200n8 > > > Odroid # env set initrd_high 0x50000000 > > > Odroid # bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} > > > ${fdt_addr_r} > > > Kernel image @ 0x41000000 [ 0x000000 - 0x4be200 ] > > > ## Flattened Device Tree blob at 40800000 > > > Booting using the fdt blob at 0x40800000 > > > Loading Ramdisk to 4eacc000, end 4ffffa21 ... OK > > > Loading Device Tree to bae6a000, end bae7a0bf ... OK > > >=20 > > > Starting kernel ... > > >=20 > > > [ 0.000000] Booting Linux on physical CPU 0xa00 > > > > > >=20 > > > The difference between those two runs is the location where U-Boot > > > loads the > > > initrd. The parent commit of 4963f63f boots fine without setting > > > `initrd_high`: > > >=20 > > > U-Boot 2020.10-rc2-00313-gdfaf6a5797 (Jan 10 2023 - 00:13:19 > > > +0100) > > >=20 > > > CPU: Exynos4412 @ 1 GHz > > > Model: Odroid based on Exynos4412 > > > Type: u3 > > > DRAM: 2 GiB > > > LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling > > > LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling > > > LDO21@TFLASH_2.8V: set 2800000 uV; enabling > > > MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0 > > > Loading Environment from MMC... *** Warning - bad CRC, using > > > default > > > environment > > >=20 > > > In: serial > > > Out: serial > > > Err: serial > > > Boot device: MMC(2) > > > Net: No ethernet found. > > > Hit any key to stop autoboot: 0 > > > Odroid # env set fk_kvers 5.10.0-20-armmp > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} > > > /boot/dtbs/${fk_kvers}/exynos4412-odroidu3.dtb > > > 53440 bytes read in 49 ms (1 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} > > > /boot/vmlinuz-${fk_kvers} > > > 4973056 bytes read in 181 ms (26.2 MiB/s) > > > Odroid # load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} > > > /boot/initrd.img-${fk_kvers} > > > 22231585 bytes read in 776 ms (27.3 MiB/s) > > > Odroid # env set bootargs console=3DttySAC1,115200n8 > > > Odroid # bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} > > > ${fdt_addr_r} > > > Kernel image @ 0x41000000 [ 0x000000 - 0x4be200 ] > > > ## Flattened Device Tree blob at 40800000 > > > Booting using the fdt blob at 0x40800000 > > > Loading Ramdisk to 4eacc000, end 4ffffa21 ... OK > > > Loading Device Tree to 4eabb000, end 4eacb0bf ... OK > > >=20 > > > Starting kernel ... > > >=20 > > > [ 0.000000] Booting Linux on physical CPU 0xa00 > > > > > >=20 > > > I've tested two different kernels from Debian (buster and bullseye) > > > and both > > > have the same problem. I'm building U-Boot using the default config > > > for > > > board `odroid` and boot the Odroid from an SD card with firmware > > > (`bl1`, > > > `bl2` and `tzsw`) from Hardkernel's clone of the u-boot repository > > > [1]. > > > There are no peripherals connected apart from the SD card and the > > > serial > > > console. Please let me know if you need more information. > >=20 > > Interesting. So what does "bdi" show, both in the older good and > > then current tree? Specifically the information about where DRAM is, and > > how large it is? Thanks. > >=20 > > -- > > Tom >=20 > Both 4963f63f (not working) and its parent (working) produce the same > output: >=20 > boot_params =3D 0x40000100 > DRAM bank =3D 0x00000000 > -> start =3D 0x40000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000001 > -> start =3D 0x50000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000002 > -> start =3D 0x60000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000003 > -> start =3D 0x70000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000004 > -> start =3D 0x80000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000005 > -> start =3D 0x90000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000006 > -> start =3D 0xa0000000 > -> size =3D 0x10000000 > DRAM bank =3D 0x00000007 > -> start =3D 0xb0000000 > -> size =3D 0x0ff00000 > memstart =3D 0x40000000 > memsize =3D 0x7ff00000 > flashstart =3D 0x00000000 > flashsize =3D 0x00000000 > flashoffset =3D 0x00000000 > baudrate =3D 115200 bps > relocaddr =3D 0xbfe83000 > reloc off =3D 0x7c083000 > Build =3D 32-bit > current eth =3D unknown > ethaddr =3D (not set) > IP addr =3D > fdt_blob =3D 0xbae7bf00 > new_fdt =3D 0xbae7bf00 > fdt_size =3D 0x00002fa0 > lmb_dump_all: > memory.cnt =3D 0x1 > memory.size =3D 0x0 > memory.reg[0x0].base =3D 0x40000000 > .size =3D 0x7ff00000 >=20 > reserved.cnt =3D 0x1 > reserved.size =3D 0x0 > reserved.reg[0x0].base =3D 0xbae7acd0 > .size =3D 0x5085330 > arch_number =3D 0x000010c1 > TLB addr =3D 0xbfef0000 > irq_sp =3D 0xbae7bef0 > sp start =3D 0xbae7bee0 > Board Type =3D 0 > Early malloc usage: f0 / 400 >=20 > I'm not sure if this is relevant, but with the failing commit I can get t= he > kernel to start with `initrd_high` set to `0x70000000` or lower, but not > higher. OK, so 8 whole banks, of 256MB each. Does this platform have 2GB of memory for real? --=20 Tom --UKgxxiHAJdS3J+5E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmO97+IACgkQFHw5/5Y0 tywNdwv/at8ZeImi5BDEBiUfr2PUA0hCCPvckrydkeLcmh11ABoY4DeuTvqv0CyQ PKdvnbMlxHNyqzo+qrufF2+sqQaRR0S4LFEW1mXepfVMUypEKSBwm8YKBDiyrB4e RBaJFgGln12783ub78OqiEbLdOLSXqNsx9pgCRfFrtShjMQTxNKSxQIvdYN1bjhu A9yTWJWYWpFZY0e7W+qsCVzOE3woQS09WfwvzkOtbW2G6M+kwO100hzURGtCX3+C d5FBkC9HdKutBjpUJkBnnRxG9NmCAJ4v/eqWDf8yZabSrZa7kiAJMYif2c02sPZ3 3emRPRFR6Gqu7gNCwtO15bBpZ7N314/fDCk7ZwLIBTAx+wjE0Lc+HThW19mY7aVa 3aVH+WlWDfDfWAP8zskMH+s1LUKtiFE4RY9Eo0PTO/HPO2qLuuoVOzX7p1x+XiZJ YQYqakaP+abkB8Nn1XvOdZZh+2PQ+fUhyfbVKJ2yXcXQNqEDGL+S8qqNVit7fU0m Yf+y0NDo =vPJj -----END PGP SIGNATURE----- --UKgxxiHAJdS3J+5E--