1
votes

I'm working with a trustzone (ARM) and unlike memory access in linux, the trusted applet does not have access to the virtual-physical memory mapping. It deals strictly with physical memory.

How would I go about translating from virtual to physical addresses?

1
Why do you need to translate virtual to physical? - osgx
Like the original post says, the code running in trustzone does not have access to a virtual-physical memory mapping. When trustzone is called, the CPU stop processing. The only thing allowed to run on the CPU is the trusted applet. The host OS is literally stopped. So, no access to the mapping. - MarkP
Which mapping? Every user program has own mapping, and non-trusted kernel has own. - osgx
For this example, lets use /proc/self. - MarkP

1 Answers

0
votes

So if i understand you don't know which memory area your application can use as it is detached from the virtual address space set in the CPU?

In my opinion you have only two choices:

  • Somehow tell the OS that a section of memory (physical) is reserved for the application. Let's say from 0xfff0 to 0xffff
  • The Page Table with the mapping is usually at the end of the kernel in memory. Try to get that address and you can search it for a free adress space (memory block).