-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device trees limit Linux to 4GB of RAM on 8GB devices #20
Comments
Hello @electrorys you are correct the default U-boot env. has an issue with the correct RAM size. |
@electrorys @dtometzki Is there a quick fix for this until the next debian image release ? |
Hello, with an update of u-boot and opensbi and the new Debian Image 69 the issue is solved. |
Thanks for your answer. With u-boot and opensbi updated (flashcp x 2) and the minimal Debian Image 69, I only see 4GB. Is there a u-boot parameter I can set manually ? |
Hello, do you used the both files from here to flash https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v2.5.0 ? |
Yes. |
Hi,
It worked fine for me this way. |
@electrorys Excellent. It works!!! Decompiling and recompiling the dtb file was enough. I now see 8GB instead of 4GB. Thank you so much. |
The problem is visionfive2_mem_set is only run for bootcmd_distro (which AFAICT nothing actually runs, since boot_targets its "mmc0 dhcp") via set_fdt_distro. Neither bootcmd_mmc0 nor bootcmd_dhcp call it. The whole set of U-Boot scripts seems like a mess. Hopefully upstreaming cleans this up to be sane (and adds both USB and PCIe support...). |
Based on discussion from starfive-tech/VisionFive2#20
See: starfive-tech/VisionFive2#20 Reviewed-by: Christian Stewart <[email protected]> Signed-off-by: Max Berger <[email protected]>
See: starfive-tech/VisionFive2#20 Reviewed-by: Christian Stewart <[email protected]> Signed-off-by: Max Berger <[email protected]>
You need a 3rd FAT boot partition with boot_targets=distro mmc0 dhcp to have
|
Having tried different images for a board with 8GB of memory, with a native bootloader, 4GB is always available, so I made an overlay file to configure the 8GB memory |
At bootup, the default dtb was not /boot/dtbs/starfive/jh7110-visionfive-v2.dtb that got loaded. I would recommend using this: In that manner, you don't have to modify or use setenv to point to something new. Thank you for listening. |
Hi, please accept my thanks for development and release of this wonderful board.
There is small issue with device trees which can confuse newcomers like me:
in current linux you provide there, in https://github.com/starfive-tech/linux/blob/f0fce0037f9cc3fa6013d14d2f11fff7cf1a19da/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi#L47
states that only 4GB will be visible to Linux.
Situation: I ordered 8GB version, downloaded Debian Image-69 and booted, but I've seen only around 4GB of free RAM and I immediately thought that I received wrong package. But thanks to people from #riscv-main @ matrix.org I nailed down that my device is okay but wrong DTS statement limits Linux to 4GB instead of 8GB RAM.
As a quick hack I had to change it to:
(note
0x1
was changed to0x2
inreg
statement),and Debian seen full amount of RAM.
If this issue is wrong (I booted Debian with default U-Boot environment with U-Boot updated from this repo after I received my board), then please ignore.
Thank you!
The text was updated successfully, but these errors were encountered: