GithubHelp home page GithubHelp logo

Comments (4)

mssun avatar mssun commented on August 14, 2024

ta_heap and ta_heap_size will be extern in OPTEE:

https://github.com/OP-TEE/optee_os/blob/dd655cb9906c75165774da5dae95c257ee4e2d21/lib/libutee/arch/arm/user_ta_entry.c#L29

If you implement TA in C, you have to set them here:

https://github.com/OP-TEE/optee_os/blob/dd655cb9906c75165774da5dae95c257ee4e2d21/ta/arch/arm/user_ta_header.c#L92

For your issue, you can change them over here:

https://github.com/mesalock-linux/rust-optee-trustzone-sdk/blob/820f9af00f9677c0334b162b971804ed570bff63/examples/message_passing_interface/ta/src/main.rs#L67-L75

I believe it works in our examples since library like serde need more memory, we increase the heap size so that to use it.

from incubator-teaclave-trustzone-sdk.

dreemkiller avatar dreemkiller commented on August 14, 2024

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?

from incubator-teaclave-trustzone-sdk.

mssun avatar mssun commented on August 14, 2024

The entrypoint of a TA is __ta_entry:

https://github.com/OP-TEE/optee_os/blob/b4814b22dcf813691f1a6697e2013b0cbeb8dca3/ta/arch/arm/user_ta_header.c#L43

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.

from incubator-teaclave-trustzone-sdk.

mssun avatar mssun commented on August 14, 2024

Issue staled. I'm closing it. Feel free to reopen if you think it's still valid.

from incubator-teaclave-trustzone-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.