What are the maximal heap size and stack size for Trusted Applications in Trusty?

Hi,
I am trying to implement programs in TEE on Trusty that applies to Jetson Xavier NX, Jetson AGX Xavier series, and Jetson TX2 series devices. And I want to store some confidential data in secure world (TEE), which may consume large memories (in GB). Is that possible ? By manifests for Trusted Applications, I am able to reset TRUSTY_APP_CONFIG_MIN_HEAP_SIZE and TRUSTY_APP_CONFIG_MIN_STACK_SIZE. Here comes the question : what are the maximal heap size and stack size for a TA ? I have read the architecture of Trusty from here, which didn’t solve my problem.

Please point out my possible misunderstandings.
Thanks in advance !

Hi,
This may not be the use-case we have considered and tested. Could you share a more specific value to the data? Like 1GB < data < 2GB.

Yes, the current case would be 1.3 GB data. Well, if it could be larger it would be better.

Hi,
We have checked this and here is the suggestion:
TZDRAM is a software carveout. The default size is 16MB.

In case, it’s not enough. Please try the property in the MB1 BCT.
carveout.tzdram.size = 0x01000000; #16MB

You may try to Increasing the TOS memory to 128MB or 256MB, but 13GB is unlikely the case in any application dealing with runtime memory.

1 Like

Hi,
Thanks a lot !
Could you please introduce a bit more about how to increase TOS memory ? Is that an operation from software side or an extensional service/hardware ?

Hi,
Please adjust this:

carveout.tzdram.size = 0x01000000; #16MB

Hi,

Thanks.
I think that I misunderstood your last answer. So the TOS memory mentioned above is actually controlled by the configuration if carveout.tzdram.size, am I right ?

Another small question about max size of per port buffer in tipc connection, is it fixed to 4096B? Because I tried to increase it to 8192B, which failed to create the port.
Thanks !

Hi,

Yes.

Yes. The max msg size is the same as the PAGE_SIZE which is 4KB in the kernel.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.