All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Hiago De Franco <hfranco@baylibre.com>,
	Leo Yu-Chi Liang <leo.liang@sifive.com>,
	u-boot@lists.u-boot-project.org, Yao Zi <me@ziyao.cc>
Cc: Tom Rini <trini@konsulko.com>, Tim Ouyang <tim609@andestech.com>,
	Zhuxu Ran <zhuxu_ran@zohomail.com>,
	Kongyang Liu <seashell11234455@gmail.com>
Subject: Re: [PATCH 2/2] riscv: cpu: cv1800b: keep U-Boot out of reserved memory
Date: Wed, 7 Oct 2026 21:46:25 +0000	[thread overview]
Message-ID: <asa9sZjT6Oo0Druq@pie> (raw)
In-Reply-To: <20260930-256m-fixes-v1-2-69546876ff28@baylibre.com>

On Wed, Sep 30, 2026 at 09:17:50AM -0300, Hiago De Franco wrote:
> The upstream devicetrees reserve the end of DRAM for the coprocessor
> firmware, as a no-map region:
> 
>   cv1800b-milkv-duo:    region@83f40000, size 0xc0000
>   sg2002-milkv-duo256m: region@8fe00000, size 0x200000
> 
> ram_top is the end of DRAM, so U-Boot relocates into that region. On the
> Milk-V Duo, relocaddr is 0x83f76000, and LMB then fails to reserve the
> region:
> 
> ERROR: reserving fdt memory region failed (addr=83f40000 size=c0000
> flags=2): -17
> 
> Implement board_get_usable_ram_top() with get_mem_top(), which returns
> the highest free window below the devicetree reserved regions, as the
> Xilinx boards do.

You might already notice this series[1] removing co-processor-related
reserved regions from the upstream devicetree, which, in my opinion, is
the correct way to go (and actually suggested by myself), since the
code occupying a memory region should take the responsibility to reserve
it.

So issues being solved here might simply go away in the future, it might
be useful to add the context that this is a temporary workaround.

The other way to go is simply removing the reserved region from the
U-Boot devicetree. IIRC the vendor FSBL doesn't load any co-processor
firmware unless you package one into the fip.bin.

Regards,
Yao Zi

  reply	other threads:[~2026-10-07 22:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 12:17 [PATCH 0/2] riscv: cv1800b: Milk-V Duo boot fixes Hiago De Franco
2026-09-30 12:17 ` [PATCH 1/2] board: sophgo: milkv_duo_256m: fix fdtfile quoting Hiago De Franco
2026-09-30 12:17 ` [PATCH 2/2] riscv: cpu: cv1800b: keep U-Boot out of reserved memory Hiago De Franco
2026-10-07 21:46   ` Yao Zi [this message]
2026-10-07 21:48 ` [PATCH 0/2] riscv: cv1800b: Milk-V Duo boot fixes Yao Zi
2026-10-09 14:31   ` Hiago De Franco
2026-10-11  7:23     ` Zhuxu Ran

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=asa9sZjT6Oo0Druq@pie \
    --to=me@ziyao.cc \
    --cc=hfranco@baylibre.com \
    --cc=leo.liang@sifive.com \
    --cc=seashell11234455@gmail.com \
    --cc=tim609@andestech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=zhuxu_ran@zohomail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.