[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac11967c-3ab4-42be-86ca-0d40c35eee04@ghiti.fr>
Date: Tue, 20 Feb 2024 21:46:57 +0100
From: Alexandre Ghiti <alex@...ti.fr>
To: Yangyu Chen <cyy@...self.name>, linux-riscv@...ts.infradead.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Conor Dooley <conor@...nel.org>, linux-kernel@...r.kernel.org,
Masahiro Yamada <masahiroy@...nel.org>, Rob Herring <robh+dt@...nel.org>,
devicetree@...r.kernel.org
Subject: Re: [RFC PATCH 0/1] riscv: dts: Allow BUILTIN_DTB for all socs
Hi Yangyu,
On 20/02/2024 20:01, 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.
>
> 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
Orthogonal to this patch, but if needs be, we can fix this issue with
128G on sv39 by changing the sv39 address space layout, we still have
room to gain the 4G you miss, at that time I was pretty sure that amount
of memory would come with sv48 :)
Thanks,
Alex
> 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(-)
>
Powered by blists - more mailing lists