linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Yangyu Chen <cyy@cyyself.name>
To: linux-riscv@lists.infradead.org
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Conor Dooley <conor@kernel.org>,
	linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	Alexandre Ghiti <alex@ghiti.fr>, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, Yangyu Chen <cyy@cyyself.name>
Subject: [RFC PATCH 0/1] riscv: dts: Allow BUILTIN_DTB for all socs
Date: Wed, 21 Feb 2024 03:01:53 +0800	[thread overview]
Message-ID: <tencent_AB625442CC1BCFF86E04D7B5891C43719109@qq.com> (raw)

The BUILTIN_DTB kernel feature on RISC-V only works on K210 SoC only. This
patch moved this configuration to entire riscv.

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. 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 
in the DT manually.

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. 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.

Yangyu Chen (1):
  riscv: dts: Allow BUILTIN_DTB for all socs

 arch/riscv/Kconfig                  | 16 ++++++++++++++-
 arch/riscv/Kconfig.socs             | 32 -----------------------------
 arch/riscv/boot/dts/Makefile        |  2 +-
 arch/riscv/boot/dts/canaan/Makefile |  2 --
 4 files changed, 16 insertions(+), 36 deletions(-)

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2024-02-20 19:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 19:01 Yangyu Chen [this message]
2024-02-20 19:03 ` [RFC PATCH 1/1] riscv: dts: Allow BUILTIN_DTB for all socs Yangyu Chen
2024-02-21  1:11   ` Conor Dooley
2024-02-21  7:01     ` Yangyu Chen
2024-02-21 18:40   ` Yangyu Chen
2024-02-22 21:05   ` Conor Dooley
2024-02-20 20:46 ` [RFC PATCH 0/1] " Alexandre Ghiti
2024-02-22 20:58   ` Palmer Dabbelt
2024-02-21 11:30 ` Conor Dooley
2024-02-21 14:28   ` Yangyu Chen
2024-02-22 20:59     ` Conor Dooley
2024-02-23  7:42       ` Yangyu Chen
2024-02-23 11:39         ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_AB625442CC1BCFF86E04D7B5891C43719109@qq.com \
    --to=cyy@cyyself.name \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=masahiroy@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).