* [PATCH 1/2] riscv: dts: sophgo: cv1800b-milkv-duo: drop reserved memory node
2026-09-21 15:08 [PATCH 0/2] Do not reserve memory for coprocessor FW Andrei Lalaev
@ 2026-09-21 15:08 ` Andrei Lalaev
2026-09-21 15:09 ` [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: " Andrei Lalaev
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Andrei Lalaev @ 2026-09-21 15:08 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yao Zi
Cc: devicetree, linux-riscv, sophgo, linux-kernel, Andrei Lalaev
The current FSBL can load firmware to any address and can also
disable the coprocessor. Therefore, FSBL should modify the device
tree at runtime. Remove the node accordingly.
Signed-off-by: Andrei Lalaev <andrey.lalaev@gmail.com>
---
arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
index 0e6d79e6e3a4..02848bae2e16 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
@@ -22,17 +22,6 @@ aliases {
chosen {
stdout-path = "serial0:115200n8";
};
-
- reserved-memory {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- coprocessor_rtos: region@83f40000 {
- reg = <0x83f40000 0xc0000>;
- no-map;
- };
- };
};
&osc {
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
2026-09-21 15:08 [PATCH 0/2] Do not reserve memory for coprocessor FW Andrei Lalaev
2026-09-21 15:08 ` [PATCH 1/2] riscv: dts: sophgo: cv1800b-milkv-duo: drop reserved memory node Andrei Lalaev
@ 2026-09-21 15:09 ` Andrei Lalaev
2026-09-21 15:15 ` sashiko-bot
2026-10-09 9:47 ` [PATCH 0/2] Do not reserve memory for coprocessor FW Inochi Amaoto
2026-11-01 22:16 ` patchwork-bot+linux-riscv
3 siblings, 1 reply; 6+ messages in thread
From: Andrei Lalaev @ 2026-09-21 15:09 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yao Zi
Cc: devicetree, linux-riscv, sophgo, linux-kernel, Andrei Lalaev
The current FSBL can load firmware to any address and can also
disable the coprocessor. Therefore, FSBL should modify the device
tree at runtime. Remove the node accordingly.
Signed-off-by: Andrei Lalaev <andrey.lalaev@gmail.com>
---
arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
index a2797c0bd767..d4e86c15664e 100644
--- a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
@@ -36,17 +36,6 @@ led-0 {
linux,default-trigger = "heartbeat";
};
};
-
- reserved-memory {
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
-
- coprocessor_rtos: region@8fe00000 {
- reg = <0x8fe00000 0x200000>;
- no-map;
- };
- };
};
&osc {
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
2026-09-21 15:09 ` [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: " Andrei Lalaev
@ 2026-09-21 15:15 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-09-21 15:15 UTC (permalink / raw)
To: Andrei Lalaev; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] dts: ABI breakage by dropping coprocessor reserved-memory node
--
commit fa1a6e529f0f63c13f25ecb8772efefbd481942e
Author: Andrei Lalaev <andrey.lalaev@gmail.com>
riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
This commit drops the reserved-memory node for the coprocessor from the
sg2002-milkv-duo256m device tree. The change is based on the premise that
the current FSBL handles this dynamically at runtime.
> diff --git a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> index a2797c0bd7671..d4e86c15664e6 100644
> --- a/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> +++ b/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
> @@ -36,17 +36,6 @@ led-0 {
> linux,default-trigger = "heartbeat";
> };
> };
> -
> - reserved-memory {
> - #address-cells = <1>;
> - #size-cells = <1>;
> - ranges;
> -
> - coprocessor_rtos: region@8fe00000 {
> - reg = <0x8fe00000 0x200000>;
> - no-map;
> - };
> - };
[Severity: Critical]
Does removing this static fallback node introduce a regression for systems
using an older bootloader?
While newer FSBLs might dynamically inject or update the reserved-memory
node, older FSBLs rely on this static reservation in the device tree. Without
the no-map property for 0x8fe00000, will the kernel treat the 2MB coprocessor
region as general-purpose RAM, since it falls within the standard memory
space?
This could lead to memory corruption if Linux and the active coprocessor
overwrite each other's memory when users upgrade their kernel and device
tree without also upgrading their bootloader, breaking the standard backward
compatibility contract.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260921-sophgo-remove-coprocessor-node-v1-0-ace29446b327@gmail.com?part=2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Do not reserve memory for coprocessor FW
2026-09-21 15:08 [PATCH 0/2] Do not reserve memory for coprocessor FW Andrei Lalaev
2026-09-21 15:08 ` [PATCH 1/2] riscv: dts: sophgo: cv1800b-milkv-duo: drop reserved memory node Andrei Lalaev
2026-09-21 15:09 ` [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: " Andrei Lalaev
@ 2026-10-09 9:47 ` Inochi Amaoto
2026-11-01 22:16 ` patchwork-bot+linux-riscv
3 siblings, 0 replies; 6+ messages in thread
From: Inochi Amaoto @ 2026-10-09 9:47 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Yao Zi,
Andrei Lalaev
Cc: Inochi Amaoto, devicetree, linux-riscv, sophgo, linux-kernel
On Mon, 21 Sep 2026 17:08:58 +0200, Andrei Lalaev wrote:
> Milk-V Duo and Duo-256M reserve a region for coprocessor FW at
> the end of RAM. It is not correct because:
> - FSBL can be configured to load FW into a different region
> - if no firmware is loaded, the reserved memory is wasted
>
> As explained in [1, 2], FSBL should reserve the region at runtime.
>
> [...]
Applied to for-next, thanks!
[1/2] riscv: dts: sophgo: cv1800b-milkv-duo: drop reserved memory node
https://github.com/sophgo/linux/commit/6645398c46219e97fd153ae6188ae86c493d2d6a
[2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
https://github.com/sophgo/linux/commit/60e4cafd30908e7d8cdfdb4fa1a74dabed9f47b5
Thanks,
Inochi
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 0/2] Do not reserve memory for coprocessor FW
2026-09-21 15:08 [PATCH 0/2] Do not reserve memory for coprocessor FW Andrei Lalaev
` (2 preceding siblings ...)
2026-10-09 9:47 ` [PATCH 0/2] Do not reserve memory for coprocessor FW Inochi Amaoto
@ 2026-11-01 22:16 ` patchwork-bot+linux-riscv
3 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-riscv @ 2026-11-01 22:16 UTC (permalink / raw)
To: Andrei Lalaev
Cc: linux-riscv, robh, krzk+dt, conor+dt, chen.wang, inochiama, pjw,
palmer, aou, alex, me, devicetree, sophgo, linux-kernel
Hello:
This series was applied to riscv/linux.git (fixes)
by Inochi Amaoto <inochiama@gmail.com>:
On Mon, 21 Sep 2026 17:08:58 +0200 you wrote:
> Milk-V Duo and Duo-256M reserve a region for coprocessor FW at
> the end of RAM. It is not correct because:
> - FSBL can be configured to load FW into a different region
> - if no firmware is loaded, the reserved memory is wasted
>
> As explained in [1, 2], FSBL should reserve the region at runtime.
>
> [...]
Here is the summary with links:
- [1/2] riscv: dts: sophgo: cv1800b-milkv-duo: drop reserved memory node
https://git.kernel.org/riscv/c/6645398c4621
- [2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
https://git.kernel.org/riscv/c/60e4cafd3090
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread