Git Product home page Git Product logo

Comments (9)

jenswi-linaro avatar jenswi-linaro commented on June 18, 2024

Yes, the heap memory is carved out from that range.

from optee_os.

etienne-lms avatar etienne-lms commented on June 18, 2024

TZDRAM_SIZE covers both TEE_RAM and TA_RAM (in the most common case where CFG_WITH_PAGER=n).
CFG_CORE_HEAP_SIZE indeed that relates to core heap (malloc() and friends) in TEE_RAM only.

TA RAM is set by function core_mmu_get_ta_ram(): it is either hard coded or computed as the unused area of TZDRAM.

  • hard coded: defined by TA_RAM_START/TA_RAM_SIZE in platforms' platform_config.h (few platforms)
  • computed from TZDRAM_SIZE - TEE_RAM_VA_SIZE (minus TEE_SDP_TEST_MEM_SIZE, likely 0 on most platforms) where TEE_RAM_VA_SIZE is set from CFG_TEE_RAM_VA_SIZE if defined or fallback to CORE_MMU_PGDIR_SIZE. In this case, the bigger CFG_CORE_HEAP_SIZE is, the lower TA_RAM size is. Increasing by few dozen of kBytes should be straight forward. Increasing by many MBytes may need to increase also TZDRAM_SIZE.

from optee_os.

ydonghyuk avatar ydonghyuk commented on June 18, 2024

@etienne-lms

You told me that CFG_CORE_HEAP_SIZE is only involved in TEE_RAM, but I don't understand the sentence below.
"the bigger CFG_CORE_HEAP_SIZE is, the lower TA_RAM size is."

Is this only if CFG_TEE_RAM_VA_SIZE is set?

from optee_os.

etienne-lms avatar etienne-lms commented on June 18, 2024

My mistake. Indeed TEE_RAM size is set from CFG_TEE_RAM_VA_SIZE (I agree the name is confusing).
Changing CFG_CORE_HEAP_SIZE will not modify CFG_TEE_RAM_VA_SIZE, hence not modify TA_RAM size.

from optee_os.

ydonghyuk avatar ydonghyuk commented on June 18, 2024

@etienne-lms
Thank you for the correction.
If CFG_WITH_PAGER=n and CFG_TEE_RAM_VA_SIZE is not set, I would like to know how TEE_RAM_VA_SIZE is set.

from optee_os.

etienne-lms avatar etienne-lms commented on June 18, 2024

TEE_RAM_VA_SIZE defaults to CORE_MMU_PGDIR_SIZE that is 2MBytes on Armv8-A.

from optee_os.

ydonghyuk avatar ydonghyuk commented on June 18, 2024

@etienne-lms
To increase the maximum RSA operation, we are going to modify CORE_HEAP_SIZE from 64kB to about 144kB.
Will there be any major problems if I continue to use the default TEE_RAM of 2MB?

from optee_os.

etienne-lms avatar etienne-lms commented on June 18, 2024

I don't think you will face issues.

from optee_os.

ydonghyuk avatar ydonghyuk commented on June 18, 2024

@etienne-lms
Thank you very much for your help.

from optee_os.

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.