Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Andrei Lalaev" <andrey.lalaev@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] riscv: dts: sophgo: sg2002-milkv-duo256m: drop reserved memory node
Date: Mon, 21 Sep 2026 15:15:58 +0000	[thread overview]
Message-ID: <20260921151558.D9B351F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260921-sophgo-remove-coprocessor-node-v1-2-ace29446b327@gmail.com>

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

      reply	other threads:[~2026-09-21 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-09-21 15:15   ` sashiko-bot [this message]

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=20260921151558.D9B351F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=andrey.lalaev@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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