Closed dreemkiller closed 4 years ago
ta_heap
and ta_heap_size
will be extern in OPTEE:
If you implement TA in C, you have to set them here:
For your issue, you can change them over here:
I believe it works in our examples since library like serde need more memory, we increase the heap size so that to use it.
I found the functions in user_ta_entry.c, but I do not see them getting called. The main entry point for user_ta_entry.c , __utee_entry, is not getting called. Do I need to somehow call __utee_entry in the create or open_session functions of my TA in order to get my ta_heap allocation added to the memory pools?
The entrypoint of a TA is __ta_entry
:
This entrypoint is specified by linker: https://github.com/OP-TEE/optee_os/blob/b4814b22dcf813691f1a6697e2013b0cbeb8dca3/ta/arch/arm/link.mk#L29
So, I think it is already added to the memory pools when TA started.
Issue staled. I'm closing it. Feel free to reopen if you think it's still valid.
I'm having an issue where a TA is running out of heap memory. I've increased TA_DATA_SIZE, but this appears to have no effect. Looking through the code, the ta_heap array is allocated in ta_static.rs and placed in bss. However, I cannot find where ta_heap is being added to the memory pools (or even if the OPTEE memory pool implementation is being used by the rust allocator). Where in the code is the ta_heap array being used?