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
