TF-RMM / tf-rmm

Reference implementation of Arm-CCA RMM specification
BSD 3-Clause "New" or "Revised" License
37 stars 10 forks source link

RMM is not working when DRAM size increases #30

Open SinaAb7 opened 1 month ago

SinaAb7 commented 1 month ago

Hi all, I am working with Arm reference solution Arm-reference-solution to boot realm in FVP. What I can see is when I increase DRAM size (from default 4GB to 8GB) of FVP and change DTB passed to the NW hypervisor, RMM stops working and I am not able to create realm VMs anymore. I can already see lines limiting the size of DRAM in RMM build system as well as source code. 1- Why do we need such a limitation is RMM? 2- IF it is possible can you guide me through this matter as I want to run some ML models requiring larger size of DRAM to be supported.

Cheers, Sina

soby-mathew commented 1 month ago

Hi @SinaAb7 , RMM does not have dynamic memory allocation and hence it needs to statically size data structures which track DRAM pages.

You can change the RMM_MAX_GRANULES build option in TF-RMM when building. If the size can cover the increased DRAM size, the boot will succeed.

We have some plans to remove this dependancy and it is currently being prototyped.

Also would recommend Shrinkwrap tool to build the software stack as it picks up latest version of TF-RMM and other software components. See this page to build for 3 world config : https://shrinkwrap.docs.arm.com/en/latest/userguide/configstore/cca-3world.html