Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2301514rdb; Wed, 21 Feb 2024 03:33:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/njZzK3Q4DMwgL+XrXmmoLiVkZ5fSdmLKuLzz76U1ODg0cL2CdHagaz9iWZcj7Hq0AcKQgUvnK2SsL0+bI9g+FAuvvGW/qAulYB9oOw== X-Google-Smtp-Source: AGHT+IEPxCj3b9AcjLH98Vdwaw/L1c1RgS6kE9oxEUHRH0r1ls9hfEEdgJELto5SDfIZYWd+GnBv X-Received: by 2002:a9d:6c8f:0:b0:6dd:ed57:59ad with SMTP id c15-20020a9d6c8f000000b006dded5759admr19226549otr.8.1708515200961; Wed, 21 Feb 2024 03:33:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708515200; cv=pass; d=google.com; s=arc-20160816; b=qi9KblelXMg5BNGEn7s7RnKJFxc6kNu1tAJ9yG3vwS9V9B3MtsLGl8Sgcb2VaR/KCa +Kj/gl1/DgWY67QAIMS+gvYCeXwa+JSpASODoGoYxPR4VQuUvPMOCglxaXqXSZAIoQL/ lzea7S/vSerEMcBDUCTEw/1CO5Qa23cjJPTkIriHVcGa/f7IMTeJEzuddbW2/C9VCcXH VoZrBu+j0QBkvpOKaDEhO7qYKP2clEfkjIcvAfjKkyf7E2Dg4XZedtprard5r8rMMZ9F BdMYWLHvs+9jpzNa1vSLJU5eE0rdujfXGitHq/akgb0IoZ8+O6CfADosQ7DtMbYV3pS5 UKrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=R06aAEMhs4VND/RSzWUYXOWMIOf4o7CtU24ik/gBYso=; fh=rsC2MaRTsggPYuDfi4QdLi9xg7Limckht3vl5o3nGbk=; b=u5A0drfEFac14kf3nUCQ/7j5HKVXkU9ax0QFwc/PUyOH/K6BsIaJXIkLm/5zRuzIT7 j4QRdTMgyfQHciElG27aRFJkvXcZRsvW+Mem2rH10mfaQadHQAiAkMzxznrNcVjfyPOC WMBHkb4xKg4vaCGSYIXGhWr0lufxS8XhQtW5mn+we3orrX7jKr0x+bgij6iMJdG0KFlA iE9dwTALjSaivgnI0PVwnonSn8yLWyOtMrtS0aWLAIFKpQQS7uh52IQR8CaHNGVv2vGy zZZxnwJiDATWzRNMJEAPaOCDmg2ukao/l9jWPX3un/JW8Gjx4h5dq7VHvcS2LH1f6uZA v2Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDaPoHyg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e22-20020a656796000000b005d55aec96b2si7855255pgr.41.2024.02.21.03.33.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 03:33:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KDaPoHyg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 833A5283F7F for ; Wed, 21 Feb 2024 11:33:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06BAB405DD; Wed, 21 Feb 2024 11:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KDaPoHyg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A5D540BF0; Wed, 21 Feb 2024 11:31:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708515062; cv=none; b=ucMusyf8lfU6aaor5rIt7eqjx6esaYs3mXXI+wxPTjP15gFownIt6+LlFRSd8vQFa6+qy77zzs8A8iEeP9AZCKJDwTlqsHpLY5RiWMmxiUYyMdHNmAQXYarIw1U66sAs7+oF3GB9AGhJOMHPkXQQXT7sCzjC4J2TXcUMg4tDQ7g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708515062; c=relaxed/simple; bh=R06aAEMhs4VND/RSzWUYXOWMIOf4o7CtU24ik/gBYso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KHgaOVAt2TeZ3kN94RTFjwWeNMf+2f9kQPjRs/SZsgzcAwXN9IngFOXB0Nr+oEaE9Xj61a3qZ8Yuw/W7kbK691p1F46nwvvk2j/mUMvXcENFGXoh54NyWgkzawzMbPculevuMnMN8ibFhALzVSt+kO/BhEeZlTuqyJ5Ee2UPzVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KDaPoHyg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D8BCC433F1; Wed, 21 Feb 2024 11:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708515061; bh=R06aAEMhs4VND/RSzWUYXOWMIOf4o7CtU24ik/gBYso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KDaPoHyg0AHRcXQMxanR12gVR12clkhaAkwfKJCuJzmieyysXJRL9eC6SSH6dTa+r HCsjYMivTJUX7bKJLQVWT9nXnfedTTBy8Hn+pr8Suf014f+f8dap/wwR1GCj20jMkz 4iORMgd7Hl+JTKLIpPn8UE+9TvHOtTwakxCKPgXF5/hWBj7+msySjnAtNIup4dIEqj WmQztSkiw3aUB8pbyvo85E9XXRGvH70OtAMF3LNRhbYoHv/7Iw/YZZ/HZV4c+EWwFA UXyoXCMHo7GRT734ub1xahDq7M/Gy5+0vUuYJHxoGr0is8QtBFWas3hI31JqicvcuC 5FUbGRU7CRnyA== Date: Wed, 21 Feb 2024 11:30:57 +0000 From: Conor Dooley To: Yangyu Chen Cc: linux-riscv@lists.infradead.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, Masahiro Yamada , Alexandre Ghiti , Rob Herring , devicetree@vger.kernel.org Subject: Re: [RFC PATCH 0/1] riscv: dts: Allow BUILTIN_DTB for all socs Message-ID: <20240221-islamic-quartered-3863e44bc862@spud> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6BDdXDRGwPxzf+xE" Content-Disposition: inline In-Reply-To: --6BDdXDRGwPxzf+xE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Wed, Feb 21, 2024 at 03:01:53AM +0800, Yangyu Chen wrote: > The BUILTIN_DTB kernel feature on RISC-V only works on K210 SoC only. This > patch moved this configuration to entire riscv. To be honest, I would rather delete BUILTIN_DTB (and the configurations that depend on it) than expand its usefulness. > Although BUILTIN_DTB is not a good choice for most platforms, it is likely > to be a debug feature when some bootloader will always override something > like the memory node in the device tree to adjust the memory size from SPD > or configuration resistor, which makes it hard to do some debugging. My inclination here is to say "fix your bootloader" and if that's not possible, chainload a bootloader that allows you control over modifications to your devicetree. > As an > example, some platforms with numa like sg2042 only support sv39 will fail > to boot when there is no ZONE_HIGHMEM patch with 128G memory. If we want > a kernel without this patch to boot, we need to write the memory nodes=20 > in the DT manually. If, as Alex suggests, there's a way to gain support some more memory in sv39, we should do so - but it is worth mentioning that highmem is on the removal list for the kernel, so mainline support for that is highly unlikely. > Also, changing DT on some platforms is not easy. For Milk-V Pioneer, the > boot procedure is ZSBL -> OpenSBI -> LinuxBoot -> Linux. If DT gets > changed, OpenSBI or LinuxBoot may refuse to boot. And there is some bug on > LinuxBoot now which does not consume --dtb argument on kexec and always > uses DT from memory. I don't use Linuxboot, but let me try to understand. Linuxboot uses kexec to boot the main Linux kernel, but the dtb you want to use is not used, and instead the one that Linuxboot itself was booted with is used? It sounds like Linuxboot has a --dtb argumet that is meant to be used to set the dtb for the next stage, but that argument is being ignored? That sounds like a pretty serious issue with Linuxboot which should be fixed - what am I missing? > So I would like to do debugging on DT using > BUILTIN_DTB, which makes it very simple, > I can even install the kernel in > the distro's way and provide a kernel package for other users to test. I'm not sure what you mean by this, other distros manage to create kernel packages without using builtin dtbs. Thanks, Conor. --6BDdXDRGwPxzf+xE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdXe8QAKCRB4tDGHoIJi 0vrYAP9VXm6khUlWB8q8p1RxXCZDwC0wOdqAAu2teabf2mgMbAEA0oaXGtQIWT+6 hRyOdPEH0c08Xd4EhI/UdYf2kNSMkwc= =yHib -----END PGP SIGNATURE----- --6BDdXDRGwPxzf+xE--