Skip to content
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

Renesas-Yocto-v5.1.0 release with Salvator-XS (H3 ES3.0) 8GB board memory issue #30

Open
yf13 opened this issue Nov 8, 2021 · 4 comments

Comments

@yf13
Copy link

yf13 commented Nov 8, 2021

Hi,

I am trying the Renesas-Yocto-v5.1.0 release branch with a Salvator-XS (H3 ES3.0) 8GB board. However, using the kernel and .dtb files generated from bitbake core-image-minimal command can only recognize 3.9GB memory after kernel boots.

Then I converted the r8a77951-salvator-xs.dtb to a .dts file and found the memory@ entries add up to 4GB:

$ dtc -I dtb tmp/deploy/images/salvator-x/r8a77951-salvator-xs.dtb -O dts | fgrep -A5 memory@

        memory@48000000 {
                device_type = "memory";
                reg = <0x00 0x48000000 0x00 0x38000000>;
        };

        memory@500000000 {
                device_type = "memory";
                reg = <0x05 0x00 0x00 0x40000000>;
        };

        memory@600000000 {
                device_type = "memory";
                reg = <0x06 0x00 0x00 0x40000000>;
        };

        memory@700000000 {
                device_type = "memory";
                reg = <0x07 0x00 0x00 0x40000000>;
        };

This tells that by default 8GB devices are treated as 4GB in the Renesas-Yocto-v5.1.0 release?

I further edited the memory@xxxx entries in the .dts file to enlarge the length of first entry to 0x78000000 and length of the rest three entries to 0x01 0x00 and then converted it to .dtb file and tried on the target H3 device. This time, I can see kernel reports 6.9GB memory in total. This is better, but there is still 1GB memory not reported by the kernel. I grabbed the /proc/device-tree from the target system and checked it with dtc tool -- this time I saw that the memory@48000000 {} item contains a length of 0x38000000, even though I used the length of 0x78000000.

Could your experts explain how I can get 7.9GB total memory from this Yocto-v5.1.0 kernel?

Regards,
yf13

@yf13 yf13 changed the title Yocto v5.1.0 with Salvator-XS 8GB Renesas-Yocto-v5.1.0 release with Salvator-XS (H3 ES3.0) 8GB board memory issue Nov 8, 2021
@DuyDang007
Copy link
Contributor

Hi @yf13 ,

We confirm the issue on v5.1.0 release. It was fixed in v5.5.0 release. Could you try it?

@yf13
Copy link
Author

yf13 commented Nov 17, 2021

Hi @DuyDang007,

Thanks for the information.

I tried core-image-minimal recipe in v5.5.0 and generated .dtb files. However, my check with dtc command tells that both r8a77951-salvator-xs.dtb and r8a779m1-salvator-xs.dtb are targeting 4GB boards.

I am unsure what you mean by fixed in v5.5.0.

Did you mean that I shall go ahead and hack these .dtb files with 8GB memory map and try on the device?

Regards,
Yanfeng

@DuyDang007
Copy link
Contributor

Hi @yf13

Linux memory layout was passed from arm-trusted-firmware. Please use arm trusted firmware and also u-boot from v5.5.0

Regards,
Duy

@yf13
Copy link
Author

yf13 commented Nov 24, 2021

Thanks. Is there any links to any documents regarding this memory layout change? Does that mean memory related parts in kernel .dtb is totally ignored from now on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants