How to map normal world memory to secure world and access it?


I am trying to access normal world memory from secure world. Similar issues i found for OP-TEE:

So far reading above issues, i found mapping normal world memory to secure world would work. But i am clueless how to do that in Trusty.

Assume the following scenario:
NW kernel sends a variable address and SW will change the value at that address.

Here is what I think needs to be done.

  1. Map NW memory to SW.
  2. NW kernel sends two things to SW via smc
    a) physical address of its page table
    b) virtual address of a variable "var_a " located in heap.
  3. In SW, do a software NW kernel page walk. Get physical address of var_a. Convert it to SW virtual memory and change the value.

Is this correct or am I missing something?
Also how to do point 1 and 3?


We have trusty samples in public source package. Please check
The samples has to be run with secure OS enabled. The package of enabling secure OS is

Please take a look. Suggest develop your applications based on the trusty samples.

Hi DaneLLL,

Thanks for your reply, but it does not answer anything to what I asked.
Trusty samples won’t help in achieving what I am looking for.
Kindly point me to some documentation which will help me.

What we have implemented is described in development guide. Please take a look, If it does not meet your requirement, may see if other users can share suggestion/experience.