BBAI64 | reduced RAM size with latest debian image

Hello,
I am booting my BBAI-64 with debian boot image bbai64-debian-11.4-xfce-edgeai-arm64-2022-09-02-10gb.img.xz and observing the RAM size reduced to 2178MB.

Debian GNU/Linux 11 BeagleBone ttyS2

BeagleBoard.org Debian Bullseye Xfce Image 2022-09-02
Support: https://bbb.io/debian
default username:password is [debian:temppwd]

BeagleBone login: root
Password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Sep 23 09:47:49 UTC 2022 on ttyS2
root@BeagleBone:~# 
root@BeagleBone:~# 
root@BeagleBone:~# free -m
               total        used        free      shared  buff/cache   available
Mem:            2178         494        1204           2         478        1648
Swap:           2047           0        2047
root@BeagleBone:~# 
root@BeagleBone:~# grep MemTotal /proc/meminfo
MemTotal:        2230440 kB
root@BeagleBone:~# 

The factory boot image of BBAI-64 was showing correct RAM size i.e. 4GB.

Any idea what changed in image for getting lower RAM?

Regards,
Vaibhav

I believe the other RAM is mapped to the various other cores in the chip. I think there is an alternative DTB file which does not allocate any memory.

k3-j721e-beagleboneai64-no-shared-mem.dtb

1 Like

I’m seeing the same thing with the same image:

debian@BeagleBone:~$ free -h
               total        used        free      shared  buff/cache   available
Mem:           2.1Gi       253Mi       1.4Gi       1.0Mi       465Mi       1.8Gi
Swap:          1.0Gi          0B       1.0Gi

Do you know which of the peripherals the memory is mapped to? And why the default image doesn’t do this but the latest EdgeAI one does? Is it that the EdgeAI image expects the DSP units to be using more RAM?

Once I get things more set up I’ll decompile the dtb and see if I can figure it out, but I figure I’d post and ask in the meantime. And, more importantly, I’d like to try to understand whether this mapping is something I want!

Thanks.

I did (running minimal version, but should be using the same device tree files)
After booting
cd /boot/firmware
mv k3-j721e-beagleboneai64.dtb k3-j721e-beagleboneai64-shared-mem.dtb
cp k3-j721e-beagleboneai64-no-shared-mem.dtb k3-j721e-beagleboneai64.dtb

reboot

I had to move/copy the files as although uboot has a default_device_tree env variable set to k3-j721e-beagleboneai64.dtb, changing this to k3-j721e-beagleboneai64-no-shared-mem.dtb still loaded the old dtb file.

root@BeagleBone:~# free -h
               total        used        free      shared  buff/cache   available
Mem:           3.6Gi        91Mi       3.4Gi       1.0Mi        82Mi       3.5Gi
Swap:             0B          0B          0B

I suspect the remaining memory is being allocated for video ram.

If you want to adjust the memory allocation you will need to modify the dts file.
If you have the kernel source it is

arch/arm64/boot/dts/ti/k3-j721e-rtos-memory-map.dtsi

This sets the memory allocation and the firmware files to load.

1 Like

Thank you! That worked great, I appreciate the help.

Sadly, it didn’t solve my current problem, but at least I have more than 50M to spare when it crashes :laughing:

All 4GB’s should show up if you load “k3-j721e-beagleboneai64-no-shared-mem.dtb” on startup…

Please run:

sudo beagle-version

To verify which loaded…

Regards,