* [PATCH] riscv: qemu: Remove fdt_high default
@ 2025-09-14 23:45 Vivian Wang
2025-09-15 14:32 ` Tom Rini
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Vivian Wang @ 2025-09-14 23:45 UTC (permalink / raw)
To: Bin Meng, Tom Rini; +Cc: u-boot, Sughosh Ganu, Auer, Lukas, Vivian Wang
Setting fdt_high to all ones is discouraged and does not appear to be
useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
generated internally by QEMU is used while booting. Remove it to allow
U-Boot to pick a suitable address and relocate the FDT.
Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
---
include/configs/qemu-riscv.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
index cf4fcb90b047bb641d702124f2efa451408c0b16..dad59cc0d5827981396b10d9782766d4d9aa29c6 100644
--- a/include/configs/qemu-riscv.h
+++ b/include/configs/qemu-riscv.h
@@ -32,7 +32,6 @@
#define CFG_EXTRA_ENV_SETTINGS \
CFG_STD_DEVICES_SETTINGS \
- "fdt_high=0xffffffffffffffff\0" \
"initrd_high=0xffffffffffffffff\0" \
"kernel_addr_r=0x84000000\0" \
"kernel_comp_addr_r=0x88000000\0" \
---
base-commit: 18973d4b0801ec6d7fddc0084601036b5c3b08ad
change-id: 20250915-qemu-riscv-remove-fdt-high-1ac688dd13bb
Best regards,
--
Vivian "dramforever" Wang
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] riscv: qemu: Remove fdt_high default
2025-09-14 23:45 [PATCH] riscv: qemu: Remove fdt_high default Vivian Wang
@ 2025-09-15 14:32 ` Tom Rini
2025-09-16 0:25 ` E Shattow
2025-09-17 17:18 ` Auer, Lukas
2025-09-19 10:48 ` Leo Liang
2 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2025-09-15 14:32 UTC (permalink / raw)
To: Vivian Wang, Rick Chen, Leo; +Cc: Bin Meng, u-boot, Sughosh Ganu, Auer, Lukas
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
On Mon, Sep 15, 2025 at 07:45:49AM +0800, Vivian Wang wrote:
> Setting fdt_high to all ones is discouraged and does not appear to be
> useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
> generated internally by QEMU is used while booting. Remove it to allow
> U-Boot to pick a suitable address and relocate the FDT.
>
> Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
I'm very glad to see this finally and would like to see the rest of the
RISC-V platforms follow and do the same now.
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] riscv: qemu: Remove fdt_high default
2025-09-15 14:32 ` Tom Rini
@ 2025-09-16 0:25 ` E Shattow
2025-09-16 18:48 ` Tom Rini
0 siblings, 1 reply; 6+ messages in thread
From: E Shattow @ 2025-09-16 0:25 UTC (permalink / raw)
To: Tom Rini, Vivian Wang, Rick Chen, Leo
Cc: Bin Meng, u-boot, Sughosh Ganu, Auer, Lukas, Heinrich Schuchardt
Hi Tom, Add CC: Heinrich
On 9/15/25 07:32, Tom Rini wrote:
> On Mon, Sep 15, 2025 at 07:45:49AM +0800, Vivian Wang wrote:
>
>> Setting fdt_high to all ones is discouraged and does not appear to be
>> useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
>> generated internally by QEMU is used while booting. Remove it to allow
>> U-Boot to pick a suitable address and relocate the FDT.
>>
>> Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
>> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
>
> I'm very glad to see this finally and would like to see the rest of the
> RISC-V platforms follow and do the same now.
>
> Reviewed-by: Tom Rini <trini@konsulko.com>
>
When you say you would like the rest of the RISC-V platforms (to) follow
and do the same; What do you mean? Heinrich and I were trying to
figure this out off of something you said on IRC awhile back. I was
taking a guess it was the qemu config (and this patch makes sense to me
so I think that's part of it), but what else? Is that a reference to
sifive-unleashed config fragment, are there others?
If you give us a detailed hint what we should be looking at it would go
a long way and we can test / figure out the rest. Is initrd_high
all-ones on your radar too?
Thanks,
-E Shattow
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] riscv: qemu: Remove fdt_high default
2025-09-16 0:25 ` E Shattow
@ 2025-09-16 18:48 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2025-09-16 18:48 UTC (permalink / raw)
To: E Shattow
Cc: Vivian Wang, Rick Chen, Leo, Bin Meng, u-boot, Sughosh Ganu,
Auer, Lukas, Heinrich Schuchardt
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
On Mon, Sep 15, 2025 at 05:25:23PM -0700, E Shattow wrote:
> Hi Tom, Add CC: Heinrich
>
> On 9/15/25 07:32, Tom Rini wrote:
> > On Mon, Sep 15, 2025 at 07:45:49AM +0800, Vivian Wang wrote:
> >
> >> Setting fdt_high to all ones is discouraged and does not appear to be
> >> useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
> >> generated internally by QEMU is used while booting. Remove it to allow
> >> U-Boot to pick a suitable address and relocate the FDT.
> >>
> >> Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
> >> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
> >
>
> > I'm very glad to see this finally and would like to see the rest of the
> > RISC-V platforms follow and do the same now.
> >
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> >
>
> When you say you would like the rest of the RISC-V platforms (to) follow
> and do the same; What do you mean? Heinrich and I were trying to
> figure this out off of something you said on IRC awhile back. I was
> taking a guess it was the qemu config (and this patch makes sense to me
> so I think that's part of it), but what else? Is that a reference to
> sifive-unleashed config fragment, are there others?
>
> If you give us a detailed hint what we should be looking at it would go
> a long way and we can test / figure out the rest. Is initrd_high
> all-ones on your radar too?
The simple answer is that no platforms should ever set fdt_high=0xff...
nor initrd_high=0xff... by default. This tells U-Boot to never try and
relocate in memory these parts of the boot even when U-Boot knows that
they will overlap or are not correctly aligned. This in turn leads to
harder to debug failures at run time. Unfortunately RISC-V platforms
were introduced with these set and whatever checkpatch.pl check I had
missed them at the time (aside, most recently checkpatch.pl was missing
this in .env files, I fixed that today).
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] riscv: qemu: Remove fdt_high default
2025-09-14 23:45 [PATCH] riscv: qemu: Remove fdt_high default Vivian Wang
2025-09-15 14:32 ` Tom Rini
@ 2025-09-17 17:18 ` Auer, Lukas
2025-09-19 10:48 ` Leo Liang
2 siblings, 0 replies; 6+ messages in thread
From: Auer, Lukas @ 2025-09-17 17:18 UTC (permalink / raw)
To: wangruikang@iscas.ac.cn, trini@konsulko.com, bmeng.cn@gmail.com
Cc: u-boot@lists.denx.de, sughosh.ganu@linaro.org
On Mon, 2025-09-15 at 07:45 +0800, Vivian Wang wrote:
> Setting fdt_high to all ones is discouraged and does not appear to be
> useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
> generated internally by QEMU is used while booting. Remove it to allow
> U-Boot to pick a suitable address and relocate the FDT.
>
> Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
> ---
> include/configs/qemu-riscv.h | 1 -
> 1 file changed, 1 deletion(-)
Looks good!
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] riscv: qemu: Remove fdt_high default
2025-09-14 23:45 [PATCH] riscv: qemu: Remove fdt_high default Vivian Wang
2025-09-15 14:32 ` Tom Rini
2025-09-17 17:18 ` Auer, Lukas
@ 2025-09-19 10:48 ` Leo Liang
2 siblings, 0 replies; 6+ messages in thread
From: Leo Liang @ 2025-09-19 10:48 UTC (permalink / raw)
To: Vivian Wang; +Cc: Bin Meng, Tom Rini, u-boot, Sughosh Ganu, Auer, Lukas
On Mon, Sep 15, 2025 at 07:45:49AM +0800, Vivian Wang wrote:
> Setting fdt_high to all ones is discouraged and does not appear to be
> useful for RISC-V QEMU. Moreover, it causes a boot failure when the FDT
> generated internally by QEMU is used while booting. Remove it to allow
> U-Boot to pick a suitable address and relocate the FDT.
>
> Closes: https://lore.kernel.org/u-boot/8397369a-9b0b-4798-9c30-3a81165657d6@iscas.ac.cn
> Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
> ---
> include/configs/qemu-riscv.h | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-19 10:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-14 23:45 [PATCH] riscv: qemu: Remove fdt_high default Vivian Wang
2025-09-15 14:32 ` Tom Rini
2025-09-16 0:25 ` E Shattow
2025-09-16 18:48 ` Tom Rini
2025-09-17 17:18 ` Auer, Lukas
2025-09-19 10:48 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox